From f982372c439a9d5bfc47d5b1f139a238a06534a2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 27 Oct 2010 11:04:04 +0200 Subject: [PATCH 0001/6109] add steven ideas Signed-off-by: Nico Schottelius --- doc/internal/logs/stevens_ideas | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/internal/logs/stevens_ideas diff --git a/doc/internal/logs/stevens_ideas b/doc/internal/logs/stevens_ideas new file mode 100644 index 00000000..9d84ad70 --- /dev/null +++ b/doc/internal/logs/stevens_ideas @@ -0,0 +1,7 @@ +Template-Verzeichnis + mit Definitionen für File + User kann globales Template verändern + copy und dann neues default + Defaults kopiert + + Global nur Attribute, keine Werte From 226e9015df235ccb41b122bdac35abeb838051f8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 28 Oct 2010 15:07:42 +0200 Subject: [PATCH 0002/6109] cleanups Signed-off-by: Nico Schottelius --- doc/man/.gitignore | 1 + doc/man/cdist-design.text | 54 +++++++++++++++++++++++++++++---------- 2 files changed, 42 insertions(+), 13 deletions(-) diff --git a/doc/man/.gitignore b/doc/man/.gitignore index c495df5b..22d0a62d 100644 --- a/doc/man/.gitignore +++ b/doc/man/.gitignore @@ -1,2 +1,3 @@ cdist.7 *.html +cdist-design.7 diff --git a/doc/man/cdist-design.text b/doc/man/cdist-design.text index c8ad4d0b..c879978a 100644 --- a/doc/man/cdist-design.text +++ b/doc/man/cdist-design.text @@ -1,20 +1,48 @@ -cdist using the push principle (triggered by server) +cdist-design(7) +=============== +Nico Schottelius + +NAME +---- +cdist-design - Design ideas for cdist + +DESCRIPTION +----------- + +When using cdist with the push principle, the execution tree looks likes this: + +-------------------------------------------------------------------------------- % server - cdist-deploy-to - cdist-build - cdist-preprocess # fills up variables with content - cdist-explore % client # explores client configuration - cdist-compile # parses configuration, creates internal state in cconfig format, verifies - cdist-link # uses cconfig output, creates executable - cdist-remote-exec # - cdist-transfer # transfer executable to client - cdist-execute % client # execute resulting executable + cdist-deploy-to(1) + cdist-build(1) + cdist-preprocess(1) # fills up variables with content + cdist-explore(1) % client # explores client configuration + cdist-compile(1) # parses configuration, creates internal state in cconfig format, verifies + cdist-link(1) # uses cconfig output, creates executable + cdist-remote-exec(1) # + cdist-transfer(1) # transfer executable to client + cdist-execute(1) % client # execute resulting executable +-------------------------------------------------------------------------------- Operation on the server is run as "cdist" user. Operation on the client is run as "root" user. -cdist using the pull principle (triggered by client) +When using cdist with the pull principle (configuration triggered by client): + +-------------------------------------------------------------------------------- % client - cdist-trigger # connects to server - cdist-deploy-to % server: see above + cdist-trigger(1) # connects to server + cdist-deploy-to(1) % server: see above +-------------------------------------------------------------------------------- + +SEE ALSO +-------- +cdist(7), website: http://www.nico.schottelius.org/cdist/[] + + +COPYING +------- +Copyright \(C) 2010 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). + From 4d99b755ab0b7ee13b9ede5a03ae65f7592feab6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 28 Oct 2010 20:32:10 +0200 Subject: [PATCH 0003/6109] add todo Signed-off-by: Nico Schottelius --- TODO | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 TODO diff --git a/TODO b/TODO new file mode 100644 index 00000000..d710fbd9 --- /dev/null +++ b/TODO @@ -0,0 +1,2 @@ +- find out where I left work :-) +- create real todo From 070a1d6e0cfcd592a76b1959c98cc87c2f6da756 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 28 Oct 2010 21:10:33 +0200 Subject: [PATCH 0004/6109] update readme Signed-off-by: Nico Schottelius --- cdist.mdwn | 138 +++++++++++++++++++++++++++++------------------------ 1 file changed, 76 insertions(+), 62 deletions(-) diff --git a/cdist.mdwn b/cdist.mdwn index 008dc112..0a571a8c 100644 --- a/cdist.mdwn +++ b/cdist.mdwn @@ -1,72 +1,54 @@ -## TO DOC - -Before initial release, document: - - - how to add package backends - - how to write a minimal host manifest - - create library with all functions (and their parameters) - - cdist_package - - cdist_file - - cdist_dir - - - only do necessary work - - install packages only if not existent - - copy file only if different - - - how to write a module - - module function autoloading via *.sh - - module "manifest"? - - create functions in *.sh - - name functions "modulename_function" - module hellow - function kitty - => hellow_kitty - - you are advised (not forced) to put files - to a subdirectory named "files" - - -## Testing cdist - -cdist-build-explorer| ssh localhost - -set -e -git clone git://git.schottelius.org/cdist -cd cdist -export PATH=$PATH:$(pwd -P)/bin -cdist-build-explorer | ssh localhost - - -## Architecture - - - User write shell scripts, which are run on the server - - Shell scripts call cdist functions - - cdist functions generate cconfig, which can be verified - - if verified, generate "command file" to execute on the client - - client only sees the commands - - no special requirements on the client - -## next: cdist-deploy-to - - - sync conf/{lib/,modules,host/$name} - ## Introduction cdist configures your system. It is similar to -[cfengine](http://www.cfengine.org/) and -[puppet](http://www.puppetlabs.com/). +[cfengine](http://www.cfengine.org/) and [puppet](http://www.puppetlabs.com/). It is inspired by both of those tools: * Try to redo the great power you get * But leave out the bugs you also got -### Principles +And cdist is UNIX: -cdist is unix: It's designed to reuse existing tools -and does not need high level scripting language interpreters. +It's designed to reuse existing tools, +does not require high level scripting language interpreters +and is equipped with manpages. -### Requirements +### Architecture + + * KISS (keep it simple and stupid) + * Allow very easy extension of cdist (creating own types for instance) + * Push (server pushes configuration) and Pull (client retrieves config) supported + * User defines configuration in shell scripts using cdist functions + * Cdist generates internal configuration (cconfig style) and afterwards applies configuration + +## Requirements + +### Server * A posix like shell + * SSH-Client (for push architecture) + * SSH-Server (for pull architecture) + +### Client + + * A posix like shell + * SSH-Client (for pull architecture) + * SSH-Server (for push architecture) + +## How to get cdist + + git clone git://git.schottelius.org/cdist + +## How to install cdist + + make install + +## How to use cdist + + man cdist + +-------------------------------------------------------------------------------- + ## How cdist works @@ -137,6 +119,7 @@ what is puppet? [FOR ME] a DSL that allows you define the objectives. A webserver with fileserver capabilities. A client based scheduled polling infrastructure. + -------------------------------------------------------------------------------- What do I miss from puppet? @@ -190,11 +173,6 @@ Simple stuff done by Unix[notm] - or absolute --------------------------------------------------------------------------------- -Architecture - - - -------------------------------------------------------------------------------- Implementation @@ -203,3 +181,39 @@ Implementation -> no need to reimplement scheduling "cdist-explore" (facter replacement) -> running on the client +-------------------------------------------------------------------------------- +Requirements: + It MUST be incredible easy/dumb to add new types. + => growable default types + + +-------------------------------------------------------------------------------- + + ## TO DOC + +Before initial release, document: + + - how to add package backends + - how to write a minimal host manifest + - create library with all functions (and their parameters) + - cdist_package + - cdist_file + - cdist_dir + + - only do necessary work + - install packages only if not existent + - copy file only if different + + - how to write a module + - module function autoloading via *.sh + - module "manifest"? + - create functions in *.sh + - name functions "modulename_function" + module hellow + function kitty + => hellow_kitty + - you are advised (not forced) to put files + to a subdirectory named "files" + + + From 3bbf032b41dbc2013cb85e2d4530913765163cda Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 28 Oct 2010 21:10:51 +0200 Subject: [PATCH 0005/6109] make readme readme Signed-off-by: Nico Schottelius --- README | 220 ++++++++++++++++++++++++++++++++++++++++++++++++++++- cdist.mdwn | 219 ---------------------------------------------------- 2 files changed, 219 insertions(+), 220 deletions(-) mode change 120000 => 100644 README delete mode 100644 cdist.mdwn diff --git a/README b/README deleted file mode 120000 index fab69bb4..00000000 --- a/README +++ /dev/null @@ -1 +0,0 @@ -cdist.mdwn \ No newline at end of file diff --git a/README b/README new file mode 100644 index 00000000..0a571a8c --- /dev/null +++ b/README @@ -0,0 +1,219 @@ +## Introduction + +cdist configures your system. It is similar to +[cfengine](http://www.cfengine.org/) and [puppet](http://www.puppetlabs.com/). +It is inspired by both of those tools: + + * Try to redo the great power you get + * But leave out the bugs you also got + +And cdist is UNIX: + +It's designed to reuse existing tools, +does not require high level scripting language interpreters +and is equipped with manpages. + +### Architecture + + * KISS (keep it simple and stupid) + * Allow very easy extension of cdist (creating own types for instance) + * Push (server pushes configuration) and Pull (client retrieves config) supported + * User defines configuration in shell scripts using cdist functions + * Cdist generates internal configuration (cconfig style) and afterwards applies configuration + +## Requirements + +### Server + + * A posix like shell + * SSH-Client (for push architecture) + * SSH-Server (for pull architecture) + +### Client + + * A posix like shell + * SSH-Client (for pull architecture) + * SSH-Server (for push architecture) + +## How to get cdist + + git clone git://git.schottelius.org/cdist + +## How to install cdist + + make install + +## How to use cdist + + man cdist + +-------------------------------------------------------------------------------- + + +## How cdist works + +### Exploring your system + +cdist analyses the system to apply the configuration on and +selects the right backends. You can use ***cdist-explore*** to +the results of the explore functions. + +### Applying the configuration + +cdist looks for the configuration to apply on the local host +and applies it using ***cdist-apply***. + +### Managing many hosts + +Whereas ***cdist-apply*** manages one host, ***cdist-deploy*** +applies the configuration on enabled hosts. + +## How to use cdist? + + 0. Create a host specification (/etc/cdist/hosts/**hostname**) + 0. Add functionalilty to add + 0. Run ***cdist-apply*** + + +## What do I need [from puppet?] + +### Abstraction of package managers + +I don't want to care about apt, rpm, yum, pacman, etc. I just +want to ensure, some package exists or does not exist. + + +### Common tasks already done + + - [LIBRARY] All the helper types like + - file + - ssh_keys + - package + - service + - user + +### PORTABILITY + - [PORTABILITY] clients for every unix + - mostly ruby + facter in puppet + +### Other + - Modules: Nice to put stuff together + - and reuse + - [CONDITIONS] facter is cool + - the DSL + - with many bugs + - templates + - Client/Server approach is nice to have + - Clients only get the part of the documentation, that's + relevant to them + - detect impossible/unsafe things: + - creating a file twice + - installing and removing a package + - and report location of occurence + - parse afterwards? + +-------------------------------------------------------------------------------- +what is puppet? [FOR ME] + + A configuration deployment assistant, + a DSL that allows you define the objectives. + A webserver with fileserver capabilities. + A client based scheduled polling infrastructure. + +-------------------------------------------------------------------------------- +What do I miss from puppet? + + - speed + - elegance + - clean design + - documentation + - the "no surprise" factor + - easy to use "data memory" (i.e. external ressources) + - easy integration into installation process + - copy identity to master + - multi master setups + - development configurations / tests + - editing of configuration files + - similar to cfengine + - replace bug squasher with bug avoidance + - qmail did not need one either + - push infrastructure + - real / meaningful error messages + +-------------------------------------------------------------------------------- +Simple stuff done by Unix[notm] + + - DSL: Shell! + - gives if, else and EVEN elsif for free! + - and case + - and and and + - and there's no os (solaris doesn't count) without a usable /bin/sh + - cdist defines what you can use + - you _can_ use os specific stuff + - but it's ugly and you shoot into your own foot + - "manifests" (use the same name here?) will be run/sourced + - inheritance possible via sourcing + - cdist-lib always preloaded + - library == functions? + - version control via git + - file distribution via ssh + - authentication via ssh + - dumb clients, similar to manifest compile in puppet + - clients just execute commands + - dependencies via make? + - how to ensure sigletons / conflicting definitions? + file { "/a": + ensure => present, + file { "/a": + ensure => absent, + - matching on explored items, not only on host name? + - match function in host? [optional] + - file source: + - relative to specification + - or absolute + + +-------------------------------------------------------------------------------- +Implementation + + "cdist-server" + -> called by cron? + -> no need to reimplement scheduling + "cdist-explore" (facter replacement) + -> running on the client +-------------------------------------------------------------------------------- +Requirements: + It MUST be incredible easy/dumb to add new types. + => growable default types + + +-------------------------------------------------------------------------------- + + ## TO DOC + +Before initial release, document: + + - how to add package backends + - how to write a minimal host manifest + - create library with all functions (and their parameters) + - cdist_package + - cdist_file + - cdist_dir + + - only do necessary work + - install packages only if not existent + - copy file only if different + + - how to write a module + - module function autoloading via *.sh + - module "manifest"? + - create functions in *.sh + - name functions "modulename_function" + module hellow + function kitty + => hellow_kitty + - you are advised (not forced) to put files + to a subdirectory named "files" + + + diff --git a/cdist.mdwn b/cdist.mdwn deleted file mode 100644 index 0a571a8c..00000000 --- a/cdist.mdwn +++ /dev/null @@ -1,219 +0,0 @@ -## Introduction - -cdist configures your system. It is similar to -[cfengine](http://www.cfengine.org/) and [puppet](http://www.puppetlabs.com/). -It is inspired by both of those tools: - - * Try to redo the great power you get - * But leave out the bugs you also got - -And cdist is UNIX: - -It's designed to reuse existing tools, -does not require high level scripting language interpreters -and is equipped with manpages. - -### Architecture - - * KISS (keep it simple and stupid) - * Allow very easy extension of cdist (creating own types for instance) - * Push (server pushes configuration) and Pull (client retrieves config) supported - * User defines configuration in shell scripts using cdist functions - * Cdist generates internal configuration (cconfig style) and afterwards applies configuration - -## Requirements - -### Server - - * A posix like shell - * SSH-Client (for push architecture) - * SSH-Server (for pull architecture) - -### Client - - * A posix like shell - * SSH-Client (for pull architecture) - * SSH-Server (for push architecture) - -## How to get cdist - - git clone git://git.schottelius.org/cdist - -## How to install cdist - - make install - -## How to use cdist - - man cdist - --------------------------------------------------------------------------------- - - -## How cdist works - -### Exploring your system - -cdist analyses the system to apply the configuration on and -selects the right backends. You can use ***cdist-explore*** to -the results of the explore functions. - -### Applying the configuration - -cdist looks for the configuration to apply on the local host -and applies it using ***cdist-apply***. - -### Managing many hosts - -Whereas ***cdist-apply*** manages one host, ***cdist-deploy*** -applies the configuration on enabled hosts. - -## How to use cdist? - - 0. Create a host specification (/etc/cdist/hosts/**hostname**) - 0. Add functionalilty to add - 0. Run ***cdist-apply*** - - -## What do I need [from puppet?] - -### Abstraction of package managers - -I don't want to care about apt, rpm, yum, pacman, etc. I just -want to ensure, some package exists or does not exist. - - -### Common tasks already done - - - [LIBRARY] All the helper types like - - file - - ssh_keys - - package - - service - - user - -### PORTABILITY - - [PORTABILITY] clients for every unix - - mostly ruby + facter in puppet - -### Other - - Modules: Nice to put stuff together - - and reuse - - [CONDITIONS] facter is cool - - the DSL - - with many bugs - - templates - - Client/Server approach is nice to have - - Clients only get the part of the documentation, that's - relevant to them - - detect impossible/unsafe things: - - creating a file twice - - installing and removing a package - - and report location of occurence - - parse afterwards? - --------------------------------------------------------------------------------- -what is puppet? [FOR ME] - - A configuration deployment assistant, - a DSL that allows you define the objectives. - A webserver with fileserver capabilities. - A client based scheduled polling infrastructure. - --------------------------------------------------------------------------------- -What do I miss from puppet? - - - speed - - elegance - - clean design - - documentation - - the "no surprise" factor - - easy to use "data memory" (i.e. external ressources) - - easy integration into installation process - - copy identity to master - - multi master setups - - development configurations / tests - - editing of configuration files - - similar to cfengine - - replace bug squasher with bug avoidance - - qmail did not need one either - - push infrastructure - - real / meaningful error messages - --------------------------------------------------------------------------------- -Simple stuff done by Unix[notm] - - - DSL: Shell! - - gives if, else and EVEN elsif for free! - - and case - - and and and - - and there's no os (solaris doesn't count) without a usable /bin/sh - - cdist defines what you can use - - you _can_ use os specific stuff - - but it's ugly and you shoot into your own foot - - "manifests" (use the same name here?) will be run/sourced - - inheritance possible via sourcing - - cdist-lib always preloaded - - library == functions? - - version control via git - - file distribution via ssh - - authentication via ssh - - dumb clients, similar to manifest compile in puppet - - clients just execute commands - - dependencies via make? - - how to ensure sigletons / conflicting definitions? - file { "/a": - ensure => present, - file { "/a": - ensure => absent, - - matching on explored items, not only on host name? - - match function in host? [optional] - - file source: - - relative to specification - - or absolute - - --------------------------------------------------------------------------------- -Implementation - - "cdist-server" - -> called by cron? - -> no need to reimplement scheduling - "cdist-explore" (facter replacement) - -> running on the client --------------------------------------------------------------------------------- -Requirements: - It MUST be incredible easy/dumb to add new types. - => growable default types - - --------------------------------------------------------------------------------- - - ## TO DOC - -Before initial release, document: - - - how to add package backends - - how to write a minimal host manifest - - create library with all functions (and their parameters) - - cdist_package - - cdist_file - - cdist_dir - - - only do necessary work - - install packages only if not existent - - copy file only if different - - - how to write a module - - module function autoloading via *.sh - - module "manifest"? - - create functions in *.sh - - name functions "modulename_function" - module hellow - function kitty - => hellow_kitty - - you are advised (not forced) to put files - to a subdirectory named "files" - - - From c223a4ac5ca5d88597e7b7784ef4b93ac614896d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 28 Oct 2010 21:13:57 +0200 Subject: [PATCH 0006/6109] move around documentation Signed-off-by: Nico Schottelius --- Makefile | 6 ++ README | 171 ----------------------------------- TODO | 10 +- bin/cdist-build | 1 - bin/cdist-deploy-to | 2 +- doc/internal/puppet-analysis | 66 ++++++++++++++ doc/man/cdist.text | 106 ++++++++++++++++++++++ 7 files changed, 187 insertions(+), 175 deletions(-) create mode 100644 doc/internal/puppet-analysis diff --git a/Makefile b/Makefile index 1dd8eb9b..729474c9 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,9 @@ +PREFIX=/usr +BINDIR=$(PREFIX}/bin + +install: + cp bin/* $(BINDIR) + sync: .rsync lyni@tablett:cdist .rsync nicosc@free.ethz.ch:cdist diff --git a/README b/README index 0a571a8c..ddcefddb 100644 --- a/README +++ b/README @@ -46,174 +46,3 @@ and is equipped with manpages. ## How to use cdist man cdist - --------------------------------------------------------------------------------- - - -## How cdist works - -### Exploring your system - -cdist analyses the system to apply the configuration on and -selects the right backends. You can use ***cdist-explore*** to -the results of the explore functions. - -### Applying the configuration - -cdist looks for the configuration to apply on the local host -and applies it using ***cdist-apply***. - -### Managing many hosts - -Whereas ***cdist-apply*** manages one host, ***cdist-deploy*** -applies the configuration on enabled hosts. - -## How to use cdist? - - 0. Create a host specification (/etc/cdist/hosts/**hostname**) - 0. Add functionalilty to add - 0. Run ***cdist-apply*** - - -## What do I need [from puppet?] - -### Abstraction of package managers - -I don't want to care about apt, rpm, yum, pacman, etc. I just -want to ensure, some package exists or does not exist. - - -### Common tasks already done - - - [LIBRARY] All the helper types like - - file - - ssh_keys - - package - - service - - user - -### PORTABILITY - - [PORTABILITY] clients for every unix - - mostly ruby + facter in puppet - -### Other - - Modules: Nice to put stuff together - - and reuse - - [CONDITIONS] facter is cool - - the DSL - - with many bugs - - templates - - Client/Server approach is nice to have - - Clients only get the part of the documentation, that's - relevant to them - - detect impossible/unsafe things: - - creating a file twice - - installing and removing a package - - and report location of occurence - - parse afterwards? - --------------------------------------------------------------------------------- -what is puppet? [FOR ME] - - A configuration deployment assistant, - a DSL that allows you define the objectives. - A webserver with fileserver capabilities. - A client based scheduled polling infrastructure. - --------------------------------------------------------------------------------- -What do I miss from puppet? - - - speed - - elegance - - clean design - - documentation - - the "no surprise" factor - - easy to use "data memory" (i.e. external ressources) - - easy integration into installation process - - copy identity to master - - multi master setups - - development configurations / tests - - editing of configuration files - - similar to cfengine - - replace bug squasher with bug avoidance - - qmail did not need one either - - push infrastructure - - real / meaningful error messages - --------------------------------------------------------------------------------- -Simple stuff done by Unix[notm] - - - DSL: Shell! - - gives if, else and EVEN elsif for free! - - and case - - and and and - - and there's no os (solaris doesn't count) without a usable /bin/sh - - cdist defines what you can use - - you _can_ use os specific stuff - - but it's ugly and you shoot into your own foot - - "manifests" (use the same name here?) will be run/sourced - - inheritance possible via sourcing - - cdist-lib always preloaded - - library == functions? - - version control via git - - file distribution via ssh - - authentication via ssh - - dumb clients, similar to manifest compile in puppet - - clients just execute commands - - dependencies via make? - - how to ensure sigletons / conflicting definitions? - file { "/a": - ensure => present, - file { "/a": - ensure => absent, - - matching on explored items, not only on host name? - - match function in host? [optional] - - file source: - - relative to specification - - or absolute - - --------------------------------------------------------------------------------- -Implementation - - "cdist-server" - -> called by cron? - -> no need to reimplement scheduling - "cdist-explore" (facter replacement) - -> running on the client --------------------------------------------------------------------------------- -Requirements: - It MUST be incredible easy/dumb to add new types. - => growable default types - - --------------------------------------------------------------------------------- - - ## TO DOC - -Before initial release, document: - - - how to add package backends - - how to write a minimal host manifest - - create library with all functions (and their parameters) - - cdist_package - - cdist_file - - cdist_dir - - - only do necessary work - - install packages only if not existent - - copy file only if different - - - how to write a module - - module function autoloading via *.sh - - module "manifest"? - - create functions in *.sh - - name functions "modulename_function" - module hellow - function kitty - => hellow_kitty - - you are advised (not forced) to put files - to a subdirectory named "files" - - - diff --git a/TODO b/TODO index d710fbd9..63a33b76 100644 --- a/TODO +++ b/TODO @@ -1,2 +1,8 @@ -- find out where I left work :-) -- create real todo +- doc: + - readme (cleanup, define) + - cdist manpage (main manpage) + - create todos from doc/internal/puppet-analysis +- cdist-deply-to + - sync conf/{lib/,modules,host/$name} +- cdist-build-explorer| ssh localhost +- diff --git a/bin/cdist-build b/bin/cdist-build index 3290886b..a26b9458 100755 --- a/bin/cdist-build +++ b/bin/cdist-build @@ -26,7 +26,6 @@ [ $# -eq 1 ] || __cdist_usage "target" set -e -set -x . cdist-preprocess "$1" . cdist-compile "$1" diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index e369c4e8..c1a8c835 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -1,4 +1,4 @@ -!/bin/sh +#!/bin/sh # # 2010 Nico Schottelius (nico-cdist at schottelius.org) # diff --git a/doc/internal/puppet-analysis b/doc/internal/puppet-analysis new file mode 100644 index 00000000..6d10e18e --- /dev/null +++ b/doc/internal/puppet-analysis @@ -0,0 +1,66 @@ +## What do I need [from puppet?] + +### Abstraction of package managers + +I don't want to care about apt, rpm, yum, pacman, etc. I just +want to ensure, some package exists or does not exist. + + +### Common tasks already done + + - [LIBRARY] All the helper types like + - file + - ssh_keys + - package + - service + - user + +### PORTABILITY + - [PORTABILITY] clients for every unix + - mostly ruby + facter in puppet + +### Other + - Modules: Nice to put stuff together + - and reuse + - [CONDITIONS] facter is cool + - the DSL + - with many bugs + - templates + - Client/Server approach is nice to have + - Clients only get the part of the documentation, that's + relevant to them + - detect impossible/unsafe things: + - creating a file twice + - installing and removing a package + - and report location of occurence + - parse afterwards? + +-------------------------------------------------------------------------------- +what is puppet? [FOR ME] + + A configuration deployment assistant, + a DSL that allows you define the objectives. + A webserver with fileserver capabilities. + A client based scheduled polling infrastructure. + +-------------------------------------------------------------------------------- +What do I miss from puppet? + + - speed + - elegance + - clean design + - documentation + - the "no surprise" factor + - easy to use "data memory" (i.e. external ressources) + - easy integration into installation process + - copy identity to master + - multi master setups + - development configurations / tests + - editing of configuration files + - similar to cfengine + - replace bug squasher with bug avoidance + - qmail did not need one either + - push infrastructure + - real / meaningful error messages + + diff --git a/doc/man/cdist.text b/doc/man/cdist.text index 6fba8bea..c1b6667b 100644 --- a/doc/man/cdist.text +++ b/doc/man/cdist.text @@ -31,3 +31,109 @@ COPYING ------- Copyright \(C) 2010 Nico Schottelius. Free use of this software is granted under the terms of the GNU General Public License version 3 (GPLv3). + +-------------------------------------------------------------------------------- + + +## How cdist works + +### Exploring your system + +cdist analyses the system to apply the configuration on and +selects the right backends. You can use ***cdist-explore*** to +the results of the explore functions. + +### Applying the configuration + +cdist looks for the configuration to apply on the local host +and applies it using ***cdist-apply***. + +### Managing many hosts + +Whereas ***cdist-apply*** manages one host, ***cdist-deploy*** +applies the configuration on enabled hosts. + +## How to use cdist? + + 0. Create a host specification (/etc/cdist/hosts/**hostname**) + 0. Add functionalilty to add + 0. Run ***cdist-apply*** + + +-------------------------------------------------------------------------------- +Simple stuff done by Unix[notm] + + - DSL: Shell! + - gives if, else and EVEN elsif for free! + - and case + - and and and + - and there's no os (solaris doesn't count) without a usable /bin/sh + - cdist defines what you can use + - you _can_ use os specific stuff + - but it's ugly and you shoot into your own foot + - "manifests" (use the same name here?) will be run/sourced + - inheritance possible via sourcing + - cdist-lib always preloaded + - library == functions? + - version control via git + - file distribution via ssh + - authentication via ssh + - dumb clients, similar to manifest compile in puppet + - clients just execute commands + - dependencies via make? + - how to ensure sigletons / conflicting definitions? + file { "/a": + ensure => present, + file { "/a": + ensure => absent, + - matching on explored items, not only on host name? + - match function in host? [optional] + - file source: + - relative to specification + - or absolute + + +-------------------------------------------------------------------------------- +Implementation + + "cdist-server" + -> called by cron? + -> no need to reimplement scheduling + "cdist-explore" (facter replacement) + -> running on the client +-------------------------------------------------------------------------------- +Requirements: + It MUST be incredible easy/dumb to add new types. + => growable default types + + +-------------------------------------------------------------------------------- + + ## TO DOC + +Before initial release, document: + + - how to add package backends + - how to write a minimal host manifest + - create library with all functions (and their parameters) + - cdist_package + - cdist_file + - cdist_dir + + - only do necessary work + - install packages only if not existent + - copy file only if different + + - how to write a module + - module function autoloading via *.sh + - module "manifest"? + - create functions in *.sh + - name functions "modulename_function" + module hellow + function kitty + => hellow_kitty + - you are advised (not forced) to put files + to a subdirectory named "files" + + + From e2538bb43267a8f98e1f39e4d34a766e3dd4eab0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 28 Oct 2010 21:23:56 +0200 Subject: [PATCH 0007/6109] cleanup readme Signed-off-by: Nico Schottelius --- README | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README b/README index ddcefddb..42cb1784 100644 --- a/README +++ b/README @@ -9,9 +9,10 @@ It is inspired by both of those tools: And cdist is UNIX: -It's designed to reuse existing tools, -does not require high level scripting language interpreters -and is equipped with manpages. +It's designed to +reuse existing tools, +it does not require high level scripting language interpreters +and it is equipped with manpages. ### Architecture From 3dfa3be94b9ee89fb42273a95d0d499cbcb28649 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 28 Oct 2010 21:32:35 +0200 Subject: [PATCH 0008/6109] cleaned up readme Signed-off-by: Nico Schottelius --- TODO | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TODO b/TODO index 63a33b76..58423c30 100644 --- a/TODO +++ b/TODO @@ -1,8 +1,9 @@ - doc: - - readme (cleanup, define) - cdist manpage (main manpage) - create todos from doc/internal/puppet-analysis + - cleanup / integrate doc/man/cdist.text - cdist-deply-to - sync conf/{lib/,modules,host/$name} - cdist-build-explorer| ssh localhost -- +- Create usable Makefile + - install From 716a94cc2b8937394590f55faac0e15d39260c17 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 28 Oct 2010 23:31:57 +0200 Subject: [PATCH 0009/6109] update todos Signed-off-by: Nico Schottelius --- TODO | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index 58423c30..d3049af8 100644 --- a/TODO +++ b/TODO @@ -1,9 +1,47 @@ - doc: - cdist manpage (main manpage) - - create todos from doc/internal/puppet-analysis + - add terminology + - define entry point + - define modules / mix with library? + - and entry point is my only real configuration? + - define steps within configuration apply + - detect impossible/unsafe things: + - creating a file twice + - installing and removing a package + - and report location of occurence + - parse afterwards? + + - how to define templates + - variable substitution from shell may be problematic + - SHELL SCRIPTS! (executables? do not support?) + - stdout - cleanup / integrate doc/man/cdist.text - cdist-deply-to - sync conf/{lib/,modules,host/$name} +- cdist-explore + - add more stuff to explore + - write manpage - cdist-build-explorer| ssh localhost - Create usable Makefile - install +- to implement (from puppet): + - package management and different "providers" + - file / directory handling + - ssh key handling + - services + - user management + - including passwords + - integrate "external ressources" + - probably via explorer + - what about blobs? + - what about source = ${host}/.../ +- to implement (from cfengine): + - file editing (sed, awk) + - huge library of functions shipped by default +- release first public version, which includes at least: + - manpages + +-------------------------------------------------------------------------------- +Later: + + - multi master setups From 1a149434f507956b0ff5afff59af627be6b08c7c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 1 Nov 2010 00:09:30 +0100 Subject: [PATCH 0010/6109] add new host init file with example Signed-off-by: Nico Schottelius --- conf/hosts/init | 5 +++++ conf/hosts/kr/files/notebook | 1 - conf/hosts/kr/manifest | 9 --------- 3 files changed, 5 insertions(+), 10 deletions(-) create mode 100644 conf/hosts/init delete mode 100644 conf/hosts/kr/files/notebook delete mode 100644 conf/hosts/kr/manifest diff --git a/conf/hosts/init b/conf/hosts/init new file mode 100644 index 00000000..42431fcc --- /dev/null +++ b/conf/hosts/init @@ -0,0 +1,5 @@ +case "$__target_hostname" in + thilo) + echo "postgresql" + ;; +esac diff --git a/conf/hosts/kr/files/notebook b/conf/hosts/kr/files/notebook deleted file mode 100644 index 29e5dc63..00000000 --- a/conf/hosts/kr/files/notebook +++ /dev/null @@ -1 +0,0 @@ -This is Nico's notebook, automated via cdist. diff --git a/conf/hosts/kr/manifest b/conf/hosts/kr/manifest deleted file mode 100644 index 53c91f37..00000000 --- a/conf/hosts/kr/manifest +++ /dev/null @@ -1,9 +0,0 @@ -# works -cdist_package install vim zsh rxvt-unicode - -# works -cdist_file files/notebook /etc/nicos_notebook - -#collectd -#cdist_file /etc/issue issue -#cdist_file /etc/issue --via my_func From 950fdc9e1a2fbfb8d4ce41e46c74a07aeed8f489 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 1 Nov 2010 00:13:27 +0100 Subject: [PATCH 0011/6109] add postgresql module Signed-off-by: Nico Schottelius --- conf/modules/postgresql/init | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 conf/modules/postgresql/init diff --git a/conf/modules/postgresql/init b/conf/modules/postgresql/init new file mode 100644 index 00000000..c02ccf46 --- /dev/null +++ b/conf/modules/postgresql/init @@ -0,0 +1,2 @@ +# Ensure postgresql 8.4 is instelled +__package --ensure installed --name postgresql-8.4 From 5d65ca460bac93bc3c8806dc8ae7a174f67be2b2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 1 Nov 2010 00:16:38 +0100 Subject: [PATCH 0012/6109] add template for cdist-language Signed-off-by: Nico Schottelius --- doc/man/cdist-language.text | 139 ++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 doc/man/cdist-language.text diff --git a/doc/man/cdist-language.text b/doc/man/cdist-language.text new file mode 100644 index 00000000..b1b5fc2f --- /dev/null +++ b/doc/man/cdist-language.text @@ -0,0 +1,139 @@ +cdist(7) +======== +Nico Schottelius + + +NAME +---- +cdist - Configuration distribution system + + +DESCRIPTION +----------- +Cdist allows you to define centrally a configurations for +all systems and apply them. Cdist generally uses the push +approach (a server pushes out the configuration to the clients), +but can also be used the pull way (see cdist-push-pull(7)). + +Cdist is configured in shell syntax, which is "compiled" to an +internal configuration representation (cconfig), which again +is used to generate an executable, which is run on the client +(see cdist-language(7), cdist-design(7)). + + + +SEE ALSO +-------- +cdist-deploy-to(1), website: http://www.nico.schottelius.org/cdist/[] + + +COPYING +------- +Copyright \(C) 2010 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). + +-------------------------------------------------------------------------------- + + +## How cdist works + +### Exploring your system + +cdist analyses the system to apply the configuration on and +selects the right backends. You can use ***cdist-explore*** to +the results of the explore functions. + +### Applying the configuration + +cdist looks for the configuration to apply on the local host +and applies it using ***cdist-apply***. + +### Managing many hosts + +Whereas ***cdist-apply*** manages one host, ***cdist-deploy*** +applies the configuration on enabled hosts. + +## How to use cdist? + + 0. Create a host specification (/etc/cdist/hosts/**hostname**) + 0. Add functionalilty to add + 0. Run ***cdist-apply*** + + +-------------------------------------------------------------------------------- +Simple stuff done by Unix[notm] + + - DSL: Shell! + - gives if, else and EVEN elsif for free! + - and case + - and and and + - and there's no os (solaris doesn't count) without a usable /bin/sh + - cdist defines what you can use + - you _can_ use os specific stuff + - but it's ugly and you shoot into your own foot + - "manifests" (use the same name here?) will be run/sourced + - inheritance possible via sourcing + - cdist-lib always preloaded + - library == functions? + - version control via git + - file distribution via ssh + - authentication via ssh + - dumb clients, similar to manifest compile in puppet + - clients just execute commands + - dependencies via make? + - how to ensure sigletons / conflicting definitions? + file { "/a": + ensure => present, + file { "/a": + ensure => absent, + - matching on explored items, not only on host name? + - match function in host? [optional] + - file source: + - relative to specification + - or absolute + + +-------------------------------------------------------------------------------- +Implementation + + "cdist-server" + -> called by cron? + -> no need to reimplement scheduling + "cdist-explore" (facter replacement) + -> running on the client +-------------------------------------------------------------------------------- +Requirements: + It MUST be incredible easy/dumb to add new types. + => growable default types + + +-------------------------------------------------------------------------------- + + ## TO DOC + +Before initial release, document: + + - how to add package backends + - how to write a minimal host manifest + - create library with all functions (and their parameters) + - cdist_package + - cdist_file + - cdist_dir + + - only do necessary work + - install packages only if not existent + - copy file only if different + + - how to write a module + - module function autoloading via *.sh + - module "manifest"? + - create functions in *.sh + - name functions "modulename_function" + module hellow + function kitty + => hellow_kitty + - you are advised (not forced) to put files + to a subdirectory named "files" + + + From 0d27f1a82da03f947629eb33983dd7a8b0f5649a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 1 Nov 2010 00:22:15 +0100 Subject: [PATCH 0013/6109] add first hint on the language Signed-off-by: Nico Schottelius --- doc/man/cdist-language.text | 136 +++++------------------------------- 1 file changed, 18 insertions(+), 118 deletions(-) diff --git a/doc/man/cdist-language.text b/doc/man/cdist-language.text index b1b5fc2f..613a8fd3 100644 --- a/doc/man/cdist-language.text +++ b/doc/man/cdist-language.text @@ -1,139 +1,39 @@ -cdist(7) -======== +cdist-language(7) +================= Nico Schottelius NAME ---- -cdist - Configuration distribution system +cdist-language - Cdist Configuration language DESCRIPTION ----------- -Cdist allows you to define centrally a configurations for -all systems and apply them. Cdist generally uses the push -approach (a server pushes out the configuration to the clients), -but can also be used the pull way (see cdist-push-pull(7)). +A cdist configuration consists of the following parts: -Cdist is configured in shell syntax, which is "compiled" to an -internal configuration representation (cconfig), which again -is used to generate an executable, which is run on the client -(see cdist-language(7), cdist-design(7)). +- host definitions (cdist-language-hosts(7)) +- library (cdist-language-library(7)) +- modules (cdist-language-modules(7)) +In short the configuration is built as follows: + +- conf/hosts/init is executed, the resulting output is used for module loading +- the appropriate modules are loaded and executed, which +- use library functions. + +The three stages are used to seperate configurations: + +- hosts contain mappings to created modules +- modules create (probably site specific) configurations using library collections +- the library is shipped with cdist, but can be extendet locally SEE ALSO -------- -cdist-deploy-to(1), website: http://www.nico.schottelius.org/cdist/[] COPYING ------- Copyright \(C) 2010 Nico Schottelius. Free use of this software is granted under the terms of the GNU General Public License version 3 (GPLv3). - --------------------------------------------------------------------------------- - - -## How cdist works - -### Exploring your system - -cdist analyses the system to apply the configuration on and -selects the right backends. You can use ***cdist-explore*** to -the results of the explore functions. - -### Applying the configuration - -cdist looks for the configuration to apply on the local host -and applies it using ***cdist-apply***. - -### Managing many hosts - -Whereas ***cdist-apply*** manages one host, ***cdist-deploy*** -applies the configuration on enabled hosts. - -## How to use cdist? - - 0. Create a host specification (/etc/cdist/hosts/**hostname**) - 0. Add functionalilty to add - 0. Run ***cdist-apply*** - - --------------------------------------------------------------------------------- -Simple stuff done by Unix[notm] - - - DSL: Shell! - - gives if, else and EVEN elsif for free! - - and case - - and and and - - and there's no os (solaris doesn't count) without a usable /bin/sh - - cdist defines what you can use - - you _can_ use os specific stuff - - but it's ugly and you shoot into your own foot - - "manifests" (use the same name here?) will be run/sourced - - inheritance possible via sourcing - - cdist-lib always preloaded - - library == functions? - - version control via git - - file distribution via ssh - - authentication via ssh - - dumb clients, similar to manifest compile in puppet - - clients just execute commands - - dependencies via make? - - how to ensure sigletons / conflicting definitions? - file { "/a": - ensure => present, - file { "/a": - ensure => absent, - - matching on explored items, not only on host name? - - match function in host? [optional] - - file source: - - relative to specification - - or absolute - - --------------------------------------------------------------------------------- -Implementation - - "cdist-server" - -> called by cron? - -> no need to reimplement scheduling - "cdist-explore" (facter replacement) - -> running on the client --------------------------------------------------------------------------------- -Requirements: - It MUST be incredible easy/dumb to add new types. - => growable default types - - --------------------------------------------------------------------------------- - - ## TO DOC - -Before initial release, document: - - - how to add package backends - - how to write a minimal host manifest - - create library with all functions (and their parameters) - - cdist_package - - cdist_file - - cdist_dir - - - only do necessary work - - install packages only if not existent - - copy file only if different - - - how to write a module - - module function autoloading via *.sh - - module "manifest"? - - create functions in *.sh - - name functions "modulename_function" - module hellow - function kitty - => hellow_kitty - - you are advised (not forced) to put files - to a subdirectory named "files" - - - From 686f50d1060cc1f3ee7a650da774a8e5760e2b4b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 1 Nov 2010 16:03:07 +0100 Subject: [PATCH 0014/6109] cleanups Signed-off-by: Nico Schottelius --- TODO | 4 ++++ doc/man/cdist.text | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/TODO b/TODO index d3049af8..e156fe77 100644 --- a/TODO +++ b/TODO @@ -16,6 +16,8 @@ - SHELL SCRIPTS! (executables? do not support?) - stdout - cleanup / integrate doc/man/cdist.text + - define how to write / provide functions + - keep generic / easy extension - cdist-deply-to - sync conf/{lib/,modules,host/$name} - cdist-explore @@ -38,6 +40,7 @@ - to implement (from cfengine): - file editing (sed, awk) - huge library of functions shipped by default + - disconnected clients with "cache" - release first public version, which includes at least: - manpages @@ -45,3 +48,4 @@ Later: - multi master setups + - pull strategy diff --git a/doc/man/cdist.text b/doc/man/cdist.text index c1b6667b..b1b5fc2f 100644 --- a/doc/man/cdist.text +++ b/doc/man/cdist.text @@ -16,8 +16,8 @@ approach (a server pushes out the configuration to the clients), but can also be used the pull way (see cdist-push-pull(7)). Cdist is configured in shell syntax, which is "compiled" to an -internal configuration representation, which again is used to -generate an executable, which is run on the client +internal configuration representation (cconfig), which again +is used to generate an executable, which is run on the client (see cdist-language(7), cdist-design(7)). From 88d9cf13de2e94f96efee0329962206a654c85c6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 1 Nov 2010 16:19:54 +0100 Subject: [PATCH 0015/6109] cleanup cdist manpage, add todos at various positions Signed-off-by: Nico Schottelius --- TODO | 17 ++++++ doc/internal/config-layout | 9 +++ doc/man/cdist-design.text | 35 +++++++++++ doc/man/cdist-language.text | 27 +++++++++ doc/man/cdist-quickstart.text | 5 ++ doc/man/cdist.text | 110 +--------------------------------- 6 files changed, 96 insertions(+), 107 deletions(-) create mode 100644 doc/internal/config-layout create mode 100644 doc/man/cdist-quickstart.text diff --git a/TODO b/TODO index e156fe77..e7841d03 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,8 @@ - doc: - cdist manpage (main manpage) + - cleanup following man + their tree: + - cdist.text + - cdist-design.text - add terminology - define entry point - define modules / mix with library? @@ -43,6 +46,20 @@ - disconnected clients with "cache" - release first public version, which includes at least: - manpages + - only do necessary work + - install packages only if not existent + - copy file only if different + +Before initial release, document: + + - how to add package backends + - how to write a minimal host manifest + - create library with all functions (and their parameters) + - cdist_package + - cdist_file + - cdist_dir + + -------------------------------------------------------------------------------- Later: diff --git a/doc/internal/config-layout b/doc/internal/config-layout new file mode 100644 index 00000000..a4f62a2c --- /dev/null +++ b/doc/internal/config-layout @@ -0,0 +1,9 @@ +On the server: + +conf/hosts/init $hostname + => will be called by $whatever + => may source other files + => $__hosts_dir can be used to source other scripts + +Cached client: + Has generated file, which will be (re-)applied diff --git a/doc/man/cdist-design.text b/doc/man/cdist-design.text index c879978a..cdb0dcbd 100644 --- a/doc/man/cdist-design.text +++ b/doc/man/cdist-design.text @@ -36,6 +36,41 @@ When using cdist with the pull principle (configuration triggered by client): cdist-deploy-to(1) % server: see above -------------------------------------------------------------------------------- + +MERGE INTO ABOVE..... +## How cdist works + +### Exploring your system + +cdist analyses the system to apply the configuration on and +selects the right backends. You can use ***cdist-explore*** to +the results of the explore functions. + +### Applying the configuration + +cdist looks for the configuration to apply on the local host +and applies it using ***cdist-apply***. + +### Managing many hosts + +Whereas ***cdist-apply*** manages one host, ***cdist-deploy*** +applies the configuration on enabled hosts. + + - version control via git + - file distribution via ssh + - authentication via ssh + + - dumb clients, similar to manifest compile in puppet + - clients just execute commands + - dependencies via make? + - how to ensure sigletons / conflicting definitions? + file { "/a": + ensure => present, + file { "/a": + ensure => absent, + =>=>>>>>>>>>>>>>>>> via cconfig + + SEE ALSO -------- cdist(7), website: http://www.nico.schottelius.org/cdist/[] diff --git a/doc/man/cdist-language.text b/doc/man/cdist-language.text index 613a8fd3..d03afd20 100644 --- a/doc/man/cdist-language.text +++ b/doc/man/cdist-language.text @@ -29,6 +29,33 @@ The three stages are used to seperate configurations: - the library is shipped with cdist, but can be extendet locally + - DSL: Shell! + - gives if, else and EVEN elsif for free! + - and case + - and and and + - and there's no os (solaris doesn't count) without a usable /bin/sh + - cdist defines what you can use + - you _can_ use os specific stuff + - but it's ugly and you shoot into your own foot + - "manifests" (use the same name here?) will be run/sourced + - inheritance possible via sourcing + - cdist-lib always preloaded + - library == functions? + + - matching on explored items, not only on host name? + - match function in host? [optional] + - explorer ran before! + +- document exported variables! + use __ prefix instead of __cdist (shorter writing, __ is defined as sytem anyway) + +- library vs. modules? + +Requirements: + It MUST be incredible easy/dumb to add new types. + => growable default types + + SEE ALSO -------- diff --git a/doc/man/cdist-quickstart.text b/doc/man/cdist-quickstart.text new file mode 100644 index 00000000..0d447a59 --- /dev/null +++ b/doc/man/cdist-quickstart.text @@ -0,0 +1,5 @@ +## How to use cdist? + + 0. Create a host specification (/etc/cdist/hosts/**hostname**) + 0. Add functionalilty to add + 0. Run ***cdist-apply*** diff --git a/doc/man/cdist.text b/doc/man/cdist.text index b1b5fc2f..efc7433d 100644 --- a/doc/man/cdist.text +++ b/doc/man/cdist.text @@ -20,120 +20,16 @@ internal configuration representation (cconfig), which again is used to generate an executable, which is run on the client (see cdist-language(7), cdist-design(7)). +To get your fingers dirty with cdist very quick, have +a look at cdist-quickstart(7). SEE ALSO -------- -cdist-deploy-to(1), website: http://www.nico.schottelius.org/cdist/[] +Website: http://www.nico.schottelius.org/cdist/[] COPYING ------- Copyright \(C) 2010 Nico Schottelius. Free use of this software is granted under the terms of the GNU General Public License version 3 (GPLv3). - --------------------------------------------------------------------------------- - - -## How cdist works - -### Exploring your system - -cdist analyses the system to apply the configuration on and -selects the right backends. You can use ***cdist-explore*** to -the results of the explore functions. - -### Applying the configuration - -cdist looks for the configuration to apply on the local host -and applies it using ***cdist-apply***. - -### Managing many hosts - -Whereas ***cdist-apply*** manages one host, ***cdist-deploy*** -applies the configuration on enabled hosts. - -## How to use cdist? - - 0. Create a host specification (/etc/cdist/hosts/**hostname**) - 0. Add functionalilty to add - 0. Run ***cdist-apply*** - - --------------------------------------------------------------------------------- -Simple stuff done by Unix[notm] - - - DSL: Shell! - - gives if, else and EVEN elsif for free! - - and case - - and and and - - and there's no os (solaris doesn't count) without a usable /bin/sh - - cdist defines what you can use - - you _can_ use os specific stuff - - but it's ugly and you shoot into your own foot - - "manifests" (use the same name here?) will be run/sourced - - inheritance possible via sourcing - - cdist-lib always preloaded - - library == functions? - - version control via git - - file distribution via ssh - - authentication via ssh - - dumb clients, similar to manifest compile in puppet - - clients just execute commands - - dependencies via make? - - how to ensure sigletons / conflicting definitions? - file { "/a": - ensure => present, - file { "/a": - ensure => absent, - - matching on explored items, not only on host name? - - match function in host? [optional] - - file source: - - relative to specification - - or absolute - - --------------------------------------------------------------------------------- -Implementation - - "cdist-server" - -> called by cron? - -> no need to reimplement scheduling - "cdist-explore" (facter replacement) - -> running on the client --------------------------------------------------------------------------------- -Requirements: - It MUST be incredible easy/dumb to add new types. - => growable default types - - --------------------------------------------------------------------------------- - - ## TO DOC - -Before initial release, document: - - - how to add package backends - - how to write a minimal host manifest - - create library with all functions (and their parameters) - - cdist_package - - cdist_file - - cdist_dir - - - only do necessary work - - install packages only if not existent - - copy file only if different - - - how to write a module - - module function autoloading via *.sh - - module "manifest"? - - create functions in *.sh - - name functions "modulename_function" - module hellow - function kitty - => hellow_kitty - - you are advised (not forced) to put files - to a subdirectory named "files" - - - From d39f3e7d3f923706c8aabb0bfe318c640dbc2aac Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 1 Nov 2010 16:30:16 +0100 Subject: [PATCH 0016/6109] define important todos Signed-off-by: Nico Schottelius --- TODO | 6 ++++-- doc/man/cdist-design.text | 11 +++++++---- doc/man/cdist-language.text | 11 +++++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index e7841d03..56abaed6 100644 --- a/TODO +++ b/TODO @@ -1,8 +1,10 @@ - doc: - cdist manpage (main manpage) - cleanup following man + their tree: - - cdist.text - - cdist-design.text + - cdist-language [IMPORTANT] + - cdist-design.text [IMPORTANT] + - cdist-push-pull + - cdist-quickstart - add terminology - define entry point - define modules / mix with library? diff --git a/doc/man/cdist-design.text b/doc/man/cdist-design.text index cdb0dcbd..6639e9fc 100644 --- a/doc/man/cdist-design.text +++ b/doc/man/cdist-design.text @@ -14,13 +14,16 @@ When using cdist with the push principle, the execution tree looks likes this: -------------------------------------------------------------------------------- % server - cdist-deploy-to(1) - cdist-build(1) + cdist-deploy-to(1) # main tool for deployment + cdist-config(1) # setup environment + cdist-build(1) # coordinates build process / dummy otherwise cdist-preprocess(1) # fills up variables with content cdist-explore(1) % client # explores client configuration - cdist-compile(1) # parses configuration, creates internal state in cconfig format, verifies + cdist-compile(1) # parses configuration, + # creates internal state in cconfig format, + # verifies configuration cdist-link(1) # uses cconfig output, creates executable - cdist-remote-exec(1) # + cdist-remote-exec(1) # coordinates remote execution, dummy otherwise cdist-transfer(1) # transfer executable to client cdist-execute(1) % client # execute resulting executable -------------------------------------------------------------------------------- diff --git a/doc/man/cdist-language.text b/doc/man/cdist-language.text index d03afd20..6ada06b4 100644 --- a/doc/man/cdist-language.text +++ b/doc/man/cdist-language.text @@ -55,6 +55,17 @@ Requirements: It MUST be incredible easy/dumb to add new types. => growable default types + - how to write a module + - module function autoloading via *.sh + - module "manifest"? + - create functions in *.sh + - name functions "modulename_function" + module hellow + function kitty + => hellow_kitty + + - you are advised (not forced) to put files + to a subdirectory named "files" SEE ALSO -------- From 4542ee5735d466a4eb7371929cf20a876ee3b5e2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 2 Nov 2010 12:30:06 +0100 Subject: [PATCH 0017/6109] add logfile Signed-off-by: Nico Schottelius --- doc/internal/2010-11-02.steven | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 doc/internal/2010-11-02.steven diff --git a/doc/internal/2010-11-02.steven b/doc/internal/2010-11-02.steven new file mode 100644 index 00000000..540420d3 --- /dev/null +++ b/doc/internal/2010-11-02.steven @@ -0,0 +1,42 @@ +- Remote exec: always into file for debug purposes? +- Argumente via evn(TYPNAME_PROPERTYNAME)? +- Kleber zwischen package/provider/pacman/install und type/package/ muss in type oder sein! +- $somebody defines default / mapping from $type to $provider + - may depend on $explore_variables + +- Alternativ dir structure? + $basedir/$type/ + properties/ + name/ + required # required | optional + choices # \n liste + + + meta/ + default (shell script) + providers/ + pukman/ + +- allow user to add or overwrite types, providers, etc. + +- property vs. option vs. parameter vs. attribute vs. mittagessen + +! cleanly define interface between type/provider and cdist core + - easy documentation generatior + - cool error messages + - up-to-date documentation + - validation of user input possible before type called (compile stage) + +- find $type => list of ${parameters/term to be defined/see above} + +- __package apache [--name nginx] + - type package defines mapping of unique id to ${parameters/term to be defined/see above} + - if --name given, creates config entry below apache + +- type2cconfig: define! +- steven: git!!!!!!!!!! [TODAY!!!!!!!!!] +- client status als cconfig => diff possibility + - vs. provider checks && cares abuot what todo + +- register creation in cconfig tree to find out how created the first entry!!! + - to warn user "created x already at y, trying to recreate at z" From 20a79673328fc5a26fad6a65a8c0f9add7c98999 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 9 Nov 2010 20:27:41 -0800 Subject: [PATCH 0018/6109] add some thoughts Signed-off-by: Nico Schottelius --- doc/internal/logs/2010-11-09 | 101 +++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 doc/internal/logs/2010-11-09 diff --git a/doc/internal/logs/2010-11-09 b/doc/internal/logs/2010-11-09 new file mode 100644 index 00000000..fb047add --- /dev/null +++ b/doc/internal/logs/2010-11-09 @@ -0,0 +1,101 @@ +Rethinking ideas of last talk. + +What if types are formal / have formal arguments? +What if cdist can do all the parsing stuff and the real +functionality comes out of the library (similar to cfengine)? + +What if the library is integral part of cdist? + + +conf/lib/$name/ + attributes/ + a + b + c + + +-------------------------------------------------------------------------------- +I'm not sure whether this design is in fact helpful. +But it's clearly necessary to have a directory per type, so a type can +have helpers. + + +conf/lib/$name/ + init? + + +Prepare some very minimal (non functional) framework for library integration? + Like parsing for command line arguments? + +-------------------------------------------------------------------------------- +Real configurations versus types: + +Types are reusable code: For instance etc_resolv. + +Configurations are types used and configured. + + +-------------------------------------------------------------------------------- + +Style + + __type --option1 + +seems to be quite good usable. cdist can easily -----parse--- this. + +Nope. We don't parse. We let the shell execute. + +So whatever is __type will get executed. + +__type must probably be part of some cdist specific path. + +Which again could be + + conf/lib/$name + +Which could result in the directory + + conf/lib/.$name for helpers + +That style could include a mandority --help, --args arguments +and would thus be independent of the language used (can, but does +not must be shell). + +How to solve standard configurations that way? + + EASY AS WELL! + + __type --option1 + + for instance + + __type . --option1 + + +-------------------------------------------------------------------------------- +Type paths + At least (at maximum)? 2: + user + system + + Easy to do. + +-------------------------------------------------------------------------------- +Types: Name types types or name types modules? + +-------------------------------------------------------------------------------- + +Where to place/start the configuration? + + wherever it is: name it configuration! + + +-------------------------------------------------------------------------------- +cdist installation / paths: + + /etc/cdist/ # CDIST_DIR + config/ # CONFIGDIR + types/ # USERTYPEDIR + + $prefix/lib/cdist/types/ # SYSTYPEDIR + + From fb3edeaa3d3f01deeaa336a924996d3f08514299 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 9 Nov 2010 21:13:28 -0800 Subject: [PATCH 0019/6109] more cdist ideas Signed-off-by: Nico Schottelius --- doc/internal/logs/2010-11-09 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/internal/logs/2010-11-09 b/doc/internal/logs/2010-11-09 index fb047add..c8f37e22 100644 --- a/doc/internal/logs/2010-11-09 +++ b/doc/internal/logs/2010-11-09 @@ -92,10 +92,13 @@ Where to place/start the configuration? -------------------------------------------------------------------------------- cdist installation / paths: - /etc/cdist/ # CDIST_DIR - config/ # CONFIGDIR - types/ # USERTYPEDIR + /etc/cdist/ # CDISTBASEDIR + config/ # CDISTCONFIGDIR + types/ # CDISTUSERTYPEDIR - $prefix/lib/cdist/types/ # SYSTYPEDIR + $prefix/lib/cdist/types/ # CDISTSYSTYPEDIR +cdist environment: + $__loaded_from # path where $type has been loaded from + PATH=$CDISTUSERTYPEDIR:$CDISTSYSTYPEDIR:$PATH From dbffd1404c7083bc6752070e87b76c501b42b901 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 9 Nov 2010 22:08:01 -0800 Subject: [PATCH 0020/6109] a lot of more thoughts Signed-off-by: Nico Schottelius --- doc/internal/logs/2010-11-09 | 76 ++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/doc/internal/logs/2010-11-09 b/doc/internal/logs/2010-11-09 index c8f37e22..aa283617 100644 --- a/doc/internal/logs/2010-11-09 +++ b/doc/internal/logs/2010-11-09 @@ -41,6 +41,9 @@ Style __type --option1 + = everything your filesystem permits, but may not start with a period ("."). + If == ., it setups the standard attributes. + seems to be quite good usable. cdist can easily -----parse--- this. Nope. We don't parse. We let the shell execute. @@ -102,3 +105,76 @@ cdist installation / paths: cdist environment: $__loaded_from # path where $type has been loaded from PATH=$CDISTUSERTYPEDIR:$CDISTSYSTYPEDIR:$PATH + +-------------------------------------------------------------------------------- +Recommendation (not a must): + Put helpers for types into the typedir/.$typename + + All types should be prefixed by "__" to prevent clashes with the system + binaries. +-------------------------------------------------------------------------------- +Type commands (__bla) could get generated by cdist and cdist could use that +to generate the actual cconfig part. + +This leads up to the next section + +-------------------------------------------------------------------------------- +How to write my own type named "coffee": + + Create the directory /etc/cdist/types/coffee/ + Create the file /etc/cdist/types/coffee/README containing a description of the type. + If your type supports attributes, create the directory /etc/cdist/types/coffee/attributes. + For each attribute, create the file + /etc/cdist/types/coffee/attributes/$attribute_name which contains + + a short description on the first line + then a blank line + then a long description (probably over several lines) + + If you think your type may be useful for others, submit it for inclusion + into cdist at cdist -- at -- l.schottelius.org. + + Create /etc/cdist/types/coffee/init which reads $configinput + (either via cconfig or via environment) and outputs a block of + shell code suitable for running on the client. + + +-------------------------------------------------------------------------------- + +cdist exec steps: + + - check for valid types, abort if user (re-)defined system types + - generate __type binaries (aliases?), which contains cdist logic + to analyse types and check for correct arguments + - execute /etc/cdist/config/init (MAIN CONFIG) which in turn + calls __type binaries + - __type binaries (which are all the same, multicall!) generate + cconfig + - Run real type/init binaries with respective cconfig dir as path, + which must generate shellcode to be executed. + - Create the temporary shellscript containing all the code and execute + it on the client. + +-------------------------------------------------------------------------------- +Support metaargs like --depends? + If so, they need to be forbidden for types. +-------------------------------------------------------------------------------- +Shell code generator: + + - use subshells for each shellcodeblock + - create one main function (to ensure transfer is complete) + +Example: + +cdist_apply_$hostname() +{ + + # repeat this block for every type/id defined + echo "Executing block from $type_$id ..." + ( + code + ) + +} + +cdist_apply_$hostname From 49427ea1d89209cd9058325cb54549d16e238496 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 29 Nov 2010 18:38:50 +0100 Subject: [PATCH 0021/6109] add docs Signed-off-by: Nico Schottelius --- doc/internal/logs/2010-11-21 | 4 ++++ doc/internal/logs/2010-11-29 | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 doc/internal/logs/2010-11-21 create mode 100644 doc/internal/logs/2010-11-29 diff --git a/doc/internal/logs/2010-11-21 b/doc/internal/logs/2010-11-21 new file mode 100644 index 00000000..bbf283ae --- /dev/null +++ b/doc/internal/logs/2010-11-21 @@ -0,0 +1,4 @@ +Ideas: + - rollback auf versionen + - backup + diff --git a/doc/internal/logs/2010-11-29 b/doc/internal/logs/2010-11-29 new file mode 100644 index 00000000..844d71ae --- /dev/null +++ b/doc/internal/logs/2010-11-29 @@ -0,0 +1,4 @@ +- $type is handled by cdist and generates cconfig +- $type itself gets called by cdist after cconfig generation + - $path as argument + - or chroot From 30e0d2e92009710decd4f28a1f4a67fe3f2d7415 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 1 Dec 2010 19:48:57 +0100 Subject: [PATCH 0022/6109] add script to handle tree generation Signed-off-by: Nico Schottelius --- test/cdist-cconfig-tree | 68 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100755 test/cdist-cconfig-tree diff --git a/test/cdist-cconfig-tree b/test/cdist-cconfig-tree new file mode 100755 index 00000000..95218e0d --- /dev/null +++ b/test/cdist-cconfig-tree @@ -0,0 +1,68 @@ +#!/bin/sh +# +# 2010 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 . +# +# +# Let's build a cconfig tree from a generic configuration (example) +# + +#[ $# -eq 1 ] || __cdist_usage "cconf" + +. cdist-config + +set -ax +# all types cdist is aware of +export cdist_types="file service user" + +# the file that contains mapping from hosts to types +# we will execute this later +config_base="./cdist_config_base" + +cdist_tree_wrapper="./cdist_tree_wrapper" + +# used to build the tree and other stuff +tmpdir=/tmp/cdist-test-hardcoded +export cdist_bindir="${tmpdir}/bin" + +################################################################################ +# Begin execution + +cdist_tree_wrapper_name=${cdist_tree_wrapper##*/} +cdist_tree_wrapper_absdir=$(cd ${cdist_tree_wrapper%/*} && pwd -P) +cdist_tree_wrapper_abs="$cdist_tree_wrapper_absdir/$cdist_tree_wrapper_name" + + +rm -rf "${tmpdir}" + +# contains cdist-tree binaries +mkdir -p "${cdist_bindir}" +#ln -s "${cdist_tree_wrapper_abs}" "${bindir}" +( + set -e + cd "${cdist_bindir}" + for bin in $cdist_types; do + ln -s "${cdist_tree_wrapper_abs}" "${bin}" + done +) + + + +# Cdist_tree_wrapper does not need any other tool, so remove them from the path. +unset PATH + + From 603b0bb6abf6a38800a1ccbbfedbcb494a4ba050 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 1 Dec 2010 19:52:34 +0100 Subject: [PATCH 0023/6109] add first version of cdist_tree_wrapper Signed-off-by: Nico Schottelius --- test/cdist_tree_wrapper | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 test/cdist_tree_wrapper diff --git a/test/cdist_tree_wrapper b/test/cdist_tree_wrapper new file mode 100755 index 00000000..fb9cd626 --- /dev/null +++ b/test/cdist_tree_wrapper @@ -0,0 +1,28 @@ +#!/bin/sh +# +# 2010 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 . +# +# +# Wrapper script that generates cconfig from arguments +# + +#[ $# -eq 1 ] || __cdist_usage "cconf" + +. cdist-config + +echo "I am $__cdist_myname and have been called with $@" From 60a6051cf89a47ee9e401f79471b323d11411581 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 1 Dec 2010 19:58:58 +0100 Subject: [PATCH 0024/6109] add config base Signed-off-by: Nico Schottelius --- test/cdist_config_base | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 test/cdist_config_base diff --git a/test/cdist_config_base b/test/cdist_config_base new file mode 100755 index 00000000..d27c9813 --- /dev/null +++ b/test/cdist_config_base @@ -0,0 +1,26 @@ +#!/bin/sh +# +# 2010 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 . +# +# +# Define configuration, currently global, add matches later! +# + +__file /usr/bin/cdist --source /from/outer/space +__user hal --uid 9000 +__service puppet --status disabled From 2f415ad24006f687a2484d05969782fb04e25186 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 1 Dec 2010 20:01:39 +0100 Subject: [PATCH 0025/6109] add breaking if var not defined, execute config base Signed-off-by: Nico Schottelius --- test/cdist-cconfig-tree | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/test/cdist-cconfig-tree b/test/cdist-cconfig-tree index 95218e0d..10fe3903 100755 --- a/test/cdist-cconfig-tree +++ b/test/cdist-cconfig-tree @@ -25,7 +25,7 @@ . cdist-config -set -ax +set -aux # all types cdist is aware of export cdist_types="file service user" @@ -37,7 +37,9 @@ cdist_tree_wrapper="./cdist_tree_wrapper" # used to build the tree and other stuff tmpdir=/tmp/cdist-test-hardcoded -export cdist_bindir="${tmpdir}/bin" +cdist_bindir="${tmpdir}/bin" + +cdist_type_prefix="__" ################################################################################ # Begin execution @@ -56,13 +58,20 @@ mkdir -p "${cdist_bindir}" set -e cd "${cdist_bindir}" for bin in $cdist_types; do - ln -s "${cdist_tree_wrapper_abs}" "${bin}" + ln -s "${cdist_tree_wrapper_abs}" "${cdist_type_prefix}${bin}" done ) - - # Cdist_tree_wrapper does not need any other tool, so remove them from the path. -unset PATH +#unset PATH +# prepend our path +PATH="${cdist_bindir}:$PATH" +# force -x, so the user is aware the file is executed +if [ -x "${config_base}" ]; then + "${config_base}" +else + echo Throw some error, as you forgot to +x it. + exit 1 +fi From 3709be353b884f2fece299431829650284cdd8a5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 1 Dec 2010 20:06:07 +0100 Subject: [PATCH 0026/6109] Hack around with readme Signed-off-by: Nico Schottelius --- HACHERS_README | 18 ++++++++++++++++++ README | 50 +------------------------------------------------- REAL_README | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+), 49 deletions(-) create mode 100644 HACHERS_README mode change 100644 => 120000 README create mode 100644 REAL_README diff --git a/HACHERS_README b/HACHERS_README new file mode 100644 index 00000000..908292f9 --- /dev/null +++ b/HACHERS_README @@ -0,0 +1,18 @@ +Hey hackers, + +cdist has not been published, you're accessing a early in developent +code. + +Do not believe anything written in cdist, besides what's written in this file +(everything else may be future stuff for the initial release). + + -- Nico, 20101201 + + +What you can do so far: + +# prepare use: +export PATH="$PATH:$(pwd -P)/bin" + +## Test config tree wrapper +cd test && ./cdist-cconfig-tree diff --git a/README b/README deleted file mode 100644 index 42cb1784..00000000 --- a/README +++ /dev/null @@ -1,49 +0,0 @@ -## Introduction - -cdist configures your system. It is similar to -[cfengine](http://www.cfengine.org/) and [puppet](http://www.puppetlabs.com/). -It is inspired by both of those tools: - - * Try to redo the great power you get - * But leave out the bugs you also got - -And cdist is UNIX: - -It's designed to -reuse existing tools, -it does not require high level scripting language interpreters -and it is equipped with manpages. - -### Architecture - - * KISS (keep it simple and stupid) - * Allow very easy extension of cdist (creating own types for instance) - * Push (server pushes configuration) and Pull (client retrieves config) supported - * User defines configuration in shell scripts using cdist functions - * Cdist generates internal configuration (cconfig style) and afterwards applies configuration - -## Requirements - -### Server - - * A posix like shell - * SSH-Client (for push architecture) - * SSH-Server (for pull architecture) - -### Client - - * A posix like shell - * SSH-Client (for pull architecture) - * SSH-Server (for push architecture) - -## How to get cdist - - git clone git://git.schottelius.org/cdist - -## How to install cdist - - make install - -## How to use cdist - - man cdist diff --git a/README b/README new file mode 120000 index 00000000..c1247abd --- /dev/null +++ b/README @@ -0,0 +1 @@ +HACHERS_README \ No newline at end of file diff --git a/REAL_README b/REAL_README new file mode 100644 index 00000000..42cb1784 --- /dev/null +++ b/REAL_README @@ -0,0 +1,49 @@ +## Introduction + +cdist configures your system. It is similar to +[cfengine](http://www.cfengine.org/) and [puppet](http://www.puppetlabs.com/). +It is inspired by both of those tools: + + * Try to redo the great power you get + * But leave out the bugs you also got + +And cdist is UNIX: + +It's designed to +reuse existing tools, +it does not require high level scripting language interpreters +and it is equipped with manpages. + +### Architecture + + * KISS (keep it simple and stupid) + * Allow very easy extension of cdist (creating own types for instance) + * Push (server pushes configuration) and Pull (client retrieves config) supported + * User defines configuration in shell scripts using cdist functions + * Cdist generates internal configuration (cconfig style) and afterwards applies configuration + +## Requirements + +### Server + + * A posix like shell + * SSH-Client (for push architecture) + * SSH-Server (for pull architecture) + +### Client + + * A posix like shell + * SSH-Client (for pull architecture) + * SSH-Server (for push architecture) + +## How to get cdist + + git clone git://git.schottelius.org/cdist + +## How to install cdist + + make install + +## How to use cdist + + man cdist From e6819f6331c1dcb45f19b5df200ed8bccc518e13 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 1 Dec 2010 20:07:58 +0100 Subject: [PATCH 0027/6109] remove debug Signed-off-by: Nico Schottelius --- test/cdist-cconfig-tree | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/cdist-cconfig-tree b/test/cdist-cconfig-tree index 10fe3903..a69fe525 100755 --- a/test/cdist-cconfig-tree +++ b/test/cdist-cconfig-tree @@ -25,7 +25,8 @@ . cdist-config -set -aux +set -au + # all types cdist is aware of export cdist_types="file service user" From ca82a0d4a01e9f5f4fd4dea90723e4ebf31f0288 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 1 Dec 2010 20:10:42 +0100 Subject: [PATCH 0028/6109] disable library loading Signed-off-by: Nico Schottelius --- bin/cdist-config | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 7f4124b7..4963ae7a 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -57,12 +57,13 @@ __cdist_usage() #set -e -# load libraries so every program has them available -find "${CDIST_LIBDIR}" -type f > "${CDIST_TMP}" -while read __cdist_lib; do - __cdist_debug_echo "Loading $__cdist_lib ..." - . "${__cdist_lib}" -done < "${CDIST_TMP}" +# load libraries so every program has them available - FIXME +## find "${CDIST_LIBDIR}" -type f > "${CDIST_TMP}" +## while read __cdist_lib; do +## __cdist_debug_echo "Loading $__cdist_lib ..." +## . "${__cdist_lib}" +## done < "${CDIST_TMP}" +## # load modules, all parts => really #find "${CDIST_MODULES}" -name manifest > "${CDIST_TMP}" From 1944110b42d0283735290e33f03cc456bf095a42 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 1 Dec 2010 20:33:25 +0100 Subject: [PATCH 0029/6109] check for sane id Signed-off-by: Nico Schottelius --- test/cdist_tree_wrapper | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/cdist_tree_wrapper b/test/cdist_tree_wrapper index fb9cd626..429237ff 100755 --- a/test/cdist_tree_wrapper +++ b/test/cdist_tree_wrapper @@ -21,8 +21,17 @@ # Wrapper script that generates cconfig from arguments # -#[ $# -eq 1 ] || __cdist_usage "cconf" . cdist-config +[ $# -ge 1 ] || __cdist_usage " " + echo "I am $__cdist_myname and have been called with $@" + +id="$1"; shift + +# FIXME: find a better definiton of sane (i.e. everything that is a valid filename) +echo "$id" | grep -q '^[A-Za-z0-9]*$' || __cdist_usage "Provide sane id, please" + + +echo mkdir -p "${cdist_confdir}/${__cdist_myname}/${id}" From a78eb819516c0c2add3953d94a30aaebce5936f3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 1 Dec 2010 20:34:41 +0100 Subject: [PATCH 0030/6109] expand definition of sane to _ Signed-off-by: Nico Schottelius --- test/cdist_tree_wrapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cdist_tree_wrapper b/test/cdist_tree_wrapper index 429237ff..709955c1 100755 --- a/test/cdist_tree_wrapper +++ b/test/cdist_tree_wrapper @@ -31,7 +31,7 @@ echo "I am $__cdist_myname and have been called with $@" id="$1"; shift # FIXME: find a better definiton of sane (i.e. everything that is a valid filename) -echo "$id" | grep -q '^[A-Za-z0-9]*$' || __cdist_usage "Provide sane id, please" +echo "$id" | grep -q '^[A-Za-z0-9_]*$' || __cdist_usage "Provide sane id, please" echo mkdir -p "${cdist_confdir}/${__cdist_myname}/${id}" From e06c0824dcd68f9f767c1c3db4237feb183cf223 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 1 Dec 2010 20:48:15 +0100 Subject: [PATCH 0031/6109] add some checks, more types Signed-off-by: Nico Schottelius --- test/cdist-cconfig-tree | 12 +++++++++--- test/cdist_config_base | 8 +++++++- test/cdist_tree_wrapper | 24 ++++++++++++++++++++++-- 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/test/cdist-cconfig-tree b/test/cdist-cconfig-tree index a69fe525..dfe954ba 100755 --- a/test/cdist-cconfig-tree +++ b/test/cdist-cconfig-tree @@ -32,13 +32,14 @@ export cdist_types="file service user" # the file that contains mapping from hosts to types # we will execute this later -config_base="./cdist_config_base" +cdist_config_base="./cdist_config_base" cdist_tree_wrapper="./cdist_tree_wrapper" # used to build the tree and other stuff tmpdir=/tmp/cdist-test-hardcoded cdist_bindir="${tmpdir}/bin" +cdist_confdir="${tmpdir}/conf" cdist_type_prefix="__" @@ -69,10 +70,15 @@ mkdir -p "${cdist_bindir}" # prepend our path PATH="${cdist_bindir}:$PATH" +# create output dir +mkdir -p "${cdist_confdir}" + # force -x, so the user is aware the file is executed -if [ -x "${config_base}" ]; then - "${config_base}" +if [ -x "${cdist_config_base}" ]; then + "${cdist_config_base}" else echo Throw some error, as you forgot to +x it. exit 1 fi + +echo "Finished tree generation, have a look at ${cdist_confdir}." diff --git a/test/cdist_config_base b/test/cdist_config_base index d27c9813..900fc19d 100755 --- a/test/cdist_config_base +++ b/test/cdist_config_base @@ -21,6 +21,12 @@ # Define configuration, currently global, add matches later! # -__file /usr/bin/cdist --source /from/outer/space +__file cdist_bin --source /from/outer/space --destination /to/earth __user hal --uid 9000 __service puppet --status disabled + +# fails +__service puppet --status duplicated + +# fails +__service time --missing diff --git a/test/cdist_tree_wrapper b/test/cdist_tree_wrapper index 709955c1..f8f0a602 100755 --- a/test/cdist_tree_wrapper +++ b/test/cdist_tree_wrapper @@ -31,7 +31,27 @@ echo "I am $__cdist_myname and have been called with $@" id="$1"; shift # FIXME: find a better definiton of sane (i.e. everything that is a valid filename) -echo "$id" | grep -q '^[A-Za-z0-9_]*$' || __cdist_usage "Provide sane id, please" +sanechars='[A-Za-z0-9_]' + +echo "$id" | grep -q "^${sanechars}*\$" || __cdist_usage "Provide sane id, please" + +if [ -e "${cdist_confdir}/${__cdist_myname}/${id}" ]; then + # FIXME: add source! $cdist_config_base/source + __cdist_usage "${__cdist_myname}/${id} already exists" +fi + +mkdir -p "${cdist_confdir}/${__cdist_myname}/${id}" + +while [ $# -gt 0 ]; do + opt="$1"; shift + + echo "$opt" | grep -q "^--${sanechars}*\$" || __cdist_usage "Provide sane options" -echo mkdir -p "${cdist_confdir}/${__cdist_myname}/${id}" + [ $# -ge 1 ] || __cdist_usage "Missing value for $opt" + + value="$1"; shift + + + +done From 860271f625d714f229c613887d7c2c1d280790ca Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 1 Dec 2010 20:53:26 +0100 Subject: [PATCH 0032/6109] tree creation complete Signed-off-by: Nico Schottelius --- test/cdist_tree_wrapper | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/cdist_tree_wrapper b/test/cdist_tree_wrapper index f8f0a602..a088844e 100755 --- a/test/cdist_tree_wrapper +++ b/test/cdist_tree_wrapper @@ -35,23 +35,29 @@ sanechars='[A-Za-z0-9_]' echo "$id" | grep -q "^${sanechars}*\$" || __cdist_usage "Provide sane id, please" -if [ -e "${cdist_confdir}/${__cdist_myname}/${id}" ]; then +tid="${__cdist_myname}/${id}" +ddir="${cdist_confdir}/${tid}" + +if [ -e "${ddir}" ]; then # FIXME: add source! $cdist_config_base/source - __cdist_usage "${__cdist_myname}/${id} already exists" + __cdist_usage "${tid} already exists" fi -mkdir -p "${cdist_confdir}/${__cdist_myname}/${id}" +mkdir -p "${ddir}" while [ $# -gt 0 ]; do opt="$1"; shift echo "$opt" | grep -q "^--${sanechars}*\$" || __cdist_usage "Provide sane options" + opt_file="$(echo $opt | sed 's/^--//')" [ $# -ge 1 ] || __cdist_usage "Missing value for $opt" value="$1"; shift + echo "${value}" > "${ddir}/${opt_file}" + done From 1e59e135198fb0d58b5ce78a27f3686d98597d3c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 14 Jan 2011 12:46:23 +0100 Subject: [PATCH 0033/6109] Added roadmap Signed-off-by: Nico Schottelius --- ROADMAP | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 ROADMAP diff --git a/ROADMAP b/ROADMAP new file mode 100644 index 00000000..e5ccf8f8 --- /dev/null +++ b/ROADMAP @@ -0,0 +1,9 @@ +This document defines how to continue work on cdist: + +x Define how to get information from clients + x Create shell script that creates code to run on client (cdist-build-explorer) +x Create configuration tree from manifest + x write binaries, which create the tree when called from manifest (cdist_tree_wrapper) +- Parse configuration tree +- Generate code to be executed on client +- Cleanup / refactor From 91f0f418458f19c8232ce5958c88a1434bf08b6b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 14 Jan 2011 12:46:51 +0100 Subject: [PATCH 0034/6109] some new ideas/comments Signed-off-by: Nico Schottelius --- test/cdist-cconfig-tree | 4 +++- test/cdist_tree_wrapper | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/test/cdist-cconfig-tree b/test/cdist-cconfig-tree index dfe954ba..74315a3d 100755 --- a/test/cdist-cconfig-tree +++ b/test/cdist-cconfig-tree @@ -31,7 +31,7 @@ set -au export cdist_types="file service user" # the file that contains mapping from hosts to types -# we will execute this later +# we will execute this later -- call this MANIFEST? cdist_config_base="./cdist_config_base" cdist_tree_wrapper="./cdist_tree_wrapper" @@ -56,6 +56,8 @@ rm -rf "${tmpdir}" # contains cdist-tree binaries mkdir -p "${cdist_bindir}" #ln -s "${cdist_tree_wrapper_abs}" "${bindir}" + +# Create our binaries, will are called from the manifest - temporary ( set -e cd "${cdist_bindir}" diff --git a/test/cdist_tree_wrapper b/test/cdist_tree_wrapper index a088844e..5abe6f7a 100755 --- a/test/cdist_tree_wrapper +++ b/test/cdist_tree_wrapper @@ -20,6 +20,9 @@ # # Wrapper script that generates cconfig from arguments # +# This script will be called everytime the manifest decides to create +# a new type +# . cdist-config @@ -40,6 +43,7 @@ ddir="${cdist_confdir}/${tid}" if [ -e "${ddir}" ]; then # FIXME: add source! $cdist_config_base/source + # FIXME: force $source information to be present from outside! __cdist_usage "${tid} already exists" fi @@ -52,6 +56,9 @@ while [ $# -gt 0 ]; do opt_file="$(echo $opt | sed 's/^--//')" + # FIXME: check for options supported by type - or leave it to the type? + # I guess do it here, so we also check whether + [ $# -ge 1 ] || __cdist_usage "Missing value for $opt" value="$1"; shift From 4cd599e5a100e813fd858535ccc8af5c54af0df6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 14 Jan 2011 12:47:44 +0100 Subject: [PATCH 0035/6109] update roadmap Signed-off-by: Nico Schottelius --- ROADMAP | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ROADMAP b/ROADMAP index e5ccf8f8..bdb734ee 100644 --- a/ROADMAP +++ b/ROADMAP @@ -4,6 +4,6 @@ x Define how to get information from clients x Create shell script that creates code to run on client (cdist-build-explorer) x Create configuration tree from manifest x write binaries, which create the tree when called from manifest (cdist_tree_wrapper) -- Parse configuration tree -- Generate code to be executed on client -- Cleanup / refactor +- Parse configuration tree / generate code to be executed on client + +- Cleanup / refactor / documentation From 58c349cd1fd811f6799c22980f4fab2805f19b2e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 14 Jan 2011 12:50:07 +0100 Subject: [PATCH 0036/6109] rename to manifest Signed-off-by: Nico Schottelius --- test/{cdist_config_base => EXAMPLE_MANIFEST} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/{cdist_config_base => EXAMPLE_MANIFEST} (100%) diff --git a/test/cdist_config_base b/test/EXAMPLE_MANIFEST similarity index 100% rename from test/cdist_config_base rename to test/EXAMPLE_MANIFEST From c6a27aa82acfc84a373339d319ae190f78af10df Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 01:23:18 +0100 Subject: [PATCH 0037/6109] more ideas Signed-off-by: Nico Schottelius --- ROADMAP | 4 ++++ bin/cdist-compile | 2 +- test/cdist-cconfig-tree | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ROADMAP b/ROADMAP index bdb734ee..320e2df2 100644 --- a/ROADMAP +++ b/ROADMAP @@ -5,5 +5,9 @@ x Define how to get information from clients x Create configuration tree from manifest x write binaries, which create the tree when called from manifest (cdist_tree_wrapper) - Parse configuration tree / generate code to be executed on client + - providers? + - can/may providers modify tree? + - may open door for getting information from manifest / other stuff - Cleanup / refactor / documentation +- Write providers, providers, providers, ... diff --git a/bin/cdist-compile b/bin/cdist-compile index 46083ea7..2e5b7f8d 100755 --- a/bin/cdist-compile +++ b/bin/cdist-compile @@ -23,4 +23,4 @@ [ $# -eq 1 ] || __cdist_usage "target" - +echo This script should run the manifest file diff --git a/test/cdist-cconfig-tree b/test/cdist-cconfig-tree index 74315a3d..fe3a8519 100755 --- a/test/cdist-cconfig-tree +++ b/test/cdist-cconfig-tree @@ -67,6 +67,7 @@ mkdir -p "${cdist_bindir}" ) # Cdist_tree_wrapper does not need any other tool, so remove them from the path. +# but the manifest may need so - FIXME: think about it. #unset PATH # prepend our path From a88dc3d8cf7424e51de005327747a67993d7d1ae Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 01:23:38 +0100 Subject: [PATCH 0038/6109] add log from 2010-12-01 Signed-off-by: Nico Schottelius --- doc/internal/logs/2010-12-01 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 doc/internal/logs/2010-12-01 diff --git a/doc/internal/logs/2010-12-01 b/doc/internal/logs/2010-12-01 new file mode 100644 index 00000000..f8ccd5f5 --- /dev/null +++ b/doc/internal/logs/2010-12-01 @@ -0,0 +1,32 @@ +what does a type contain? + + - possible explorer functions to find out about the system state + - scripts being run on the server, which inputs cconfig and generates code to + apply changes on the client + -> logs errors through stderr + -> + + - cdist takes all the type scripts, for each defined type + - when to run cdist-explorer tools from types? + - get general impression first and then consider tools? + + - what about the overwrites / order / inherits problem? + - is a "how to reuse x"-problem + - NO OVERWRITE POSSIBLE!!!!!!! + - once defined, no redefine + - record creator to issue warning on collision detection! + + + - "i want to do the same as x, but change a single bit" + - i call the other type under my own name and overwrite stuff afterwards + + - apache, tomcat, etc. + - + TYPECHANGES are good! + + - what is cm? + - copying files around + - changing files + - removing files + - put together in a context + From 0d53a0dca922a1462d090572622a120c7edc2d9c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 01:23:58 +0100 Subject: [PATCH 0039/6109] initial version of manpage for cdist-explorer Signed-off-by: Nico Schottelius --- doc/man/cdist-explorer.text | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 doc/man/cdist-explorer.text diff --git a/doc/man/cdist-explorer.text b/doc/man/cdist-explorer.text new file mode 100644 index 00000000..23a94eef --- /dev/null +++ b/doc/man/cdist-explorer.text @@ -0,0 +1,34 @@ +cdist-explorer-coordinator(1) +============================= +Nico Schottelius + + +NAME +---- +cdist-explorer-coordinator - Coordinate explorer on target systems + +DESCRIPTION +----------- + +The cdist-explorer-coordinator is responsible for getting information +about the target system. Its job is to find locally the available +explorers and prepare them for execution on the remote host. + +Each and every explorer may return the information from the target system, +which is assigned to a local variable of the name __explorer_EXPLORERNAME. + +NOTES +----- +The first version of the cdist-explorer-coordinator (named cdist-build-explorer) +used to create strings remote, taken literally. saves ssh, insecure. + +SEE ALSO +-------- +cdist(7) + + +COPYING +------- +Copyright \(C) 2010 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). + From 7792e45f491dd6197ed65cffa3a9c242b551306a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 14:06:23 +0100 Subject: [PATCH 0040/6109] +hook Signed-off-by: Nico Schottelius --- doc/internal/git-post-commit-hook | 108 +++++++++++++++++++++++++++ test/ssh-pseudo-interactive-explorer | 78 +++++++++++++++++++ 2 files changed, 186 insertions(+) create mode 100755 doc/internal/git-post-commit-hook create mode 100755 test/ssh-pseudo-interactive-explorer diff --git a/doc/internal/git-post-commit-hook b/doc/internal/git-post-commit-hook new file mode 100755 index 00000000..b16caa2a --- /dev/null +++ b/doc/internal/git-post-commit-hook @@ -0,0 +1,108 @@ +#!/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/test/ssh-pseudo-interactive-explorer b/test/ssh-pseudo-interactive-explorer new file mode 100755 index 00000000..81ad0db5 --- /dev/null +++ b/test/ssh-pseudo-interactive-explorer @@ -0,0 +1,78 @@ +#!/bin/sh +# +# 2010 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 . +# +# +# Let's build a cconfig tree from a generic configuration (example) +# + +d1="$(date)" +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +uname=$(ssh localhost "uname -r") +d2="$(date)" + +echo $d1 $d2 From 01fb29a02e007f79b7b8a0bdc80a717358127df3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 14:12:22 +0100 Subject: [PATCH 0041/6109] update roadmap Signed-off-by: Nico Schottelius --- ROADMAP | 1 + 1 file changed, 1 insertion(+) diff --git a/ROADMAP b/ROADMAP index 320e2df2..46d2a532 100644 --- a/ROADMAP +++ b/ROADMAP @@ -11,3 +11,4 @@ x Create configuration tree from manifest - Cleanup / refactor / documentation - Write providers, providers, providers, ... + - provider side: Steven From 5248d7e3af1e64586eb69553a8ea1f9d25ec7d6f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 14:15:05 +0100 Subject: [PATCH 0042/6109] begin to change config layout Signed-off-by: Nico Schottelius --- doc/internal/config-layout | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/internal/config-layout b/doc/internal/config-layout index a4f62a2c..104e44cc 100644 --- a/doc/internal/config-layout +++ b/doc/internal/config-layout @@ -1,9 +1,12 @@ On the server: -conf/hosts/init $hostname +conf/MANIFEST + - the central entry point + - is a shell script + - defines mapping from modules or providers to hosts => will be called by $whatever => may source other files - => $__hosts_dir can be used to source other scripts + => Cached client: Has generated file, which will be (re-)applied From f31d393a2f0d950f19317166de211a548a7c87a1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 14:16:25 +0100 Subject: [PATCH 0043/6109] move log into logsubdir Signed-off-by: Nico Schottelius --- doc/internal/{ => logs}/2010-11-02.steven | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/internal/{ => logs}/2010-11-02.steven (100%) diff --git a/doc/internal/2010-11-02.steven b/doc/internal/logs/2010-11-02.steven similarity index 100% rename from doc/internal/2010-11-02.steven rename to doc/internal/logs/2010-11-02.steven From ef47a7666b391049f4bbe47ee48bb2151f7b0ff0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 14:17:28 +0100 Subject: [PATCH 0044/6109] begin provider integration doc Signed-off-by: Nico Schottelius --- doc/internal/provider-integration | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 doc/internal/provider-integration diff --git a/doc/internal/provider-integration b/doc/internal/provider-integration new file mode 100644 index 00000000..5b164dd8 --- /dev/null +++ b/doc/internal/provider-integration @@ -0,0 +1,2 @@ +This document is a brainstorming document, +on how to integrate providers. From 986243dc26620fd6e8c58ed7e1cb1ef779742423 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 14:39:17 +0100 Subject: [PATCH 0045/6109] add gitignore Signed-off-by: Nico Schottelius --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..a01ee289 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.*.swp From 37f71db1a7c2cea30eae886d6b58a23eef2da7bc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 14:39:34 +0100 Subject: [PATCH 0046/6109] add ideas for implementation of explorer Signed-off-by: Nico Schottelius --- doc/internal/explorer-ideas | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/internal/explorer-ideas diff --git a/doc/internal/explorer-ideas b/doc/internal/explorer-ideas new file mode 100644 index 00000000..9006b66f --- /dev/null +++ b/doc/internal/explorer-ideas @@ -0,0 +1,12 @@ +1) safer and fast version + cat blob | ssh host > tmp; + for var in ... + var=grep ^var= tmp +2) slow & secure + for var in ... + eval var=$(cat single_blob | ssh host" + +3) easy & insecure + cat blob | ssh host > tmp; . tmp + + From 5c74b470f3f79663ad7f1f28e568ff9c04bff8d2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 14:39:52 +0100 Subject: [PATCH 0047/6109] +rename Signed-off-by: Nico Schottelius --- doc/internal/{explorer-ideas => explorer-implementation-ideas} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/internal/{explorer-ideas => explorer-implementation-ideas} (100%) diff --git a/doc/internal/explorer-ideas b/doc/internal/explorer-implementation-ideas similarity index 100% rename from doc/internal/explorer-ideas rename to doc/internal/explorer-implementation-ideas From a5f1348ca3123ddb77558738434706db183039f0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 14:47:43 +0100 Subject: [PATCH 0048/6109] more ideas on provider integration Signed-off-by: Nico Schottelius --- doc/internal/provider-integration | 42 ++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/doc/internal/provider-integration b/doc/internal/provider-integration index 5b164dd8..2e33a9fc 100644 --- a/doc/internal/provider-integration +++ b/doc/internal/provider-integration @@ -1,2 +1,42 @@ This document is a brainstorming document, -on how to integrate providers. +on how to integrate providers. Providers +had been "type" in previous discussion. + +Proposed/discussed structures: + +1) 2010-11-02 + $basedir/$type/ + properties/ + name/ + required # required | optional + choices # \n liste + + + meta/ + default (shell script) + providers/ + pukman/ + +2) 2010-11-09 + +How to write my own type named "coffee": + + Create the directory /etc/cdist/types/coffee/ + Create the file /etc/cdist/types/coffee/README containing a description of the +type. + If your type supports attributes, create the directory /etc/cdist/types/coffee/ +attributes. + For each attribute, create the file + /etc/cdist/types/coffee/attributes/$attribute_name which contains + + a short description on the first line + then a blank line + then a long description (probably over several lines) + + If you think your type may be useful for others, submit it for inclusion + into cdist at cdist -- at -- l.schottelius.org. + + Create /etc/cdist/types/coffee/init which reads $configinput + (either via cconfig or via environment) and outputs a block of + shell code suitable for running on the client. + From 02a272ecc20395de701ce5d07d3fd29026beee13 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 14:48:56 +0100 Subject: [PATCH 0049/6109] more todo in the roadmap Signed-off-by: Nico Schottelius --- ROADMAP | 1 + 1 file changed, 1 insertion(+) diff --git a/ROADMAP b/ROADMAP index 46d2a532..b3b36c8d 100644 --- a/ROADMAP +++ b/ROADMAP @@ -4,6 +4,7 @@ x Define how to get information from clients x Create shell script that creates code to run on client (cdist-build-explorer) x Create configuration tree from manifest x write binaries, which create the tree when called from manifest (cdist_tree_wrapper) +- Define configuration paths - Parse configuration tree / generate code to be executed on client - providers? - can/may providers modify tree? From 87324ae7f413f0d34ea16cf817c8bd5a6c28ca09 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 15:37:48 +0100 Subject: [PATCH 0050/6109] add doc hint on providers Signed-off-by: Nico Schottelius --- ROADMAP | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ROADMAP b/ROADMAP index b3b36c8d..48242e81 100644 --- a/ROADMAP +++ b/ROADMAP @@ -4,7 +4,7 @@ x Define how to get information from clients x Create shell script that creates code to run on client (cdist-build-explorer) x Create configuration tree from manifest x write binaries, which create the tree when called from manifest (cdist_tree_wrapper) -- Define configuration paths +- Define configuration paths (doc/internal/config-layout) - Parse configuration tree / generate code to be executed on client - providers? - can/may providers modify tree? @@ -12,4 +12,5 @@ x Create configuration tree from manifest - Cleanup / refactor / documentation - Write providers, providers, providers, ... + doc/internal/provider-integration - provider side: Steven From 3403c1dd720b1ef48987a39eafbbf847e25582b0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 15:38:05 +0100 Subject: [PATCH 0051/6109] more thoughs about config layout and types Signed-off-by: Nico Schottelius --- doc/internal/config-layout | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/doc/internal/config-layout b/doc/internal/config-layout index 104e44cc..3f4d55da 100644 --- a/doc/internal/config-layout +++ b/doc/internal/config-layout @@ -4,9 +4,24 @@ conf/MANIFEST - the central entry point - is a shell script - defines mapping from modules or providers to hosts - => will be called by $whatever - => may source other files - => + - can call other MANIFESTs in modules + - will be called by $whatever and relative path + will be setup for source tracking: -Cached client: +conf/providers// + - provide standard types + - may make use of other providers to realise a new type + - how to overwrite stuff? + - overwrite in own tree? + - needs knowledge of inherited provider + - similar to current situation in puppet, + but more like reusable defines + - or may implement some functionality on their own + +conf/modules// + - configuration put together + - needed additionally to providers? + - perhaps as singletons / objects of class? + +Cached client: ??????? Has generated file, which will be (re-)applied From d9a06c881a4f6b435fa3181d5ef45dbd29e3fc18 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 15:42:19 +0100 Subject: [PATCH 0052/6109] cleanup config layout Signed-off-by: Nico Schottelius --- doc/internal/config-layout | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/doc/internal/config-layout b/doc/internal/config-layout index 3f4d55da..8d367552 100644 --- a/doc/internal/config-layout +++ b/doc/internal/config-layout @@ -8,7 +8,7 @@ conf/MANIFEST - will be called by $whatever and relative path will be setup for source tracking: -conf/providers// +conf/providers// - provide standard types - may make use of other providers to realise a new type - how to overwrite stuff? @@ -18,10 +18,6 @@ conf/providers// but more like reusable defines - or may implement some functionality on their own -conf/modules// - - configuration put together - - needed additionally to providers? - - perhaps as singletons / objects of class? - -Cached client: ??????? - Has generated file, which will be (re-)applied +lib/providers// + - same as above, but included into cdist distribution + - if name exists in both, conf/ has priority From 7d00bd8b121ba134de113d4d62b8b1e4f9e0a4ba Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 17:32:15 +0100 Subject: [PATCH 0053/6109] more ideas for the config layout Signed-off-by: Nico Schottelius --- doc/internal/config-layout | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/internal/config-layout b/doc/internal/config-layout index 8d367552..e318a76c 100644 --- a/doc/internal/config-layout +++ b/doc/internal/config-layout @@ -10,6 +10,8 @@ conf/MANIFEST conf/providers// - provide standard types + - have required and optional arguments + - are independent of hosts - may make use of other providers to realise a new type - how to overwrite stuff? - overwrite in own tree? From c103e5ab18ba8b3aa312a42874c76d9f62ba06c2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 17:39:59 +0100 Subject: [PATCH 0054/6109] propose solution for: know what's running on other hosts-problem Signed-off-by: Nico Schottelius --- doc/internal/knowledge-about-other-hosts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 doc/internal/knowledge-about-other-hosts diff --git a/doc/internal/knowledge-about-other-hosts b/doc/internal/knowledge-about-other-hosts new file mode 100644 index 00000000..b513e340 --- /dev/null +++ b/doc/internal/knowledge-about-other-hosts @@ -0,0 +1,18 @@ +Assume you want to configure stuff one host ("monitor node"), +depending on the configuration of other hosts ("cluster nodes"). + +For instance, the monitor host would like to know, +which hosts are configured with the provider +"apache" and option --start true. + +This requires the monitor node to be able to +query all other configured nodes. It can't +ask for all hosts, because cdist does not +know which hosts are configured or may exist. + +Example implementation + +If cdist keeps ("caches") the configuration of every +node it configures, each new node can query the +cache for existing nodes that acquired the given +configuration. From 89a2856141da14a31a3aeaf87954765b17b4af73 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 17:44:41 +0100 Subject: [PATCH 0055/6109] clearify manifests, remove modules Signed-off-by: Nico Schottelius --- doc/internal/config-layout | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/doc/internal/config-layout b/doc/internal/config-layout index e318a76c..472d9466 100644 --- a/doc/internal/config-layout +++ b/doc/internal/config-layout @@ -1,12 +1,18 @@ On the server: -conf/MANIFEST +conf/manifests/init - the central entry point - is a shell script - - defines mapping from modules or providers to hosts - - can call other MANIFESTs in modules - - will be called by $whatever and relative path - will be setup for source tracking: + - defines mapping from providers to hosts + - will be called by cdist and the name + will be available for tracking in + cdist core functions + +core/manifests/* (all other) + - same function as above + - but won't be called by cdist + - method to seperate configuration parts + conf/providers// - provide standard types @@ -21,5 +27,5 @@ conf/providers// - or may implement some functionality on their own lib/providers// - - same as above, but included into cdist distribution + - same as above, but provided by the cdist distribution - if name exists in both, conf/ has priority From a836b9208231c489b9221c95812cd5c8036b1b15 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 17:55:31 +0100 Subject: [PATCH 0056/6109] describe main differences of manifests vs. providers Signed-off-by: Nico Schottelius --- doc/internal/config-layout | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/internal/config-layout b/doc/internal/config-layout index 472d9466..63742035 100644 --- a/doc/internal/config-layout +++ b/doc/internal/config-layout @@ -29,3 +29,12 @@ conf/providers// lib/providers// - same as above, but provided by the cdist distribution - if name exists in both, conf/ has priority + +Differences manifests vs. providers + + + manifests providers + +main purpose map config to host provide functionality +can change config no (prevent conflicts) yes (allow inheritance) +specificness site specific (globally) reusable From fb3965044afd8dcbc20c67d4679efc4a9cdeac3d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 18:00:14 +0100 Subject: [PATCH 0057/6109] fix cdist-cconfig-tree to use new temporay name Signed-off-by: Nico Schottelius --- test/cdist-cconfig-tree | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cdist-cconfig-tree b/test/cdist-cconfig-tree index fe3a8519..106be5a9 100755 --- a/test/cdist-cconfig-tree +++ b/test/cdist-cconfig-tree @@ -32,7 +32,7 @@ export cdist_types="file service user" # the file that contains mapping from hosts to types # we will execute this later -- call this MANIFEST? -cdist_config_base="./cdist_config_base" +cdist_config_base="./EXAMPLE_MANIFEST" cdist_tree_wrapper="./cdist_tree_wrapper" From c1b548da49fa1d8e64046ad96271b543877a3053 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 18:02:01 +0100 Subject: [PATCH 0058/6109] cdist vs. providers Signed-off-by: Nico Schottelius --- doc/internal/provider-integration | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/internal/provider-integration b/doc/internal/provider-integration index 2e33a9fc..1e25e77b 100644 --- a/doc/internal/provider-integration +++ b/doc/internal/provider-integration @@ -40,3 +40,22 @@ attributes. (either via cconfig or via environment) and outputs a block of shell code suitable for running on the client. + + +-------------------------------------------------------------------------------- +cdist view on providers: + +How providers are integrated/run: + + - If cdist encounters provider in manifest, + a wrapper script is run, that creates a + new entry in the cconfig database and adds + attribute values: + + conf/__file/cdist_bin/source + conf/__file/cdist_bin/destination + + - In this stage, no conflicts may occur, as + no provider code has been called (i.e. only + manifests, which map config to hosts is + applied). From 5da17d9805e2a63574dce4c974734e232ae7dd0c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 18:21:07 +0100 Subject: [PATCH 0059/6109] define second stage provider run Signed-off-by: Nico Schottelius --- doc/internal/provider-integration | 38 ++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/doc/internal/provider-integration b/doc/internal/provider-integration index 1e25e77b..6fe483e9 100644 --- a/doc/internal/provider-integration +++ b/doc/internal/provider-integration @@ -42,20 +42,52 @@ attributes. +-------------------------------------------------------------------------------- +provider layout: + + / + config # binary that is called to adjust cconfig tree + change # binary that is called on the remote host? -------------------------------------------------------------------------------- cdist view on providers: How providers are integrated/run: + First stage: - If cdist encounters provider in manifest, a wrapper script is run, that creates a new entry in the cconfig database and adds - attribute values: + attribute values. This defines a cconfig + tree, that may look as follows: - conf/__file/cdist_bin/source - conf/__file/cdist_bin/destination + ///: + + myhost/__file/cdist_bin/source + myhost/__file/cdist_bin/destination + ... - In this stage, no conflicts may occur, as no provider code has been called (i.e. only manifests, which map config to hosts is applied). + + Second stage: + - The "manifest" script of every used provider + (i.e. the manifests created at least one object) + is called, which again is able to call other + providers. All created objects may also be modified + by the provider. + + For instance a "httpd" provider may call the + "webroot" provider with --path / ... + # FIND CASE WHERE SENSEFUL => look through + current puppet config + + - The newly created objects are merged back into + the existing tree. No conflicts may occur during + the merge, because this would implicit that the + provider conflicts with other providers. + + The idea of this that a provider may expand another + provider with functionality, but may need to adjust + ("overwrite") settings from the original provider. From edd005a2c5ab8c5383d0d363364c5ccd5cc5e007 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 18:39:47 +0100 Subject: [PATCH 0060/6109] create document containing cdist terms Signed-off-by: Nico Schottelius --- doc/man/cdist-terms.text | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 doc/man/cdist-terms.text diff --git a/doc/man/cdist-terms.text b/doc/man/cdist-terms.text new file mode 100644 index 00000000..d219f60a --- /dev/null +++ b/doc/man/cdist-terms.text @@ -0,0 +1,24 @@ +cdist-terms(7) +============== +Nico Schottelius + + +NAME +---- +cdist-terms - Describe terms used in cdist + + +DESCRIPTION +----------- +provider: Provides functionality. +object: Instance with provider unique id of a provider. +manifest: Define which objects to create [on hosts] + +SEE ALSO +-------- + + +COPYING +------- +Copyright \(C) 2010 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). From 9e1b7017012450c318bcb4d38d8c962689ce0481 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 18:46:28 +0100 Subject: [PATCH 0061/6109] more terms Signed-off-by: Nico Schottelius --- doc/man/cdist-terms.text | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/man/cdist-terms.text b/doc/man/cdist-terms.text index d219f60a..e9bd70bb 100644 --- a/doc/man/cdist-terms.text +++ b/doc/man/cdist-terms.text @@ -13,6 +13,8 @@ DESCRIPTION provider: Provides functionality. object: Instance with provider unique id of a provider. manifest: Define which objects to create [on hosts] +server: The machine that configures all targets. +target: Host that should be configured. SEE ALSO -------- From 8c175e4191cba4134bee93d7f9e44e6ae13d5d5e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 18:46:44 +0100 Subject: [PATCH 0062/6109] define third provider stage and parts of fourth stage Signed-off-by: Nico Schottelius --- doc/internal/provider-integration | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/doc/internal/provider-integration b/doc/internal/provider-integration index 6fe483e9..86d21c88 100644 --- a/doc/internal/provider-integration +++ b/doc/internal/provider-integration @@ -91,3 +91,35 @@ How providers are integrated/run: The idea of this that a provider may expand another provider with functionality, but may need to adjust ("overwrite") settings from the original provider. + + Third stage: + - Cdist calls the "gencode" binary of the providers + for every created object. This binary should create + code to be executed on the target on stdout. + + If the gencode binary fails, it must print diagnostic + messages on stderr and exit non-zero. + + A description of what the generated code may/must/should + do can be found at the end of this document. + + - Cdist merges together the generated code + + Fourth stage: + - The resulting + - Create code to be run on the client. + + +-------------------------------------------------------------------------------- +Scope of code execution on the client + + It should be assumed that the clients are pretty dumb + and thus do not have high level tools like python + installed. + + If a provider requires specific tools to be present + on the target, there must be another provider that + provides this tool and the first provider must create + an object of the specific provider. + + From 8da3ff2e8a674b9b0fbf6d9912715bf74fdc2496 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 18:48:35 +0100 Subject: [PATCH 0063/6109] define error behaviour of generated code Signed-off-by: Nico Schottelius --- doc/internal/provider-integration | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/internal/provider-integration b/doc/internal/provider-integration index 86d21c88..a1dcb1a3 100644 --- a/doc/internal/provider-integration +++ b/doc/internal/provider-integration @@ -122,4 +122,7 @@ Scope of code execution on the client provides this tool and the first provider must create an object of the specific provider. + If the generated code fails on the client, it must + print diagnostistic messages on stderr and call + "exit 1", so the configuration is aborted. From 6f576889e3f7d34acb2be94659c910809c4dee51 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 15 Jan 2011 18:50:22 +0100 Subject: [PATCH 0064/6109] finish fourth stage Signed-off-by: Nico Schottelius --- doc/internal/provider-integration | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/internal/provider-integration b/doc/internal/provider-integration index a1dcb1a3..c9c0d48c 100644 --- a/doc/internal/provider-integration +++ b/doc/internal/provider-integration @@ -104,11 +104,12 @@ How providers are integrated/run: do can be found at the end of this document. - Cdist merges together the generated code + (taking care of DEPENDENCIES (which are not + yet defined (take care, double nested brackets))) Fourth stage: - - The resulting - - Create code to be run on the client. - + - The resulting shell script is transferred + to the target and executed. -------------------------------------------------------------------------------- Scope of code execution on the client From 78b10e0ea6b3729c129ff2072b459f75c29ec8d5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 17 Jan 2011 22:44:34 +0100 Subject: [PATCH 0065/6109] rename provider to type Signed-off-by: Nico Schottelius --- ...{provider-integration => type-integration} | 46 +++++++++---------- 1 file changed, 22 insertions(+), 24 deletions(-) rename doc/internal/{provider-integration => type-integration} (74%) diff --git a/doc/internal/provider-integration b/doc/internal/type-integration similarity index 74% rename from doc/internal/provider-integration rename to doc/internal/type-integration index c9c0d48c..c7f7682f 100644 --- a/doc/internal/provider-integration +++ b/doc/internal/type-integration @@ -1,6 +1,4 @@ -This document is a brainstorming document, -on how to integrate providers. Providers -had been "type" in previous discussion. +This document is a brainstorming document, on how to integrate types. Proposed/discussed structures: @@ -14,7 +12,7 @@ Proposed/discussed structures: meta/ default (shell script) - providers/ + types/ pukman/ 2) 2010-11-09 @@ -43,57 +41,57 @@ attributes. -------------------------------------------------------------------------------- -provider layout: +type layout: / config # binary that is called to adjust cconfig tree change # binary that is called on the remote host? -------------------------------------------------------------------------------- -cdist view on providers: +cdist view on types: -How providers are integrated/run: +How types are integrated/run: First stage: - - If cdist encounters provider in manifest, + - If cdist encounters type in manifest, a wrapper script is run, that creates a new entry in the cconfig database and adds attribute values. This defines a cconfig tree, that may look as follows: - ///: + ///: myhost/__file/cdist_bin/source myhost/__file/cdist_bin/destination ... - In this stage, no conflicts may occur, as - no provider code has been called (i.e. only + no type code has been called (i.e. only manifests, which map config to hosts is applied). Second stage: - - The "manifest" script of every used provider + - The "manifest" script of every used type (i.e. the manifests created at least one object) is called, which again is able to call other - providers. All created objects may also be modified - by the provider. + types. All created objects may also be modified + by the type. - For instance a "httpd" provider may call the - "webroot" provider with --path / ... + For instance a "httpd" type may call the + "webroot" type with --path / ... # FIND CASE WHERE SENSEFUL => look through current puppet config - The newly created objects are merged back into the existing tree. No conflicts may occur during the merge, because this would implicit that the - provider conflicts with other providers. + type conflicts with other types. - The idea of this that a provider may expand another - provider with functionality, but may need to adjust - ("overwrite") settings from the original provider. + The idea of this that a type may expand another + type with functionality, but may need to adjust + ("overwrite") settings from the original type. Third stage: - - Cdist calls the "gencode" binary of the providers + - Cdist calls the "gencode" binary of the types for every created object. This binary should create code to be executed on the target on stdout. @@ -118,10 +116,10 @@ Scope of code execution on the client and thus do not have high level tools like python installed. - If a provider requires specific tools to be present - on the target, there must be another provider that - provides this tool and the first provider must create - an object of the specific provider. + If a type requires specific tools to be present + on the target, there must be another type that + provides this tool and the first type must create + an object of the specific type. If the generated code fails on the client, it must print diagnostistic messages on stderr and call From 385cf7ab2bdfec918c4a4607fd2fad3c62961b40 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 17 Jan 2011 22:45:56 +0100 Subject: [PATCH 0066/6109] also update config-layout Signed-off-by: Nico Schottelius --- doc/internal/config-layout | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/internal/config-layout b/doc/internal/config-layout index 63742035..72f1c1f7 100644 --- a/doc/internal/config-layout +++ b/doc/internal/config-layout @@ -3,7 +3,7 @@ On the server: conf/manifests/init - the central entry point - is a shell script - - defines mapping from providers to hosts + - defines mapping from types to hosts - will be called by cdist and the name will be available for tracking in cdist core functions @@ -14,11 +14,11 @@ core/manifests/* (all other) - method to seperate configuration parts -conf/providers// +conf/types// - provide standard types - have required and optional arguments - are independent of hosts - - may make use of other providers to realise a new type + - may make use of other types to realise a new type - how to overwrite stuff? - overwrite in own tree? - needs knowledge of inherited provider @@ -26,14 +26,14 @@ conf/providers// but more like reusable defines - or may implement some functionality on their own -lib/providers// +lib/types// - same as above, but provided by the cdist distribution - if name exists in both, conf/ has priority -Differences manifests vs. providers +Differences manifests vs. types - manifests providers + manifests types main purpose map config to host provide functionality can change config no (prevent conflicts) yes (allow inheritance) From f122acd7420c58fd62a748052e4743dde6255aaf Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 18 Jan 2011 21:07:44 +0100 Subject: [PATCH 0067/6109] ideas++ Signed-off-by: Nico Schottelius --- doc/internal/logs/2011-01-17 | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/internal/logs/2011-01-17 diff --git a/doc/internal/logs/2011-01-17 b/doc/internal/logs/2011-01-17 new file mode 100644 index 00000000..a1b6ee98 --- /dev/null +++ b/doc/internal/logs/2011-01-17 @@ -0,0 +1,3 @@ +Steven: + Type == Provider == Module? + No need for providers like in Puppet (=> Providers can reuse other providers) From b81b19d126e5a3d54eb576bfba70d3e7a2d9174f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 18 Jan 2011 21:17:20 +0100 Subject: [PATCH 0068/6109] begin to create first type: file Signed-off-by: Nico Schottelius --- lib/types/file/mandority_parameters/path | 0 lib/types/file/mandority_parameters/type | 0 lib/types/file/manifest | 13 +++++++++++++ lib/types/file/optional_parameters/mode | 0 4 files changed, 13 insertions(+) create mode 100644 lib/types/file/mandority_parameters/path create mode 100644 lib/types/file/mandority_parameters/type create mode 100644 lib/types/file/manifest create mode 100644 lib/types/file/optional_parameters/mode diff --git a/lib/types/file/mandority_parameters/path b/lib/types/file/mandority_parameters/path new file mode 100644 index 00000000..e69de29b diff --git a/lib/types/file/mandority_parameters/type b/lib/types/file/mandority_parameters/type new file mode 100644 index 00000000..e69de29b diff --git a/lib/types/file/manifest b/lib/types/file/manifest new file mode 100644 index 00000000..965b8fc4 --- /dev/null +++ b/lib/types/file/manifest @@ -0,0 +1,13 @@ +#!/bin/sh + +case "$__arg_type" in + + directory) + if [ "$__arg_mode" ]; then + echo mkdir -m \"$__arg_mode\" \"$__arg_path\" + else + echo mkdir \"$__arg_path\" + fi + ;; + +esac diff --git a/lib/types/file/optional_parameters/mode b/lib/types/file/optional_parameters/mode new file mode 100644 index 00000000..e69de29b From f20bbc444c848a66b6d22674ae7a45d1f9ee33c4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 18 Jan 2011 21:17:40 +0100 Subject: [PATCH 0069/6109] and add a log about type creation Signed-off-by: Nico Schottelius --- doc/internal/logs/2011-01-18.type-creation | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/internal/logs/2011-01-18.type-creation diff --git a/doc/internal/logs/2011-01-18.type-creation b/doc/internal/logs/2011-01-18.type-creation new file mode 100644 index 00000000..c87b5cf0 --- /dev/null +++ b/doc/internal/logs/2011-01-18.type-creation @@ -0,0 +1,11 @@ +# How to create a new type - Try #1 + +# Define possible parameters +[21:10] kr:cdist% cd lib/types +[21:10] kr:types% mkdir file +[21:10] kr:file% mkdir mandority_parameters +[21:10] kr:file% touch mandority_parameters/name +[21:11] kr:file% touch mandority_parameters/type +[21:11] kr:file% mkdir optional_parameters +[21:11] kr:file% touch optional_parameters/mode + From 4d4a13b0abbd9702d947a0ece119d7fa505422ef Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 18 Jan 2011 21:21:30 +0100 Subject: [PATCH 0070/6109] add functionality to type "file" Signed-off-by: Nico Schottelius --- lib/types/file/manifest | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) mode change 100644 => 100755 lib/types/file/manifest diff --git a/lib/types/file/manifest b/lib/types/file/manifest old mode 100644 new mode 100755 index 965b8fc4..caa6bb14 --- a/lib/types/file/manifest +++ b/lib/types/file/manifest @@ -1,13 +1,42 @@ #!/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 . +# +# + case "$__arg_type" in directory) - if [ "$__arg_mode" ]; then - echo mkdir -m \"$__arg_mode\" \"$__arg_path\" - else - echo mkdir \"$__arg_path\" - fi + echo mkdir \"$__arg_path\" + ;; + + file) + echo touch \"$__arg_path\" + ;; + + *) + echo "Unsupported type: $__arg_type" >&2 + exit 1 ;; esac + +if [ "$__arg_mode" ]; then + echo chmod \"$__arg_mode\" \"$__arg_path\" +fi From 9130ee71f4aa9b3a937e5227298b320f61f2fad9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 19 Jan 2011 08:54:37 +0100 Subject: [PATCH 0071/6109] this is not a manifest, but gencode part Signed-off-by: Nico Schottelius --- lib/types/file/{manifest => gencode} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lib/types/file/{manifest => gencode} (100%) diff --git a/lib/types/file/manifest b/lib/types/file/gencode similarity index 100% rename from lib/types/file/manifest rename to lib/types/file/gencode From 33d05d351958d0b3b630e38aadc181e2df48880e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 19 Jan 2011 08:56:18 +0100 Subject: [PATCH 0072/6109] add dummy manifest for type: file Signed-off-by: Nico Schottelius --- lib/types/file/manifest | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 lib/types/file/manifest diff --git a/lib/types/file/manifest b/lib/types/file/manifest new file mode 100755 index 00000000..1e465edc --- /dev/null +++ b/lib/types/file/manifest @@ -0,0 +1,24 @@ +#!/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 . +# +# + +# Nothing to do, no dependencies on other types + +exit 0 From eca09181a82e913eb696ae84a2012382a3b2e480 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 24 Jan 2011 10:48:50 +0100 Subject: [PATCH 0073/6109] +log Signed-off-by: Nico Schottelius --- doc/internal/logs/2011-01-24 | 92 ++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 doc/internal/logs/2011-01-24 diff --git a/doc/internal/logs/2011-01-24 b/doc/internal/logs/2011-01-24 new file mode 100644 index 00000000..fdd4a75f --- /dev/null +++ b/doc/internal/logs/2011-01-24 @@ -0,0 +1,92 @@ +Steven / Nico + +Type: + - xml/ + + - parameters/ + - optional_parameters + me: too long + +User interested it type: + + - which arguments are available + - ls /path/to/type (steven) + +Steven / proposal: + + - manifest/gencode: .meta + - attribute directly in dir + +"cdist-help" + + - if no direct path + + +-------------------------------------------------------------------------------- + +Doc proposal (Nico): + + man cdist-type- + +Directory structure: + "easy to ls -lR and understand what it does" + + ls -lR $(cdist-type-path "typename")/meta/ + + ls -lR $(cdist-path type "typename")/meta/ + +-------------------------------------------------------------------------------- + +What consumes most type? + + - Writing types, because they are functionality + - Define attributes + - required/optional + +Type documentation + + $type/.meta/required_parameters/path contains + "Path in which file is created" +-------------------------------------------------------------------------------- + + +Doc of every type: + + - required/optional parameters + - description + +-------------------------------------------------------------------------------- + +! Validation of type input: + + Not only required/optional parameters: + + - handling of either content/source arguments + + - validate script in type? + - seperate validation from manifest may be senseful +-------------------------------------------------------------------------------- + +Explorer per type? + + - helpful or evil? + - helps to summarise/get information near ressource that needs it + - emphasises type specific explorers + -> explorer should be reusable by everybody! +-------------------------------------------------------------------------------- +Explorer delivers facts + + - central repo + - not being able to override + + - may be helpful to override facts for debugging (i.e. os=redhat) + - one explorer returns one fact + - facts via environment variables + - proposal steven: UPPER_CASE + - __fact_os (Nico) + + - DEFINE path_to_explorer + - DEFINE explorer +-------------------------------------------------------------------------------- + + From 7ce64ab407e66e2b2d11afeff43c9c4159f03dc7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 10:53:50 +0100 Subject: [PATCH 0074/6109] hosts -> manifests Signed-off-by: Nico Schottelius --- conf/{hosts => manifests}/init | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename conf/{hosts => manifests}/init (100%) diff --git a/conf/hosts/init b/conf/manifests/init similarity index 100% rename from conf/hosts/init rename to conf/manifests/init From 63a0e8184d9866759074bdfccdd66e395966d05d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 11:10:19 +0100 Subject: [PATCH 0075/6109] begin to make test cases productive Signed-off-by: Nico Schottelius --- {test => bin}/cdist-cconfig-tree | 0 {test => bin}/cdist_tree_wrapper | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {test => bin}/cdist-cconfig-tree (100%) rename {test => bin}/cdist_tree_wrapper (100%) diff --git a/test/cdist-cconfig-tree b/bin/cdist-cconfig-tree similarity index 100% rename from test/cdist-cconfig-tree rename to bin/cdist-cconfig-tree diff --git a/test/cdist_tree_wrapper b/bin/cdist_tree_wrapper similarity index 100% rename from test/cdist_tree_wrapper rename to bin/cdist_tree_wrapper From f8a150779ee1775028a6f3b2ae5b84ff21e08ee8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 11:13:58 +0100 Subject: [PATCH 0076/6109] add doc about manifests and environment Signed-off-by: Nico Schottelius --- doc/man/cdist-environment.text | 32 ++++++++++++++++++++++++++++++++ doc/man/cdist-manifests.text | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 doc/man/cdist-environment.text create mode 100644 doc/man/cdist-manifests.text diff --git a/doc/man/cdist-environment.text b/doc/man/cdist-environment.text new file mode 100644 index 00000000..50dfd60b --- /dev/null +++ b/doc/man/cdist-environment.text @@ -0,0 +1,32 @@ +cdist-environment(7) +==================== +Nico Schottelius + + +NAME +---- +cdist-environment - Which environment cdist sets up + + +DESCRIPTION +----------- + +PREFIXES +-------- + +These prefixes are supposed to be used. If you write a new type, you +should stick to these conventions. + +- __: All variables setup by cdist are prefixed with a double _ +- __core: Variables setup by the cdist core +- ___: Variable setup by type + + +EXAPMLES +-------- + + +COPYING +------- +Copyright \(C) 2010 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/cdist-manifests.text b/doc/man/cdist-manifests.text new file mode 100644 index 00000000..de26ef5f --- /dev/null +++ b/doc/man/cdist-manifests.text @@ -0,0 +1,33 @@ +cdist-manifests(7) +================== +Nico Schottelius + + +NAME +---- +cdist-manifests - Map configuration to hosts + + +DESCRIPTION +----------- +Using the available types and shell language, you can create mappings of what +should be configured on a host. + + + +ENVIRONMENT +----------- +The following variables are available in manifests: + +- __{explorer|fact}_{name} +- __core_hostname: Hostname that we are deploying to +- __core_localhostname: Hostname that we are deploying from + +EXAPMLES +-------- + + +COPYING +------- +Copyright \(C) 2010 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). From 691766b27e39a98a052f450b6654aff3fbeca1bb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 14:01:21 +0100 Subject: [PATCH 0077/6109] replace some hardcoded values with dynamic generated ones Signed-off-by: Nico Schottelius --- bin/cdist-cconfig-tree | 14 +++++------- bin/cdist-config | 50 +++++++++++++++++++++++++++++------------- 2 files changed, 40 insertions(+), 24 deletions(-) diff --git a/bin/cdist-cconfig-tree b/bin/cdist-cconfig-tree index 106be5a9..c78d3f01 100755 --- a/bin/cdist-cconfig-tree +++ b/bin/cdist-cconfig-tree @@ -28,13 +28,9 @@ set -au # all types cdist is aware of -export cdist_types="file service user" +export __cdist_types="file service user" -# the file that contains mapping from hosts to types -# we will execute this later -- call this MANIFEST? -cdist_config_base="./EXAMPLE_MANIFEST" - -cdist_tree_wrapper="./cdist_tree_wrapper" +cdist_tree_wrapper="cdist_tree_wrapper" # used to build the tree and other stuff tmpdir=/tmp/cdist-test-hardcoded @@ -61,7 +57,7 @@ mkdir -p "${cdist_bindir}" ( set -e cd "${cdist_bindir}" - for bin in $cdist_types; do + for bin in $__core_types; do ln -s "${cdist_tree_wrapper_abs}" "${cdist_type_prefix}${bin}" done ) @@ -77,8 +73,8 @@ PATH="${cdist_bindir}:$PATH" mkdir -p "${cdist_confdir}" # force -x, so the user is aware the file is executed -if [ -x "${cdist_config_base}" ]; then - "${cdist_config_base}" +if [ -x "${__cdist_manifest_init}" ]; then + "${__cdist_manifest_init}" else echo Throw some error, as you forgot to +x it. exit 1 diff --git a/bin/cdist-config b/bin/cdist-config index 4963ae7a..eafb0bc7 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -21,16 +21,22 @@ # Print configuration directories - helper for all other scripts # -: ${CDIST_CONFIG:=/etc/cdist} -: ${CDIST_COREDIR:=$CDIST_CONFIG/core} -: ${CDIST_LIBDIR:=$CDIST_CONFIG/lib} -: ${CDIST_HOSTS:=$CDIST_CONFIG/hosts} -: ${CDIST_MODULES:=$CDIST_CONFIG/modules} +: ${__cdist_config:=/etc/cdist} +: ${__cdist_manifest_dir:=$__cdist_config/manifests} +: ${__cdist_manifest_init:=$__cdist_manifest_dir/init} +: ${__cdist_type_dir:=$__cdist_config/types} + + +# obsolete?: lib not needed, hosts replaced by manifests, modules by types +: ${__cdist_hosts:=$__cdist_config/hosts} +: ${__cdist_modules:=$__cdist_config/modules} +: ${__cdist_coredir:=$__cdist_config/core} + # create basedir + tempfile for direct usage -: ${CDIST_TMPBASEDIR:=/tmp} -: ${CDIST_TMPDIR:=$(mktemp -d "$CDIST_TMPBASEDIR/cdist.XXXXXXXXXXXX")} -: ${CDIST_TMP:=$(mktemp "$CDIST_TMPDIR/cdist.XXXXXXXXXXXX")} +# FIXME: remove on exit +: ${__cdist_tmp_dir:=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX")} +: ${__cdist_tmp_file:=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX")} ################################################################################ # cconf standard vars prefixed with cdist @@ -41,9 +47,23 @@ __cdist_myname=${0##*/}; __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" +################################################################################ +# Generate list of types +# + +# FIXME: ignore error? +cd "$__cdist_type_dir" +for __cdist_type in ${__cdist_type_dir}/*; do + __cdist_types="$__cdist_types $__cdist_type" +done +cd "$__cdist_abs_mydir" + +################################################################################ +# Function list +# __cdist_debug_echo() { - if [ "$CDIST_DEBUG" ]; then + if [ "$__cdist_debug" ]; then echo "Debug: $@" fi } @@ -58,20 +78,20 @@ __cdist_usage() #set -e # load libraries so every program has them available - FIXME -## find "${CDIST_LIBDIR}" -type f > "${CDIST_TMP}" +## find "${__cdist_LIBDIR}" -type f > "${__cdist_TMP}" ## while read __cdist_lib; do ## __cdist_debug_echo "Loading $__cdist_lib ..." ## . "${__cdist_lib}" -## done < "${CDIST_TMP}" +## done < "${__cdist_TMP}" ## # load modules, all parts => really -#find "${CDIST_MODULES}" -name manifest > "${CDIST_TMP}" +#find "${__cdist_MODULES}" -name manifest > "${__cdist_TMP}" #set +e -#echo $CDIST_CONFIG +#echo $__cdist_CONFIG # FIXME: here or somewhere else? other parts may reuse tmp -: > "$CDIST_TMP" -#rm -f "$CDIST_TMP" +: > "$__cdist_TMP" +#rm -f "$__cdist_TMP" #__cdist_cur="$(pwd -P)" From 09370c3e0767e0b6a40595f45ac8cac518c8739f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 14:01:50 +0100 Subject: [PATCH 0078/6109] add target for web Signed-off-by: Nico Schottelius --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 729474c9..aa6eb777 100644 --- a/Makefile +++ b/Makefile @@ -7,3 +7,6 @@ install: sync: .rsync lyni@tablett:cdist .rsync nicosc@free.ethz.ch:cdist + +web: + cp REAL_README $$HOME/niconetz/software/cdist.mdwn From b10b7409164a11b62ad2d7b87e318cd8dbf21e7b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 14:02:06 +0100 Subject: [PATCH 0079/6109] minus one point todo Signed-off-by: Nico Schottelius --- ROADMAP | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ROADMAP b/ROADMAP index 48242e81..bb42930a 100644 --- a/ROADMAP +++ b/ROADMAP @@ -4,13 +4,14 @@ x Define how to get information from clients x Create shell script that creates code to run on client (cdist-build-explorer) x Create configuration tree from manifest x write binaries, which create the tree when called from manifest (cdist_tree_wrapper) -- Define configuration paths (doc/internal/config-layout) +x Define configuration paths (doc/internal/config-layout) +- Write at least one type - Parse configuration tree / generate code to be executed on client - - providers? - - can/may providers modify tree? + - types? + - can/may types modify tree? - may open door for getting information from manifest / other stuff - Cleanup / refactor / documentation -- Write providers, providers, providers, ... - doc/internal/provider-integration - - provider side: Steven +- Write types, types, types, ... + doc/internal/type-integration + - type side: Steven From 85154b87a45474676ffcdddd7750f2b69c76f0e8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 14:02:17 +0100 Subject: [PATCH 0080/6109] update docs Signed-off-by: Nico Schottelius --- doc/man/cdist-environment.text | 2 +- doc/man/cdist-language.text | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/man/cdist-environment.text b/doc/man/cdist-environment.text index 50dfd60b..b8db420e 100644 --- a/doc/man/cdist-environment.text +++ b/doc/man/cdist-environment.text @@ -18,7 +18,7 @@ These prefixes are supposed to be used. If you write a new type, you should stick to these conventions. - __: All variables setup by cdist are prefixed with a double _ -- __core: Variables setup by the cdist core +- __cdist_: Variables setup by the cdist core - ___: Variable setup by type diff --git a/doc/man/cdist-language.text b/doc/man/cdist-language.text index 6ada06b4..d920ac8f 100644 --- a/doc/man/cdist-language.text +++ b/doc/man/cdist-language.text @@ -12,7 +12,7 @@ DESCRIPTION ----------- A cdist configuration consists of the following parts: -- host definitions (cdist-language-hosts(7)) +- manifests (cdist-manifests(7)) - library (cdist-language-library(7)) - modules (cdist-language-modules(7)) From 24d28b4a06d64b339ed14e95637dcc3398893529 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 14:02:29 +0100 Subject: [PATCH 0081/6109] begin to write real world manifest Signed-off-by: Nico Schottelius --- bin/cdist-config | 12 ------------ conf/manifests/init | 11 ++++++++--- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index eafb0bc7..14341f14 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -46,18 +46,6 @@ __cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" __cdist_myname=${0##*/}; __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" - -################################################################################ -# Generate list of types -# - -# FIXME: ignore error? -cd "$__cdist_type_dir" -for __cdist_type in ${__cdist_type_dir}/*; do - __cdist_types="$__cdist_types $__cdist_type" -done -cd "$__cdist_abs_mydir" - ################################################################################ # Function list # diff --git a/conf/manifests/init b/conf/manifests/init index 42431fcc..9439fecc 100644 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -1,5 +1,10 @@ -case "$__target_hostname" in - thilo) - echo "postgresql" +# +# This is a sample manifest, but used in real world +# + +# All ikqs get a sample file +case "$__core_hostname" in + ikq*) + __file cdist-config --source /home/users/nico/p/cdist/bin/cdist-config --destination /usr/bin/cdist-config ;; esac From 14ea35e40f5fc83c021717cdfc0a870c00ede733 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 14:23:34 +0100 Subject: [PATCH 0082/6109] begin to move cdist-cconfig-tree to use internal variables Signed-off-by: Nico Schottelius --- bin/cdist-cconfig-tree | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/bin/cdist-cconfig-tree b/bin/cdist-cconfig-tree index c78d3f01..123c1346 100755 --- a/bin/cdist-cconfig-tree +++ b/bin/cdist-cconfig-tree @@ -18,7 +18,8 @@ # along with cdist. If not, see . # # -# Let's build a cconfig tree from a generic configuration (example) +# Let's build a cconfig tree from a configuration +# And save it into the cache tree # #[ $# -eq 1 ] || __cdist_usage "cconf" @@ -27,15 +28,16 @@ set -au -# all types cdist is aware of -export __cdist_types="file service user" - -cdist_tree_wrapper="cdist_tree_wrapper" +cdist_tree_wrapper="$(which cdist_tree_wrapper)" # used to build the tree and other stuff -tmpdir=/tmp/cdist-test-hardcoded -cdist_bindir="${tmpdir}/bin" -cdist_confdir="${tmpdir}/conf" +__cdist_bindir="${__cdist_tmp_dir}/bin" + +# FIXME: create cache/bin dir only once / do that in its +# own function + +# Save output in cache +__cdist_output="${__cdist_cache_hosts}/${__cdist_target_host}" cdist_type_prefix="__" @@ -47,7 +49,7 @@ cdist_tree_wrapper_absdir=$(cd ${cdist_tree_wrapper%/*} && pwd -P) cdist_tree_wrapper_abs="$cdist_tree_wrapper_absdir/$cdist_tree_wrapper_name" -rm -rf "${tmpdir}" +rm -rf "${__cdist_tmp_dir}" # contains cdist-tree binaries mkdir -p "${cdist_bindir}" @@ -56,9 +58,11 @@ mkdir -p "${cdist_bindir}" # Create our binaries, will are called from the manifest - temporary ( set -e - cd "${cdist_bindir}" - for bin in $__core_types; do + cd "${__cdist_type_dir}" + # FIXME: replace with redirect to file + read + for bin in *; do ln -s "${cdist_tree_wrapper_abs}" "${cdist_type_prefix}${bin}" + cd "${cdist_bindir}" done ) From 732ac76383de2086fe85fe146b6751898e2feff2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 14:23:54 +0100 Subject: [PATCH 0083/6109] cleanup and add vars to cdist-config Signed-off-by: Nico Schottelius --- bin/cdist-config | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 14341f14..13054aab 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -24,8 +24,12 @@ : ${__cdist_config:=/etc/cdist} : ${__cdist_manifest_dir:=$__cdist_config/manifests} : ${__cdist_manifest_init:=$__cdist_manifest_dir/init} + : ${__cdist_type_dir:=$__cdist_config/types} +: ${__cdist_cache_dir:=$__cdist_config/cache} +: ${__cdist_cache_hosts:=$__cdist_cache_dir/hosts} + # obsolete?: lib not needed, hosts replaced by manifests, modules by types : ${__cdist_hosts:=$__cdist_config/hosts} @@ -77,9 +81,3 @@ __cdist_usage() #find "${__cdist_MODULES}" -name manifest > "${__cdist_TMP}" #set +e - -#echo $__cdist_CONFIG -# FIXME: here or somewhere else? other parts may reuse tmp -: > "$__cdist_TMP" -#rm -f "$__cdist_TMP" -#__cdist_cur="$(pwd -P)" From 97a14fe933c7d16dcb6d97065062ad940984809f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 14:38:30 +0100 Subject: [PATCH 0084/6109] finish cdist-build-bin Signed-off-by: Nico Schottelius --- bin/cdist-build-bin | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 bin/cdist-build-bin diff --git a/bin/cdist-build-bin b/bin/cdist-build-bin new file mode 100755 index 00000000..20fb4ac6 --- /dev/null +++ b/bin/cdist-build-bin @@ -0,0 +1,41 @@ +#!/bin/sh +# +# 2010 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 . +# +# Build pseudo binaries +# + +. cdist-config + +set -aeu + +__cdist_tree_wrapper="$(which cdist_tree_wrapper)" + +if [ ! -d ${__cdist_type_dir} ]; then + __cdist_exit_err "$__cdist_type_dir must exist and contain available types" +fi + +# Get Types +cd "${__cdist_type_dir}" +ls -1 > "${__cdist_tmp_file}" + +# Create binaries +mkdir -p "${__cdist_cache_bin}" +while read type; do + ln -s "${__cdist_tree_wrapper}" "${__cdist_cache_bin}/${__cdist_bin_prefix}${type}" +done From f7f687995bdee86417c5e1f4a2ef398d7dcfdcb2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 14:55:28 +0100 Subject: [PATCH 0085/6109] cleanups + new __cdist_exit_err Signed-off-by: Nico Schottelius --- bin/cdist-build-bin | 2 +- bin/cdist-cconfig-tree | 6 +++--- bin/cdist-config | 17 +++++++++++++++-- bin/cdist-deploy-to | 2 +- bin/cdist-preprocess | 3 +++ 5 files changed, 23 insertions(+), 7 deletions(-) diff --git a/bin/cdist-build-bin b/bin/cdist-build-bin index 20fb4ac6..95159a5c 100755 --- a/bin/cdist-build-bin +++ b/bin/cdist-build-bin @@ -38,4 +38,4 @@ ls -1 > "${__cdist_tmp_file}" mkdir -p "${__cdist_cache_bin}" while read type; do ln -s "${__cdist_tree_wrapper}" "${__cdist_cache_bin}/${__cdist_bin_prefix}${type}" -done +done < "${__cdist_tmp_file}" diff --git a/bin/cdist-cconfig-tree b/bin/cdist-cconfig-tree index 123c1346..d44d8232 100755 --- a/bin/cdist-cconfig-tree +++ b/bin/cdist-cconfig-tree @@ -22,13 +22,13 @@ # And save it into the cache tree # -#[ $# -eq 1 ] || __cdist_usage "cconf" - . cdist-config +[ "${__cdist_target_host}" ] || __cdist_usage "Need \$__cdist_target_host setup" + set -au -cdist_tree_wrapper="$(which cdist_tree_wrapper)" +__cdist_tree_wrapper="$(which cdist_tree_wrapper)" # used to build the tree and other stuff __cdist_bindir="${__cdist_tmp_dir}/bin" diff --git a/bin/cdist-config b/bin/cdist-config index 13054aab..60f06f08 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -29,6 +29,7 @@ : ${__cdist_cache_dir:=$__cdist_config/cache} : ${__cdist_cache_hosts:=$__cdist_cache_dir/hosts} +: ${__cdist_cache_bin:=$__cdist_cache_dir/bin} # obsolete?: lib not needed, hosts replaced by manifests, modules by types @@ -50,6 +51,13 @@ __cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" __cdist_myname=${0##*/}; __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" + +################################################################################ +# Other constants + +# Used for generating binaries in cdist-build-bin +__cdist_bin_prefix="__" + ################################################################################ # Function list # @@ -60,10 +68,15 @@ __cdist_debug_echo() fi } +__cdist_exit_err() +{ + echo "$@" + exit 1 +} + __cdist_usage() { - echo "$__cdist_myname: $@" - exit 1 + __cdist_exit_err "$__cdist_myname: $@" } diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index c1a8c835..072c6925 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -28,7 +28,7 @@ set -e # Internal variables, usable by -export __cdist_intern_target_host="$1" +export __cdist_target_host="$1" export __cdist_intern_deploy_host="$(cdist_explore_hostname)" . cdist-build "$__cdist_intern_target_host" diff --git a/bin/cdist-preprocess b/bin/cdist-preprocess index 53ed7d04..71dc839c 100755 --- a/bin/cdist-preprocess +++ b/bin/cdist-preprocess @@ -32,3 +32,6 @@ cdist-build-explorer | ssh "$1" > "${CDIST_TMP}" # And a filter function like grep '^__cdist_explore.*=".*"$' # is probably not effective! . "${CDIST_TMP}" + + + From 3ead0e591210da93681f0f3887dbc580af065060 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 15:02:26 +0100 Subject: [PATCH 0086/6109] cleanup cdist_tree_wrapper Signed-off-by: Nico Schottelius --- bin/cdist-config | 8 ++++++++ bin/cdist_tree_wrapper | 24 ++++++++++-------------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 60f06f08..c69bb0c4 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -58,6 +58,9 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" # Used for generating binaries in cdist-build-bin __cdist_bin_prefix="__" +# Used for IDs +__cdist_sane_chars='[A-Za-z0-9_]' + ################################################################################ # Function list # @@ -79,6 +82,11 @@ __cdist_usage() __cdist_exit_err "$__cdist_myname: $@" } +__cdist_cache_host() +{ + echo "${__cdist_cache_hosts}/${__cdist_target_host}" +} + #set -e diff --git a/bin/cdist_tree_wrapper b/bin/cdist_tree_wrapper index 5abe6f7a..6be8806e 100755 --- a/bin/cdist_tree_wrapper +++ b/bin/cdist_tree_wrapper @@ -1,6 +1,6 @@ #!/bin/sh # -# 2010 Nico Schottelius (nico-cdist at schottelius.org) +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -24,35 +24,31 @@ # a new type # - . cdist-config [ $# -ge 1 ] || __cdist_usage " " echo "I am $__cdist_myname and have been called with $@" -id="$1"; shift +__cdist_id="$1"; shift -# FIXME: find a better definiton of sane (i.e. everything that is a valid filename) -sanechars='[A-Za-z0-9_]' +echo "$__cdist_id" | grep -q "^${__cdist_sane_chars}*\$" || __cdist_usage "Provide sane id, please" -echo "$id" | grep -q "^${sanechars}*\$" || __cdist_usage "Provide sane id, please" +__cdist_tid="${__cdist_myname}/${__cdist_id}" +__cdist_ddir="$(__cdist_cache_host)/${__cdist_tid}" -tid="${__cdist_myname}/${id}" -ddir="${cdist_confdir}/${tid}" - -if [ -e "${ddir}" ]; then +if [ -e "${__cdist_ddir}" ]; then # FIXME: add source! $cdist_config_base/source # FIXME: force $source information to be present from outside! - __cdist_usage "${tid} already exists" + __cdist_usage "${__cdist_tid} already exists" fi -mkdir -p "${ddir}" +mkdir -p "${__cdist_ddir}" while [ $# -gt 0 ]; do opt="$1"; shift - echo "$opt" | grep -q "^--${sanechars}*\$" || __cdist_usage "Provide sane options" + echo "$opt" | grep -q "^--${__cdist_sane_chars}*\$" || __cdist_usage "Provide sane options" opt_file="$(echo $opt | sed 's/^--//')" @@ -63,7 +59,7 @@ while [ $# -gt 0 ]; do value="$1"; shift - echo "${value}" > "${ddir}/${opt_file}" + echo "${value}" > "${__cdist_ddir}/${opt_file}" From 6c69e0246fac43ba83951553f64f7079e72bfa20 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 16:03:39 +0100 Subject: [PATCH 0087/6109] restructure /cdist-cconfig-tree Signed-off-by: Nico Schottelius --- bin/cdist-cconfig-tree | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/cdist-cconfig-tree b/bin/cdist-cconfig-tree index d44d8232..084e9fd1 100755 --- a/bin/cdist-cconfig-tree +++ b/bin/cdist-cconfig-tree @@ -71,17 +71,16 @@ mkdir -p "${cdist_bindir}" #unset PATH # prepend our path -PATH="${cdist_bindir}:$PATH" +PATH="${__cdist_cache_bin}:$PATH" # create output dir mkdir -p "${cdist_confdir}" # force -x, so the user is aware the file is executed -if [ -x "${__cdist_manifest_init}" ]; then - "${__cdist_manifest_init}" -else - echo Throw some error, as you forgot to +x it. - exit 1 +if [ ! -x "${__cdist_manifest_init}" ]; then + __cdist_exit_err "${__cdist_manifest_init} needs to be executable." fi +"${__cdist_manifest_init}" + echo "Finished tree generation, have a look at ${cdist_confdir}." From de41cceff56d476f6a9398dcd4d156bacf1a15c3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 18:39:34 +0100 Subject: [PATCH 0088/6109] rename Signed-off-by: Nico Schottelius --- bin/{cdist-cconfig-tree => cdist-build-host-cconfig} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename bin/{cdist-cconfig-tree => cdist-build-host-cconfig} (100%) diff --git a/bin/cdist-cconfig-tree b/bin/cdist-build-host-cconfig similarity index 100% rename from bin/cdist-cconfig-tree rename to bin/cdist-build-host-cconfig From b95eb84a983fced6357042f4819d2c26047c8581 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 18:41:01 +0100 Subject: [PATCH 0089/6109] Cleanups, begin generic manifest execution Signed-off-by: Nico Schottelius --- bin/cdist-build-bin | 1 + bin/cdist-build-host-cconfig | 56 ++++++------------------------------ bin/cdist-config | 1 - bin/cdist-preprocess | 3 +- bin/cdist_tree_wrapper | 2 -- 5 files changed, 12 insertions(+), 51 deletions(-) diff --git a/bin/cdist-build-bin b/bin/cdist-build-bin index 95159a5c..d101e284 100755 --- a/bin/cdist-build-bin +++ b/bin/cdist-build-bin @@ -24,6 +24,7 @@ set -aeu +# FIXME: load this from the cdist-core library __cdist_tree_wrapper="$(which cdist_tree_wrapper)" if [ ! -d ${__cdist_type_dir} ]; then diff --git a/bin/cdist-build-host-cconfig b/bin/cdist-build-host-cconfig index 084e9fd1..9c07efc6 100755 --- a/bin/cdist-build-host-cconfig +++ b/bin/cdist-build-host-cconfig @@ -25,62 +25,24 @@ . cdist-config [ "${__cdist_target_host}" ] || __cdist_usage "Need \$__cdist_target_host setup" +[ "${__cdist_output_dir}" ] || __cdist_usage "Need \$__cdist_output_dir setup" set -au -__cdist_tree_wrapper="$(which cdist_tree_wrapper)" +# FIXME: Save output in cache -- or make flexible? +__cdist_output_dir="$(__cdist_cache_host)" -# used to build the tree and other stuff -__cdist_bindir="${__cdist_tmp_dir}/bin" - -# FIXME: create cache/bin dir only once / do that in its -# own function - -# Save output in cache -__cdist_output="${__cdist_cache_hosts}/${__cdist_target_host}" - -cdist_type_prefix="__" - -################################################################################ -# Begin execution - -cdist_tree_wrapper_name=${cdist_tree_wrapper##*/} -cdist_tree_wrapper_absdir=$(cd ${cdist_tree_wrapper%/*} && pwd -P) -cdist_tree_wrapper_abs="$cdist_tree_wrapper_absdir/$cdist_tree_wrapper_name" - - -rm -rf "${__cdist_tmp_dir}" - -# contains cdist-tree binaries -mkdir -p "${cdist_bindir}" -#ln -s "${cdist_tree_wrapper_abs}" "${bindir}" - -# Create our binaries, will are called from the manifest - temporary -( - set -e - cd "${__cdist_type_dir}" - # FIXME: replace with redirect to file + read - for bin in *; do - ln -s "${cdist_tree_wrapper_abs}" "${cdist_type_prefix}${bin}" - cd "${cdist_bindir}" - done -) - -# Cdist_tree_wrapper does not need any other tool, so remove them from the path. -# but the manifest may need so - FIXME: think about it. -#unset PATH - -# prepend our path +# prepend our path, so all cdist tools come before other tools PATH="${__cdist_cache_bin}:$PATH" -# create output dir -mkdir -p "${cdist_confdir}" - -# force -x, so the user is aware the file is executed +# Force -x, so the user is aware the file is executed if [ ! -x "${__cdist_manifest_init}" ]; then __cdist_exit_err "${__cdist_manifest_init} needs to be executable." fi +# create output dir +mkdir -p "$(__cdist_cache_host)" + "${__cdist_manifest_init}" -echo "Finished tree generation, have a look at ${cdist_confdir}." +echo "Finished tree generation, have a look at ${__cdist_output_dir}." diff --git a/bin/cdist-config b/bin/cdist-config index c69bb0c4..5f33a0d0 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -33,7 +33,6 @@ # obsolete?: lib not needed, hosts replaced by manifests, modules by types -: ${__cdist_hosts:=$__cdist_config/hosts} : ${__cdist_modules:=$__cdist_config/modules} : ${__cdist_coredir:=$__cdist_config/core} diff --git a/bin/cdist-preprocess b/bin/cdist-preprocess index 71dc839c..bb47972f 100755 --- a/bin/cdist-preprocess +++ b/bin/cdist-preprocess @@ -34,4 +34,5 @@ cdist-build-explorer | ssh "$1" > "${CDIST_TMP}" . "${CDIST_TMP}" - +# Create cconfig for the host +# cdist-manifest ... diff --git a/bin/cdist_tree_wrapper b/bin/cdist_tree_wrapper index 6be8806e..254de003 100755 --- a/bin/cdist_tree_wrapper +++ b/bin/cdist_tree_wrapper @@ -61,6 +61,4 @@ while [ $# -gt 0 ]; do echo "${value}" > "${__cdist_ddir}/${opt_file}" - - done From f5124bb821c774cd4c0d5f22f1c3cb17180c5c33 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 18:49:17 +0100 Subject: [PATCH 0090/6109] commit before breaking cdist-build-host-cconfig Signed-off-by: Nico Schottelius --- bin/cdist-build-host-cconfig | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bin/cdist-build-host-cconfig b/bin/cdist-build-host-cconfig index 9c07efc6..0fb7817f 100755 --- a/bin/cdist-build-host-cconfig +++ b/bin/cdist-build-host-cconfig @@ -29,9 +29,6 @@ set -au -# FIXME: Save output in cache -- or make flexible? -__cdist_output_dir="$(__cdist_cache_host)" - # prepend our path, so all cdist tools come before other tools PATH="${__cdist_cache_bin}:$PATH" @@ -40,9 +37,10 @@ if [ ! -x "${__cdist_manifest_init}" ]; then __cdist_exit_err "${__cdist_manifest_init} needs to be executable." fi -# create output dir -mkdir -p "$(__cdist_cache_host)" +# create output dir ?? +mkdir -p "$(__cdist_output_dir)" +# Create output / take manifest as argument? "${__cdist_manifest_init}" echo "Finished tree generation, have a look at ${__cdist_output_dir}." From 2d54c04f8a1a18e84722a2e869f67aaca823d63a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 18:56:25 +0100 Subject: [PATCH 0091/6109] cleanup cdist-config Signed-off-by: Nico Schottelius --- bin/cdist-config | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 5f33a0d0..c87dc56e 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -85,19 +85,3 @@ __cdist_cache_host() { echo "${__cdist_cache_hosts}/${__cdist_target_host}" } - - -#set -e - -# load libraries so every program has them available - FIXME -## find "${__cdist_LIBDIR}" -type f > "${__cdist_TMP}" -## while read __cdist_lib; do -## __cdist_debug_echo "Loading $__cdist_lib ..." -## . "${__cdist_lib}" -## done < "${__cdist_TMP}" -## - -# load modules, all parts => really -#find "${__cdist_MODULES}" -name manifest > "${__cdist_TMP}" - -#set +e From 489639f8e0ab8723efb261a3f5aa648d00dbe7d2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 19:15:53 +0100 Subject: [PATCH 0092/6109] split: cdist-build-host-cconfig to cdist-manifest-init and cdist-manifest-run Signed-off-by: Nico Schottelius --- bin/cdist-manifest-init | 29 +++++++++++++++++++ ...-build-host-cconfig => cdist-manifest-run} | 13 ++++----- 2 files changed, 35 insertions(+), 7 deletions(-) create mode 100755 bin/cdist-manifest-init rename bin/{cdist-build-host-cconfig => cdist-manifest-run} (79%) diff --git a/bin/cdist-manifest-init b/bin/cdist-manifest-init new file mode 100755 index 00000000..2ab2b758 --- /dev/null +++ b/bin/cdist-manifest-init @@ -0,0 +1,29 @@ +#!/bin/sh +# +# 2010 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 . +# +# +# Let's build a cconfig tree from a configuration +# And save it into the cache tree +# + +. cdist-config + +[ "${__cdist_target_host}" ] || __cdist_usage "Need \$__cdist_target_host setup" + +cdist-manifest-run "$(__cdist_cache_host)" "${__cdist_manifest_init}" diff --git a/bin/cdist-build-host-cconfig b/bin/cdist-manifest-run similarity index 79% rename from bin/cdist-build-host-cconfig rename to bin/cdist-manifest-run index 0fb7817f..cf8417cc 100755 --- a/bin/cdist-build-host-cconfig +++ b/bin/cdist-manifest-run @@ -24,11 +24,15 @@ . cdist-config -[ "${__cdist_target_host}" ] || __cdist_usage "Need \$__cdist_target_host setup" -[ "${__cdist_output_dir}" ] || __cdist_usage "Need \$__cdist_output_dir setup" +if [ $# -ne 2 ]; then + __cdist_usage " " +fi set -au +__cdist_output_dir="$1"; shift +__cdist_manifest="$1"; shift + # prepend our path, so all cdist tools come before other tools PATH="${__cdist_cache_bin}:$PATH" @@ -37,10 +41,5 @@ if [ ! -x "${__cdist_manifest_init}" ]; then __cdist_exit_err "${__cdist_manifest_init} needs to be executable." fi -# create output dir ?? mkdir -p "$(__cdist_output_dir)" - -# Create output / take manifest as argument? "${__cdist_manifest_init}" - -echo "Finished tree generation, have a look at ${__cdist_output_dir}." From 7c8dba566f5105dd58a4237ccb94cbcdeb646e5c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 19:53:13 +0100 Subject: [PATCH 0093/6109] add source record information to created objects Signed-off-by: Nico Schottelius --- bin/cdist-config | 3 +++ bin/cdist_tree_wrapper | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index c87dc56e..b0966487 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -60,6 +60,9 @@ __cdist_bin_prefix="__" # Used for IDs __cdist_sane_chars='[A-Za-z0-9_]' +# Used to mark file that created a specific type +__cdist_object_source=".source" + ################################################################################ # Function list # diff --git a/bin/cdist_tree_wrapper b/bin/cdist_tree_wrapper index 254de003..b5d073fc 100755 --- a/bin/cdist_tree_wrapper +++ b/bin/cdist_tree_wrapper @@ -38,9 +38,8 @@ __cdist_tid="${__cdist_myname}/${__cdist_id}" __cdist_ddir="$(__cdist_cache_host)/${__cdist_tid}" if [ -e "${__cdist_ddir}" ]; then - # FIXME: add source! $cdist_config_base/source - # FIXME: force $source information to be present from outside! - __cdist_usage "${__cdist_tid} already exists" + source="$(cat "${__cdist_ddir}/${__cdist_object_source}")" + __cdist_usage "${__cdist_tid} already exists (source: $source)" fi mkdir -p "${__cdist_ddir}" @@ -61,4 +60,6 @@ while [ $# -gt 0 ]; do echo "${value}" > "${__cdist_ddir}/${opt_file}" + echo "${__cdist_abs_myname}" > "${__cdist_ddir}/${__cdist_object_source}" + done From 81c7ba085f8c116ed3225a924e299a7c26b69599 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 20:24:34 +0100 Subject: [PATCH 0094/6109] add hint for example configuration Signed-off-by: Nico Schottelius --- bin/cdist-build | 2 +- bin/cdist-preprocess | 9 +++++---- conf/README | 7 +++++++ 3 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 conf/README diff --git a/bin/cdist-build b/bin/cdist-build index a26b9458..8306242b 100755 --- a/bin/cdist-build +++ b/bin/cdist-build @@ -23,7 +23,7 @@ . cdist-config -[ $# -eq 1 ] || __cdist_usage "target" +[ $# -eq 1 ] || __cdist_usage "target_host" set -e diff --git a/bin/cdist-preprocess b/bin/cdist-preprocess index bb47972f..822b7008 100755 --- a/bin/cdist-preprocess +++ b/bin/cdist-preprocess @@ -26,13 +26,14 @@ [ $# -eq 1 ] || __cdist_usage "target" set -e -cdist-build-explorer | ssh "$1" > "${CDIST_TMP}" +cdist-build-explorer | ssh "$1" > "${__cdist_tmp_file}" # FIXME: Warning: An untrusted/compromised client could in theory exploit us # And a filter function like grep '^__cdist_explore.*=".*"$' # is probably not effective! -. "${CDIST_TMP}" +. "${__cdist_tmp_file}" -# Create cconfig for the host -# cdist-manifest ... +# Create cconfig for the host - FIXME: replace with a recursive version +# to allow type runners, overwrites and merges +cdist-manifest-init diff --git a/conf/README b/conf/README new file mode 100644 index 00000000..54a2d8a5 --- /dev/null +++ b/conf/README @@ -0,0 +1,7 @@ +This is a sample configuration that can be used as an example +for /etc/cdist. + +For instance: + + [root@kr etc]# ln -s ~nico/p/cdist/conf/ /etc/cdist + From 1d093f1c3733bae1bf4baf539c4f7ff0b6a76b91 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 20:26:26 +0100 Subject: [PATCH 0095/6109] +x Signed-off-by: Nico Schottelius --- conf/manifests/init | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 conf/manifests/init diff --git a/conf/manifests/init b/conf/manifests/init old mode 100644 new mode 100755 From 8660e5929662dfa4fcbdbc4bf4faf21532691931 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 20:30:20 +0100 Subject: [PATCH 0096/6109] no exec anymore Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index cf8417cc..3a2c4058 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -41,5 +41,5 @@ if [ ! -x "${__cdist_manifest_init}" ]; then __cdist_exit_err "${__cdist_manifest_init} needs to be executable." fi -mkdir -p "$(__cdist_output_dir)" +mkdir -p "${__cdist_output_dir}" "${__cdist_manifest_init}" From 3156ef171e30682347fa06bb7e6d1b00f258ef9b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 21:22:09 +0100 Subject: [PATCH 0097/6109] update manifest to use new variables Signed-off-by: Nico Schottelius --- conf/manifests/init | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/manifests/init b/conf/manifests/init index 9439fecc..195835a4 100755 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -2,8 +2,9 @@ # This is a sample manifest, but used in real world # +set -x # All ikqs get a sample file -case "$__core_hostname" in +case "$__cdist_target_host" in ikq*) __file cdist-config --source /home/users/nico/p/cdist/bin/cdist-config --destination /usr/bin/cdist-config ;; From 929d33c310858ad01a2732e8a3be96f5623aba39 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 21:32:18 +0100 Subject: [PATCH 0098/6109] reload binaries on manifest run Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 3a2c4058..d9269842 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -28,11 +28,14 @@ if [ $# -ne 2 ]; then __cdist_usage " " fi -set -au +set -aeu __cdist_output_dir="$1"; shift __cdist_manifest="$1"; shift +# Ensure binaries exist and are up-to-date +cdist-build-bin + # prepend our path, so all cdist tools come before other tools PATH="${__cdist_cache_bin}:$PATH" @@ -42,4 +45,4 @@ if [ ! -x "${__cdist_manifest_init}" ]; then fi mkdir -p "${__cdist_output_dir}" -"${__cdist_manifest_init}" +"${__cdist_manifest}" From e5297ddf318919d7efb60551c6a2d8ee62998630 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 21:36:03 +0100 Subject: [PATCH 0099/6109] move types to config dir Signed-off-by: Nico Schottelius --- {lib => conf}/types/file/gencode | 0 {lib => conf}/types/file/mandority_parameters/path | 0 {lib => conf}/types/file/mandority_parameters/type | 0 {lib => conf}/types/file/manifest | 0 {lib => conf}/types/file/optional_parameters/mode | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename {lib => conf}/types/file/gencode (100%) rename {lib => conf}/types/file/mandority_parameters/path (100%) rename {lib => conf}/types/file/mandority_parameters/type (100%) rename {lib => conf}/types/file/manifest (100%) rename {lib => conf}/types/file/optional_parameters/mode (100%) diff --git a/lib/types/file/gencode b/conf/types/file/gencode similarity index 100% rename from lib/types/file/gencode rename to conf/types/file/gencode diff --git a/lib/types/file/mandority_parameters/path b/conf/types/file/mandority_parameters/path similarity index 100% rename from lib/types/file/mandority_parameters/path rename to conf/types/file/mandority_parameters/path diff --git a/lib/types/file/mandority_parameters/type b/conf/types/file/mandority_parameters/type similarity index 100% rename from lib/types/file/mandority_parameters/type rename to conf/types/file/mandority_parameters/type diff --git a/lib/types/file/manifest b/conf/types/file/manifest similarity index 100% rename from lib/types/file/manifest rename to conf/types/file/manifest diff --git a/lib/types/file/optional_parameters/mode b/conf/types/file/optional_parameters/mode similarity index 100% rename from lib/types/file/optional_parameters/mode rename to conf/types/file/optional_parameters/mode From 6704ae7cc1d675a67be54ff3359746d21bb1277e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 21:42:50 +0100 Subject: [PATCH 0100/6109] overwrite links / binaries if already existing Signed-off-by: Nico Schottelius --- bin/cdist-build-bin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-build-bin b/bin/cdist-build-bin index d101e284..a7ae3735 100755 --- a/bin/cdist-build-bin +++ b/bin/cdist-build-bin @@ -38,5 +38,5 @@ ls -1 > "${__cdist_tmp_file}" # Create binaries mkdir -p "${__cdist_cache_bin}" while read type; do - ln -s "${__cdist_tree_wrapper}" "${__cdist_cache_bin}/${__cdist_bin_prefix}${type}" + ln -sf "${__cdist_tree_wrapper}" "${__cdist_cache_bin}/${__cdist_bin_prefix}${type}" done < "${__cdist_tmp_file}" From b9fa9d8b113e1b8906bc8f9dbdf399d57af5e743 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 21:43:11 +0100 Subject: [PATCH 0101/6109] switch from chars to sane_regexp Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 +- bin/cdist_tree_wrapper | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index b0966487..aaba9c74 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -58,7 +58,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" __cdist_bin_prefix="__" # Used for IDs -__cdist_sane_chars='[A-Za-z0-9_]' +__cdist_sane_regexp='[A-Za-z0-9]*[-A-Za-z0-9_]*' # Used to mark file that created a specific type __cdist_object_source=".source" diff --git a/bin/cdist_tree_wrapper b/bin/cdist_tree_wrapper index b5d073fc..d7a2af6c 100755 --- a/bin/cdist_tree_wrapper +++ b/bin/cdist_tree_wrapper @@ -32,7 +32,7 @@ echo "I am $__cdist_myname and have been called with $@" __cdist_id="$1"; shift -echo "$__cdist_id" | grep -q "^${__cdist_sane_chars}*\$" || __cdist_usage "Provide sane id, please" +echo "$__cdist_id" | grep -q "^${__cdist_sane_regexp}\$" || __cdist_usage "Provide sane id, please" __cdist_tid="${__cdist_myname}/${__cdist_id}" __cdist_ddir="$(__cdist_cache_host)/${__cdist_tid}" @@ -47,7 +47,7 @@ mkdir -p "${__cdist_ddir}" while [ $# -gt 0 ]; do opt="$1"; shift - echo "$opt" | grep -q "^--${__cdist_sane_chars}*\$" || __cdist_usage "Provide sane options" + echo "$opt" | grep -q "^--${__cdist_sane_regexp}\$" || __cdist_usage "Provide sane options" opt_file="$(echo $opt | sed 's/^--//')" From bf7ec38120c22b2dbe7dcfc0dca26a800cab831e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 21:45:15 +0100 Subject: [PATCH 0102/6109] ignore the cache directory Signed-off-by: Nico Schottelius --- conf/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 conf/.gitignore diff --git a/conf/.gitignore b/conf/.gitignore new file mode 100644 index 00000000..06cf6539 --- /dev/null +++ b/conf/.gitignore @@ -0,0 +1 @@ +cache From 77c0153c3f15d195a57fd9479f862b4d973b2aae Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 21:46:00 +0100 Subject: [PATCH 0103/6109] remove useless helper script Signed-off-by: Nico Schottelius --- doc_show_all_exported_variables | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 doc_show_all_exported_variables diff --git a/doc_show_all_exported_variables b/doc_show_all_exported_variables deleted file mode 100644 index 921a6f94..00000000 --- a/doc_show_all_exported_variables +++ /dev/null @@ -1,4 +0,0 @@ -cat bin/* | awk '/^export/ { print $2 }' - -# __cdist_intern_* : set by internal processes -# __cdist_explore_* : filled with information of the target host From 9c402d4a3ef410979e8ac9471a53e053b4df5e5d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 21:49:01 +0100 Subject: [PATCH 0104/6109] Describe latest features Signed-off-by: Nico Schottelius --- HACHERS_README => HACKERS_README | 7 +++++-- README | 2 +- bin/cdist-config | 8 ++------ 3 files changed, 8 insertions(+), 9 deletions(-) rename HACHERS_README => HACKERS_README (66%) diff --git a/HACHERS_README b/HACKERS_README similarity index 66% rename from HACHERS_README rename to HACKERS_README index 908292f9..1a540f16 100644 --- a/HACHERS_README +++ b/HACKERS_README @@ -14,5 +14,8 @@ What you can do so far: # prepare use: export PATH="$PATH:$(pwd -P)/bin" -## Test config tree wrapper -cd test && ./cdist-cconfig-tree +# Test first level manifest execution +__cdist_config=$(pwd -P)/conf __cdist_target_host=ikq02.ethz.ch cdist-manifest-init + +# See what it generated +find conf/cache diff --git a/README b/README index c1247abd..585317cb 120000 --- a/README +++ b/README @@ -1 +1 @@ -HACHERS_README \ No newline at end of file +HACKERS_README \ No newline at end of file diff --git a/bin/cdist-config b/bin/cdist-config index aaba9c74..1e3b2392 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -21,6 +21,8 @@ # Print configuration directories - helper for all other scripts # +# Values can be overriden from outside, so you can +# customise paths as you like (for distributors, geeks and hackers) : ${__cdist_config:=/etc/cdist} : ${__cdist_manifest_dir:=$__cdist_config/manifests} : ${__cdist_manifest_init:=$__cdist_manifest_dir/init} @@ -31,12 +33,6 @@ : ${__cdist_cache_hosts:=$__cdist_cache_dir/hosts} : ${__cdist_cache_bin:=$__cdist_cache_dir/bin} - -# obsolete?: lib not needed, hosts replaced by manifests, modules by types -: ${__cdist_modules:=$__cdist_config/modules} -: ${__cdist_coredir:=$__cdist_config/core} - - # create basedir + tempfile for direct usage # FIXME: remove on exit : ${__cdist_tmp_dir:=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX")} From bf0c2bb6b518b94e35242017a88cf7a386b93fb2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 21:49:49 +0100 Subject: [PATCH 0105/6109] +pub target Signed-off-by: Nico Schottelius --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index aa6eb777..d1123f31 100644 --- a/Makefile +++ b/Makefile @@ -10,3 +10,6 @@ sync: web: cp REAL_README $$HOME/niconetz/software/cdist.mdwn + +pub: + git push --mirror From 853d9bcf5ffef708578d87ae99d2bcad401121ea Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 21:54:30 +0100 Subject: [PATCH 0106/6109] [doc] update manpage Signed-off-by: Nico Schottelius --- doc/man/cdist.text | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/man/cdist.text b/doc/man/cdist.text index efc7433d..262bceb2 100644 --- a/doc/man/cdist.text +++ b/doc/man/cdist.text @@ -10,13 +10,13 @@ cdist - Configuration distribution system DESCRIPTION ----------- -Cdist allows you to define centrally a configurations for -all systems and apply them. Cdist generally uses the push +Cdist allows you to centrally define a configurations for +UNIX systems and apply them. Cdist generally uses the push approach (a server pushes out the configuration to the clients), but can also be used the pull way (see cdist-push-pull(7)). Cdist is configured in shell syntax, which is "compiled" to an -internal configuration representation (cconfig), which again +internal configuration representation (cdist-cconfig(7)), which again is used to generate an executable, which is run on the client (see cdist-language(7), cdist-design(7)). @@ -24,6 +24,12 @@ To get your fingers dirty with cdist very quick, have a look at cdist-quickstart(7). +REQUIREMENTS +------------ +Cdist requires enabled ssh-server and a posix shell on the clients and +ssh-client and posix shell on the server. + + SEE ALSO -------- Website: http://www.nico.schottelius.org/cdist/[] From a9dead58f750ff01bf1efcaf00a5320a2dfc107b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 21:57:04 +0100 Subject: [PATCH 0107/6109] -todo Signed-off-by: Nico Schottelius --- TODO | 1 - doc/man/cdist-manifests.text | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/TODO b/TODO index 56abaed6..f75e2464 100644 --- a/TODO +++ b/TODO @@ -6,7 +6,6 @@ - cdist-push-pull - cdist-quickstart - add terminology - - define entry point - define modules / mix with library? - and entry point is my only real configuration? - define steps within configuration apply diff --git a/doc/man/cdist-manifests.text b/doc/man/cdist-manifests.text index de26ef5f..60bf31a2 100644 --- a/doc/man/cdist-manifests.text +++ b/doc/man/cdist-manifests.text @@ -13,6 +13,7 @@ DESCRIPTION Using the available types and shell language, you can create mappings of what should be configured on a host. +ENTRYPOINT: $prefix/manifests/init ENVIRONMENT From c26ecb46b628e9e4d659f4f4d7905f1a5dfa29b7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 21:57:47 +0100 Subject: [PATCH 0108/6109] no function, no module support, only types Signed-off-by: Nico Schottelius --- TODO | 4 ---- 1 file changed, 4 deletions(-) diff --git a/TODO b/TODO index f75e2464..3bdfc42d 100644 --- a/TODO +++ b/TODO @@ -6,8 +6,6 @@ - cdist-push-pull - cdist-quickstart - add terminology - - define modules / mix with library? - - and entry point is my only real configuration? - define steps within configuration apply - detect impossible/unsafe things: - creating a file twice @@ -20,8 +18,6 @@ - SHELL SCRIPTS! (executables? do not support?) - stdout - cleanup / integrate doc/man/cdist.text - - define how to write / provide functions - - keep generic / easy extension - cdist-deply-to - sync conf/{lib/,modules,host/$name} - cdist-explore From 978d2af068e9d81e60bda5b337c7d9b958e3804e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 21:59:48 +0100 Subject: [PATCH 0109/6109] reorder todo Signed-off-by: Nico Schottelius --- TODO | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index 3bdfc42d..e29af3c6 100644 --- a/TODO +++ b/TODO @@ -5,6 +5,7 @@ - cdist-design.text [IMPORTANT] - cdist-push-pull - cdist-quickstart + - cdist-types [IMPORTANT] - add terminology - define steps within configuration apply - detect impossible/unsafe things: @@ -18,18 +19,15 @@ - SHELL SCRIPTS! (executables? do not support?) - stdout - cleanup / integrate doc/man/cdist.text -- cdist-deply-to - - sync conf/{lib/,modules,host/$name} - cdist-explore - add more stuff to explore - write manpage -- cdist-build-explorer| ssh localhost - Create usable Makefile - install -- to implement (from puppet): - - package management and different "providers" +- types needed (inspired by what I use from puppet) + - package management - file / directory handling - - ssh key handling + - ssh-host-key: that uses cache / explored data from hosts! - services - user management - including passwords From 90f51cb867d9f3bae38ba05ef832bd73105f461a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 22:00:08 +0100 Subject: [PATCH 0110/6109] no external ressources needed, take cache for that Signed-off-by: Nico Schottelius --- TODO | 4 ---- 1 file changed, 4 deletions(-) diff --git a/TODO b/TODO index e29af3c6..c9028531 100644 --- a/TODO +++ b/TODO @@ -31,10 +31,6 @@ - services - user management - including passwords - - integrate "external ressources" - - probably via explorer - - what about blobs? - - what about source = ${host}/.../ - to implement (from cfengine): - file editing (sed, awk) - huge library of functions shipped by default From a57402299cc27c35ab8ffb12e3022dd7eb7426ae Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 22:04:29 +0100 Subject: [PATCH 0111/6109] shrink todo file (this is a good day) Signed-off-by: Nico Schottelius --- TODO | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/TODO b/TODO index c9028531..1a0f2996 100644 --- a/TODO +++ b/TODO @@ -13,6 +13,7 @@ - installing and removing a package - and report location of occurence - parse afterwards? + - multi master setups - how to define templates - variable substitution from shell may be problematic @@ -22,24 +23,25 @@ - cdist-explore - add more stuff to explore - write manpage + - save in cache as well - Create usable Makefile - install -- types needed (inspired by what I use from puppet) +- types needed: - package management - file / directory handling - ssh-host-key: that uses cache / explored data from hosts! - services - user management - including passwords -- to implement (from cfengine): - - file editing (sed, awk) - - huge library of functions shipped by default - - disconnected clients with "cache" + - file editing + - add_line_to_file_if_not_existing + - delete_line_from_file + - regexp replace (can probably cover all?) - release first public version, which includes at least: - manpages - - only do necessary work - - install packages only if not existent - - copy file only if different + - only do necessary work [TYPE IMPLEMENTATION HINTS] + - install packages only if not existent + - copy file only if different Before initial release, document: @@ -50,10 +52,3 @@ Before initial release, document: - cdist_file - cdist_dir - - --------------------------------------------------------------------------------- -Later: - - - multi master setups - - pull strategy From 39595f321f800a9ba1787ca5e2e53f41d4f2c912 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 22:06:51 +0100 Subject: [PATCH 0112/6109] unify error messages Signed-off-by: Nico Schottelius --- bin/cdist-build | 2 +- bin/cdist-compile | 2 +- bin/cdist-deploy-to | 2 +- bin/cdist-preprocess | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/cdist-build b/bin/cdist-build index 8306242b..f5d5b870 100755 --- a/bin/cdist-build +++ b/bin/cdist-build @@ -23,7 +23,7 @@ . cdist-config -[ $# -eq 1 ] || __cdist_usage "target_host" +[ $# -eq 1 ] || __cdist_usage "" set -e diff --git a/bin/cdist-compile b/bin/cdist-compile index 2e5b7f8d..78b28263 100755 --- a/bin/cdist-compile +++ b/bin/cdist-compile @@ -21,6 +21,6 @@ # Compile configuration - create cconfig from manifests # -[ $# -eq 1 ] || __cdist_usage "target" +[ $# -eq 1 ] || __cdist_usage "" echo This script should run the manifest file diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 072c6925..0cd73fdb 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -23,7 +23,7 @@ . cdist-config -[ $# -eq 1 ] || __cdist_usage "target" +[ $# -eq 1 ] || __cdist_usage "target_host" set -e diff --git a/bin/cdist-preprocess b/bin/cdist-preprocess index 822b7008..5fdab20e 100755 --- a/bin/cdist-preprocess +++ b/bin/cdist-preprocess @@ -23,7 +23,7 @@ . cdist-config -[ $# -eq 1 ] || __cdist_usage "target" +[ $# -eq 1 ] || __cdist_usage "" set -e cdist-build-explorer | ssh "$1" > "${__cdist_tmp_file}" From de28cf82e6c3dc7f550a613a7f8896ebc4f52e00 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 22:09:36 +0100 Subject: [PATCH 0113/6109] begin to cleanup obsoleted conf/lib directory Signed-off-by: Nico Schottelius --- conf/{lib => explorer}/cdist_explore_hostname.sh | 0 conf/{lib => explorer}/cdist_explore_os.sh | 0 conf/{lib => explorer}/cdist_explore_pkg_system.sh | 0 conf/{lib => types/file}/cdist_dir.sh | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename conf/{lib => explorer}/cdist_explore_hostname.sh (100%) rename conf/{lib => explorer}/cdist_explore_os.sh (100%) rename conf/{lib => explorer}/cdist_explore_pkg_system.sh (100%) rename conf/{lib => types/file}/cdist_dir.sh (100%) diff --git a/conf/lib/cdist_explore_hostname.sh b/conf/explorer/cdist_explore_hostname.sh similarity index 100% rename from conf/lib/cdist_explore_hostname.sh rename to conf/explorer/cdist_explore_hostname.sh diff --git a/conf/lib/cdist_explore_os.sh b/conf/explorer/cdist_explore_os.sh similarity index 100% rename from conf/lib/cdist_explore_os.sh rename to conf/explorer/cdist_explore_os.sh diff --git a/conf/lib/cdist_explore_pkg_system.sh b/conf/explorer/cdist_explore_pkg_system.sh similarity index 100% rename from conf/lib/cdist_explore_pkg_system.sh rename to conf/explorer/cdist_explore_pkg_system.sh diff --git a/conf/lib/cdist_dir.sh b/conf/types/file/cdist_dir.sh similarity index 100% rename from conf/lib/cdist_dir.sh rename to conf/types/file/cdist_dir.sh From 5e8a544441697edbae712658bd5229c85912c6b4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 22:15:54 +0100 Subject: [PATCH 0114/6109] [doc] create new explorer manpage Signed-off-by: Nico Schottelius --- doc/man/cdist-explorer-coordinator.text | 34 +++++++++++++++++++++++++ doc/man/cdist-explorer.text | 22 ++++++---------- 2 files changed, 42 insertions(+), 14 deletions(-) create mode 100644 doc/man/cdist-explorer-coordinator.text diff --git a/doc/man/cdist-explorer-coordinator.text b/doc/man/cdist-explorer-coordinator.text new file mode 100644 index 00000000..23a94eef --- /dev/null +++ b/doc/man/cdist-explorer-coordinator.text @@ -0,0 +1,34 @@ +cdist-explorer-coordinator(1) +============================= +Nico Schottelius + + +NAME +---- +cdist-explorer-coordinator - Coordinate explorer on target systems + +DESCRIPTION +----------- + +The cdist-explorer-coordinator is responsible for getting information +about the target system. Its job is to find locally the available +explorers and prepare them for execution on the remote host. + +Each and every explorer may return the information from the target system, +which is assigned to a local variable of the name __explorer_EXPLORERNAME. + +NOTES +----- +The first version of the cdist-explorer-coordinator (named cdist-build-explorer) +used to create strings remote, taken literally. saves ssh, insecure. + +SEE ALSO +-------- +cdist(7) + + +COPYING +------- +Copyright \(C) 2010 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). + diff --git a/doc/man/cdist-explorer.text b/doc/man/cdist-explorer.text index 23a94eef..d3141cd4 100644 --- a/doc/man/cdist-explorer.text +++ b/doc/man/cdist-explorer.text @@ -1,26 +1,20 @@ -cdist-explorer-coordinator(1) -============================= +cdist-explorer(7) +================= Nico Schottelius NAME ---- -cdist-explorer-coordinator - Coordinate explorer on target systems +cdist-explorer - Explore the target systems DESCRIPTION ----------- +Cdist explorer are small shell scripts, which will be executed +on the target host. The aim of the explorer is to give hints +to types on how to act on the target system. -The cdist-explorer-coordinator is responsible for getting information -about the target system. Its job is to find locally the available -explorers and prepare them for execution on the remote host. - -Each and every explorer may return the information from the target system, -which is assigned to a local variable of the name __explorer_EXPLORERNAME. - -NOTES ------ -The first version of the cdist-explorer-coordinator (named cdist-build-explorer) -used to create strings remote, taken literally. saves ssh, insecure. +Explorer are located below $config_dir/explorer. Their name +must be usable as a environment variable. SEE ALSO -------- From 3c32bd67e5fd92111450a14602cc254e237e0750 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 22:19:00 +0100 Subject: [PATCH 0115/6109] update copyright Signed-off-by: Nico Schottelius --- doc/man/cdist-config.text | 2 +- doc/man/cdist-design.text | 2 +- doc/man/cdist-environment.text | 2 +- doc/man/cdist-explorer-coordinator.text | 2 +- doc/man/cdist-explorer.text | 9 ++++++++- doc/man/cdist-language.text | 2 +- doc/man/cdist-manifests.text | 2 +- doc/man/cdist-terms.text | 2 +- doc/man/cdist.text | 2 +- 9 files changed, 16 insertions(+), 9 deletions(-) diff --git a/doc/man/cdist-config.text b/doc/man/cdist-config.text index c9ff03f7..969be9cc 100644 --- a/doc/man/cdist-config.text +++ b/doc/man/cdist-config.text @@ -26,5 +26,5 @@ Main web site: http://www.nico.schottelius.org/cdist/[] COPYING ------- -Copyright \(C) 2010 Nico Schottelius. Free use of this software is +Copyright \(C) 2010-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/doc/man/cdist-design.text b/doc/man/cdist-design.text index 6639e9fc..a0cb60aa 100644 --- a/doc/man/cdist-design.text +++ b/doc/man/cdist-design.text @@ -81,6 +81,6 @@ cdist(7), website: http://www.nico.schottelius.org/cdist/[] COPYING ------- -Copyright \(C) 2010 Nico Schottelius. Free use of this software is +Copyright \(C) 2010-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/doc/man/cdist-environment.text b/doc/man/cdist-environment.text index b8db420e..4e8109ae 100644 --- a/doc/man/cdist-environment.text +++ b/doc/man/cdist-environment.text @@ -28,5 +28,5 @@ EXAPMLES COPYING ------- -Copyright \(C) 2010 Nico Schottelius. Free use of this software is +Copyright \(C) 2010-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/doc/man/cdist-explorer-coordinator.text b/doc/man/cdist-explorer-coordinator.text index 23a94eef..e30f26c2 100644 --- a/doc/man/cdist-explorer-coordinator.text +++ b/doc/man/cdist-explorer-coordinator.text @@ -29,6 +29,6 @@ cdist(7) COPYING ------- -Copyright \(C) 2010 Nico Schottelius. Free use of this software is +Copyright \(C) 2010-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/doc/man/cdist-explorer.text b/doc/man/cdist-explorer.text index d3141cd4..a0b1d63a 100644 --- a/doc/man/cdist-explorer.text +++ b/doc/man/cdist-explorer.text @@ -16,6 +16,13 @@ to types on how to act on the target system. Explorer are located below $config_dir/explorer. Their name must be usable as a environment variable. +The shell script must output the result of its investigation +to stdout. The output may be empty. + +In case of significant errors, the shell script may exit +non-zero and return an error message on stderr, which +will cause the cdist run to abort. + SEE ALSO -------- cdist(7) @@ -23,6 +30,6 @@ cdist(7) COPYING ------- -Copyright \(C) 2010 Nico Schottelius. Free use of this software is +Copyright \(C) 2010-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/doc/man/cdist-language.text b/doc/man/cdist-language.text index d920ac8f..d3544474 100644 --- a/doc/man/cdist-language.text +++ b/doc/man/cdist-language.text @@ -73,5 +73,5 @@ SEE ALSO COPYING ------- -Copyright \(C) 2010 Nico Schottelius. Free use of this software is +Copyright \(C) 2010-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/doc/man/cdist-manifests.text b/doc/man/cdist-manifests.text index 60bf31a2..c382fce5 100644 --- a/doc/man/cdist-manifests.text +++ b/doc/man/cdist-manifests.text @@ -30,5 +30,5 @@ EXAPMLES COPYING ------- -Copyright \(C) 2010 Nico Schottelius. Free use of this software is +Copyright \(C) 2010-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/doc/man/cdist-terms.text b/doc/man/cdist-terms.text index e9bd70bb..530c4762 100644 --- a/doc/man/cdist-terms.text +++ b/doc/man/cdist-terms.text @@ -22,5 +22,5 @@ SEE ALSO COPYING ------- -Copyright \(C) 2010 Nico Schottelius. Free use of this software is +Copyright \(C) 2010-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/doc/man/cdist.text b/doc/man/cdist.text index 262bceb2..18f03489 100644 --- a/doc/man/cdist.text +++ b/doc/man/cdist.text @@ -37,5 +37,5 @@ Website: http://www.nico.schottelius.org/cdist/[] COPYING ------- -Copyright \(C) 2010 Nico Schottelius. Free use of this software is +Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is granted under the terms of the GNU General Public License version 3 (GPLv3). From 3d556d044892e56eeb2f4e0796b317c5779b4d33 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 22:19:45 +0100 Subject: [PATCH 0116/6109] cleanup explorer naming Signed-off-by: Nico Schottelius --- conf/explorer/{cdist_explore_hostname.sh => hostname} | 0 conf/explorer/{cdist_explore_os.sh => os} | 0 conf/explorer/{cdist_explore_pkg_system.sh => pkg_system} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename conf/explorer/{cdist_explore_hostname.sh => hostname} (100%) mode change 100644 => 100755 rename conf/explorer/{cdist_explore_os.sh => os} (100%) mode change 100644 => 100755 rename conf/explorer/{cdist_explore_pkg_system.sh => pkg_system} (100%) mode change 100644 => 100755 diff --git a/conf/explorer/cdist_explore_hostname.sh b/conf/explorer/hostname old mode 100644 new mode 100755 similarity index 100% rename from conf/explorer/cdist_explore_hostname.sh rename to conf/explorer/hostname diff --git a/conf/explorer/cdist_explore_os.sh b/conf/explorer/os old mode 100644 new mode 100755 similarity index 100% rename from conf/explorer/cdist_explore_os.sh rename to conf/explorer/os diff --git a/conf/explorer/cdist_explore_pkg_system.sh b/conf/explorer/pkg_system old mode 100644 new mode 100755 similarity index 100% rename from conf/explorer/cdist_explore_pkg_system.sh rename to conf/explorer/pkg_system From d171ad5e640d297ba7e899200eb6a305670febdf Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Feb 2011 22:24:21 +0100 Subject: [PATCH 0117/6109] restructure explorer Signed-off-by: Nico Schottelius --- ROADMAP | 3 ++- bin/cdist-deploy-to | 4 ++-- conf/explorer/hostname | 5 +---- conf/explorer/os | 20 ++++++++------------ doc/man/cdist-explorer.text | 3 +++ 5 files changed, 16 insertions(+), 19 deletions(-) diff --git a/ROADMAP b/ROADMAP index bb42930a..5e1f1d65 100644 --- a/ROADMAP +++ b/ROADMAP @@ -5,7 +5,8 @@ x Define how to get information from clients x Create configuration tree from manifest x write binaries, which create the tree when called from manifest (cdist_tree_wrapper) x Define configuration paths (doc/internal/config-layout) -- Write at least one type +- redo explorers (see manpage) +/ Write at least one type - Parse configuration tree / generate code to be executed on client - types? - can/may types modify tree? diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 0cd73fdb..02e0a3a0 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -23,13 +23,13 @@ . cdist-config -[ $# -eq 1 ] || __cdist_usage "target_host" +[ $# -eq 1 ] || __cdist_usage "" set -e # Internal variables, usable by export __cdist_target_host="$1" -export __cdist_intern_deploy_host="$(cdist_explore_hostname)" +export __cdist_source_host="$(cdist_explore_hostname)" . cdist-build "$__cdist_intern_target_host" . cdist-remote-exec "$__cdist_intern_target_host" diff --git a/conf/explorer/hostname b/conf/explorer/hostname index dbc0df1b..49e0d2cc 100755 --- a/conf/explorer/hostname +++ b/conf/explorer/hostname @@ -19,7 +19,4 @@ # # -cdist_explore_hostname() -{ - hostname -} +hostname diff --git a/conf/explorer/os b/conf/explorer/os index 76c3f896..d460cab3 100755 --- a/conf/explorer/os +++ b/conf/explorer/os @@ -22,18 +22,14 @@ # # -cdist_explore_os() -{ - # Ubuntu is also Debian, thus return if Ubuntu was found - if grep -q ^DISTRIB_ID=Ubuntu /etc/lsb-release 2>/dev/null; then - echo ubuntu - return - fi +# Ubuntu is also Debian, thus return if Ubuntu was found +if grep -q ^DISTRIB_ID=Ubuntu /etc/lsb-release 2>/dev/null; then + echo ubuntu + exit 0 +fi - [ -f /etc/arch-release ] && echo archlinux +[ -f /etc/arch-release ] && echo archlinux - [ -f /etc/debian_version ] && echo debian +[ -f /etc/debian_version ] && echo debian - [ -f /etc/redhat-release ] && echo redhat - -} +[ -f /etc/redhat-release ] && echo redhat diff --git a/doc/man/cdist-explorer.text b/doc/man/cdist-explorer.text index a0b1d63a..45022f31 100644 --- a/doc/man/cdist-explorer.text +++ b/doc/man/cdist-explorer.text @@ -23,6 +23,9 @@ In case of significant errors, the shell script may exit non-zero and return an error message on stderr, which will cause the cdist run to abort. +Explorers can reuse other explorers on the target system +by calling $__cdist_explorer_path/. + SEE ALSO -------- cdist(7) From 4b5d7dda25498c7630547d845bc0a59620ec6cb3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Feb 2011 13:24:56 +0100 Subject: [PATCH 0118/6109] mega cleaunp discussion commit :-) Signed-off-by: Nico Schottelius --- HACKERS_README | 4 +- TODO | 10 ++-- bin/cdist-apply | 41 --------------- ...cdist-template => cdist-template.obsolete} | 0 conf/{explorer => explorers}/hostname | 0 conf/{explorer => explorers}/os | 0 conf/{explorer => explorers}/pkg_system | 0 conf/{lib => lib.obsoleted}/cdist_file.sh | 0 conf/{lib => lib.obsoleted}/cdist_package.sh | 0 .../cdist_package_backend_pacman_install.sh | 0 .../cdist_package_select_backend.sh | 0 .../collectd/manifest | 0 .../efsh/base.sh | 0 .../efsh/test.sh | 0 .../nginx-website/nginx_config.sh | 0 .../postgresql/init | 0 doc/{internal => dev}/git-post-commit-hook | 0 .../cdist-cache.TO_MAN} | 0 .../cdist-hacking.TO_MAN} | 2 + .../cdist-types.CLEANUP+INTEGRATE_MAN} | 0 .../config-layout.TO_MAN} | 7 ++- ...-implementation-ideas.TO_FINISH_AND_DELETE | 22 ++++++++ .../header | 0 .../logs/2010-09-25 | 0 .../logs/2010-11-02.steven | 0 .../logs/2010-11-09 | 0 .../logs/2010-11-21 | 0 .../logs/2010-11-29 | 0 .../logs/2010-12-01 | 0 .../logs/2011-01-17 | 0 .../logs/2011-01-18.type-creation | 0 .../logs/2011-01-24 | 0 doc/internal.REMOVE_PRE_1.0/logs/2011-02-03 | 50 +++++++++++++++++++ .../logs/stevens_ideas | 0 .../puppet-analysis.REMOVE_PRE_1.0} | 0 doc/internal/explorer-implementation-ideas | 12 ----- doc/internal/profile | 2 - doc/internal/shell-hints | 1 - ...st-explorer-coordinator-may-be-bogus.text} | 0 ...ist-explorer.text => cdist-explorers.text} | 0 40 files changed, 84 insertions(+), 67 deletions(-) delete mode 100755 bin/cdist-apply rename bin/{cdist-template => cdist-template.obsolete} (100%) rename conf/{explorer => explorers}/hostname (100%) rename conf/{explorer => explorers}/os (100%) rename conf/{explorer => explorers}/pkg_system (100%) rename conf/{lib => lib.obsoleted}/cdist_file.sh (100%) rename conf/{lib => lib.obsoleted}/cdist_package.sh (100%) rename conf/{lib => lib.obsoleted}/cdist_package_backend_pacman_install.sh (100%) rename conf/{lib => lib.obsoleted}/cdist_package_select_backend.sh (100%) rename conf/{modules => modules.obsoleted}/collectd/manifest (100%) rename conf/{modules => modules.obsoleted}/efsh/base.sh (100%) rename conf/{modules => modules.obsoleted}/efsh/test.sh (100%) rename conf/{modules => modules.obsoleted}/nginx-website/nginx_config.sh (100%) rename conf/{modules => modules.obsoleted}/postgresql/init (100%) rename doc/{internal => dev}/git-post-commit-hook (100%) rename doc/{internal/knowledge-about-other-hosts => internal.REMOVE_PRE_1.0/cdist-cache.TO_MAN} (100%) rename doc/{internal/csh-profile => internal.REMOVE_PRE_1.0/cdist-hacking.TO_MAN} (52%) rename doc/{internal/type-integration => internal.REMOVE_PRE_1.0/cdist-types.CLEANUP+INTEGRATE_MAN} (100%) rename doc/{internal/config-layout => internal.REMOVE_PRE_1.0/config-layout.TO_MAN} (87%) create mode 100644 doc/internal.REMOVE_PRE_1.0/explorer-implementation-ideas.TO_FINISH_AND_DELETE rename doc/{internal => internal.REMOVE_PRE_1.0}/header (100%) rename doc/{internal => internal.REMOVE_PRE_1.0}/logs/2010-09-25 (100%) rename doc/{internal => internal.REMOVE_PRE_1.0}/logs/2010-11-02.steven (100%) rename doc/{internal => internal.REMOVE_PRE_1.0}/logs/2010-11-09 (100%) rename doc/{internal => internal.REMOVE_PRE_1.0}/logs/2010-11-21 (100%) rename doc/{internal => internal.REMOVE_PRE_1.0}/logs/2010-11-29 (100%) rename doc/{internal => internal.REMOVE_PRE_1.0}/logs/2010-12-01 (100%) rename doc/{internal => internal.REMOVE_PRE_1.0}/logs/2011-01-17 (100%) rename doc/{internal => internal.REMOVE_PRE_1.0}/logs/2011-01-18.type-creation (100%) rename doc/{internal => internal.REMOVE_PRE_1.0}/logs/2011-01-24 (100%) create mode 100644 doc/internal.REMOVE_PRE_1.0/logs/2011-02-03 rename doc/{internal => internal.REMOVE_PRE_1.0}/logs/stevens_ideas (100%) rename doc/{internal/puppet-analysis => internal.REMOVE_PRE_1.0/puppet-analysis.REMOVE_PRE_1.0} (100%) delete mode 100644 doc/internal/explorer-implementation-ideas delete mode 100644 doc/internal/profile delete mode 100644 doc/internal/shell-hints rename doc/man/{cdist-explorer-coordinator.text => cdist-explorer-coordinator-may-be-bogus.text} (100%) rename doc/man/{cdist-explorer.text => cdist-explorers.text} (100%) diff --git a/HACKERS_README b/HACKERS_README index 1a540f16..4d497573 100644 --- a/HACKERS_README +++ b/HACKERS_README @@ -9,13 +9,13 @@ Do not believe anything written in cdist, besides what's written in this file -- Nico, 20101201 -What you can do so far: +What you can do so far: (executed from top level directory) # prepare use: export PATH="$PATH:$(pwd -P)/bin" # Test first level manifest execution -__cdist_config=$(pwd -P)/conf __cdist_target_host=ikq02.ethz.ch cdist-manifest-init +__cdist_config=$(pwd -P)/conf __cdist_target_host=ikq02.ethz.ch cdist-manifest-init # See what it generated find conf/cache diff --git a/TODO b/TODO index 1a0f2996..4b6c10b3 100644 --- a/TODO +++ b/TODO @@ -6,6 +6,7 @@ - cdist-push-pull - cdist-quickstart - cdist-types [IMPORTANT] + - cdist.text [IMPORTANT] - add terminology - define steps within configuration apply - detect impossible/unsafe things: @@ -14,12 +15,11 @@ - and report location of occurence - parse afterwards? - multi master setups - - - how to define templates - - variable substitution from shell may be problematic + - templating + - how to define templates + - variable substitution from shell may be problematic - SHELL SCRIPTS! (executables? do not support?) - - stdout - - cleanup / integrate doc/man/cdist.text + - stdout == output of template == what will be used - cdist-explore - add more stuff to explore - write manpage diff --git a/bin/cdist-apply b/bin/cdist-apply deleted file mode 100755 index cbe84253..00000000 --- a/bin/cdist-apply +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh -# -# 2010 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 . -# -# -# Apply configuration to local host -# - -. cdist-config - -whereiam="$(cdist_explore_hostname)" -conf="${CDIST_HOSTS}/${whereiam}" - -if [ ! -d "${conf}" ]; then - echo "Sorry, ${whereiam} has no configuration" - exit 1 -fi - -# Run the manifest, but abort on first error -set -e - -# change to config dir, to be able to use relative filenames -cd "${conf}" - -# And apply the stuff -. "${conf}/manifest" diff --git a/bin/cdist-template b/bin/cdist-template.obsolete similarity index 100% rename from bin/cdist-template rename to bin/cdist-template.obsolete diff --git a/conf/explorer/hostname b/conf/explorers/hostname similarity index 100% rename from conf/explorer/hostname rename to conf/explorers/hostname diff --git a/conf/explorer/os b/conf/explorers/os similarity index 100% rename from conf/explorer/os rename to conf/explorers/os diff --git a/conf/explorer/pkg_system b/conf/explorers/pkg_system similarity index 100% rename from conf/explorer/pkg_system rename to conf/explorers/pkg_system diff --git a/conf/lib/cdist_file.sh b/conf/lib.obsoleted/cdist_file.sh similarity index 100% rename from conf/lib/cdist_file.sh rename to conf/lib.obsoleted/cdist_file.sh diff --git a/conf/lib/cdist_package.sh b/conf/lib.obsoleted/cdist_package.sh similarity index 100% rename from conf/lib/cdist_package.sh rename to conf/lib.obsoleted/cdist_package.sh diff --git a/conf/lib/cdist_package_backend_pacman_install.sh b/conf/lib.obsoleted/cdist_package_backend_pacman_install.sh similarity index 100% rename from conf/lib/cdist_package_backend_pacman_install.sh rename to conf/lib.obsoleted/cdist_package_backend_pacman_install.sh diff --git a/conf/lib/cdist_package_select_backend.sh b/conf/lib.obsoleted/cdist_package_select_backend.sh similarity index 100% rename from conf/lib/cdist_package_select_backend.sh rename to conf/lib.obsoleted/cdist_package_select_backend.sh diff --git a/conf/modules/collectd/manifest b/conf/modules.obsoleted/collectd/manifest similarity index 100% rename from conf/modules/collectd/manifest rename to conf/modules.obsoleted/collectd/manifest diff --git a/conf/modules/efsh/base.sh b/conf/modules.obsoleted/efsh/base.sh similarity index 100% rename from conf/modules/efsh/base.sh rename to conf/modules.obsoleted/efsh/base.sh diff --git a/conf/modules/efsh/test.sh b/conf/modules.obsoleted/efsh/test.sh similarity index 100% rename from conf/modules/efsh/test.sh rename to conf/modules.obsoleted/efsh/test.sh diff --git a/conf/modules/nginx-website/nginx_config.sh b/conf/modules.obsoleted/nginx-website/nginx_config.sh similarity index 100% rename from conf/modules/nginx-website/nginx_config.sh rename to conf/modules.obsoleted/nginx-website/nginx_config.sh diff --git a/conf/modules/postgresql/init b/conf/modules.obsoleted/postgresql/init similarity index 100% rename from conf/modules/postgresql/init rename to conf/modules.obsoleted/postgresql/init diff --git a/doc/internal/git-post-commit-hook b/doc/dev/git-post-commit-hook similarity index 100% rename from doc/internal/git-post-commit-hook rename to doc/dev/git-post-commit-hook diff --git a/doc/internal/knowledge-about-other-hosts b/doc/internal.REMOVE_PRE_1.0/cdist-cache.TO_MAN similarity index 100% rename from doc/internal/knowledge-about-other-hosts rename to doc/internal.REMOVE_PRE_1.0/cdist-cache.TO_MAN diff --git a/doc/internal/csh-profile b/doc/internal.REMOVE_PRE_1.0/cdist-hacking.TO_MAN similarity index 52% rename from doc/internal/csh-profile rename to doc/internal.REMOVE_PRE_1.0/cdist-hacking.TO_MAN index 5dd85e2e..c7254168 100644 --- a/doc/internal/csh-profile +++ b/doc/internal.REMOVE_PRE_1.0/cdist-hacking.TO_MAN @@ -1,2 +1,4 @@ setenv PATH ${PATH}:${HOME}/cdist/bin setenv CDIST_CONFIG ${HOME}/cdist/conf +export PATH=$PATH:$HOME/cdist/bin +export CDIST_CONFIG=$HOME/cdist/conf diff --git a/doc/internal/type-integration b/doc/internal.REMOVE_PRE_1.0/cdist-types.CLEANUP+INTEGRATE_MAN similarity index 100% rename from doc/internal/type-integration rename to doc/internal.REMOVE_PRE_1.0/cdist-types.CLEANUP+INTEGRATE_MAN diff --git a/doc/internal/config-layout b/doc/internal.REMOVE_PRE_1.0/config-layout.TO_MAN similarity index 87% rename from doc/internal/config-layout rename to doc/internal.REMOVE_PRE_1.0/config-layout.TO_MAN index 72f1c1f7..97c0c22e 100644 --- a/doc/internal/config-layout +++ b/doc/internal.REMOVE_PRE_1.0/config-layout.TO_MAN @@ -8,7 +8,7 @@ conf/manifests/init will be available for tracking in cdist core functions -core/manifests/* (all other) +conf/manifests/* (all other) - same function as above - but won't be called by cdist - method to seperate configuration parts @@ -26,9 +26,8 @@ conf/types// but more like reusable defines - or may implement some functionality on their own -lib/types// - - same as above, but provided by the cdist distribution - - if name exists in both, conf/ has priority +conf/explorers/ + - explorers to be run on the target hosts Differences manifests vs. types diff --git a/doc/internal.REMOVE_PRE_1.0/explorer-implementation-ideas.TO_FINISH_AND_DELETE b/doc/internal.REMOVE_PRE_1.0/explorer-implementation-ideas.TO_FINISH_AND_DELETE new file mode 100644 index 00000000..31e4c048 --- /dev/null +++ b/doc/internal.REMOVE_PRE_1.0/explorer-implementation-ideas.TO_FINISH_AND_DELETE @@ -0,0 +1,22 @@ +1) safer and fast version + cat blob | ssh host > tmp; + for var in ... + var=grep ^var= tmp +2) slow & secure + for var in ... + eval var=$(cat single_blob | ssh host" + +3) easy & insecure + cat blob | ssh host > tmp; . tmp + +4) - rsync here/explorers target/explorers + - ssh target_host for explorer in target/explorers/; do + target/explorers/$explorer > target/cache/explorers/$explorer + done + - rsync target/cache/explorers here/cache/explorers.... + - MINUS RSYNC!!!!!!!!!?????????? + +-------------------------------------------------------------------------------- + +TO_MAN: EXPLORER VALUES ARE UNTRUSTED (think of webclients and webapps) + diff --git a/doc/internal/header b/doc/internal.REMOVE_PRE_1.0/header similarity index 100% rename from doc/internal/header rename to doc/internal.REMOVE_PRE_1.0/header diff --git a/doc/internal/logs/2010-09-25 b/doc/internal.REMOVE_PRE_1.0/logs/2010-09-25 similarity index 100% rename from doc/internal/logs/2010-09-25 rename to doc/internal.REMOVE_PRE_1.0/logs/2010-09-25 diff --git a/doc/internal/logs/2010-11-02.steven b/doc/internal.REMOVE_PRE_1.0/logs/2010-11-02.steven similarity index 100% rename from doc/internal/logs/2010-11-02.steven rename to doc/internal.REMOVE_PRE_1.0/logs/2010-11-02.steven diff --git a/doc/internal/logs/2010-11-09 b/doc/internal.REMOVE_PRE_1.0/logs/2010-11-09 similarity index 100% rename from doc/internal/logs/2010-11-09 rename to doc/internal.REMOVE_PRE_1.0/logs/2010-11-09 diff --git a/doc/internal/logs/2010-11-21 b/doc/internal.REMOVE_PRE_1.0/logs/2010-11-21 similarity index 100% rename from doc/internal/logs/2010-11-21 rename to doc/internal.REMOVE_PRE_1.0/logs/2010-11-21 diff --git a/doc/internal/logs/2010-11-29 b/doc/internal.REMOVE_PRE_1.0/logs/2010-11-29 similarity index 100% rename from doc/internal/logs/2010-11-29 rename to doc/internal.REMOVE_PRE_1.0/logs/2010-11-29 diff --git a/doc/internal/logs/2010-12-01 b/doc/internal.REMOVE_PRE_1.0/logs/2010-12-01 similarity index 100% rename from doc/internal/logs/2010-12-01 rename to doc/internal.REMOVE_PRE_1.0/logs/2010-12-01 diff --git a/doc/internal/logs/2011-01-17 b/doc/internal.REMOVE_PRE_1.0/logs/2011-01-17 similarity index 100% rename from doc/internal/logs/2011-01-17 rename to doc/internal.REMOVE_PRE_1.0/logs/2011-01-17 diff --git a/doc/internal/logs/2011-01-18.type-creation b/doc/internal.REMOVE_PRE_1.0/logs/2011-01-18.type-creation similarity index 100% rename from doc/internal/logs/2011-01-18.type-creation rename to doc/internal.REMOVE_PRE_1.0/logs/2011-01-18.type-creation diff --git a/doc/internal/logs/2011-01-24 b/doc/internal.REMOVE_PRE_1.0/logs/2011-01-24 similarity index 100% rename from doc/internal/logs/2011-01-24 rename to doc/internal.REMOVE_PRE_1.0/logs/2011-01-24 diff --git a/doc/internal.REMOVE_PRE_1.0/logs/2011-02-03 b/doc/internal.REMOVE_PRE_1.0/logs/2011-02-03 new file mode 100644 index 00000000..b82b4aa5 --- /dev/null +++ b/doc/internal.REMOVE_PRE_1.0/logs/2011-02-03 @@ -0,0 +1,50 @@ +Steven: + +- cdist-deploy-to = main script +- all user usable variables are defined using export __var=... +- cdist-explorer return one line of output (or empty) +- cdist-manifest-init: generates what the user defined to be configured on target host +- HACKERS_README == starting point (until 1.0) + - [12:49] kr:cdist% __cdist_config=$(pwd -P)/conf __cdist_target_host=ikq02.ethz.ch cdist-manifest-init +- cdist_tree_wrapper == non-user-binary => libexec +- conf/explorer collection of explorer +- config-layout: current status of configuration + - needs to go into manpage +- TODO: contains most up-to-date todo stuff, mid-term +- ROADMAP: next steps +- Documentation must be bit better than excellent at first release +- test/: ignore (braindump and pre-braindump) +- conf/ + cache: generated + explorer: ok => contains explores + lib: deprecated (does not exist) + manifests: entry point for config2host + types: cdist-types(7) +- alternative names for explorer: + - probe + - fact + - ... + - => STEVEN TO DECIDE +- explorer / execution: + - see explorer-implementation-ideas.TO_FINISH_AND_DELETE + +Todo: +- cdist-preprocess: + - fix call to cdist-build-explorer and transfer explorer to target host +- cdist-manifest-init/ cdist_tree_wrapper: + - fails on second run => use different cache! (old cache exists until new is valid!) +- .source in cdist_tree_wrapper records wrong source! +- cdist-config: + - use export to mark user available variables! +- doc/man/* => defined in TODO + + +Future: +- ids containing slashes for easier use in types? + - a) __file abc --source /path/from/abc --destination /path/to/abc + - b) id=abc + __file $id --source /path/from/$id --destination /path/to/$id + - c) __file abc --sourcedir /path/from/ --destination_dir /path/to/ + - type file defines that id is implicitly used when --...dir variants used + - d) __file /path/to/abc --source ? --destination ? + - reusing id with slashes would be nice diff --git a/doc/internal/logs/stevens_ideas b/doc/internal.REMOVE_PRE_1.0/logs/stevens_ideas similarity index 100% rename from doc/internal/logs/stevens_ideas rename to doc/internal.REMOVE_PRE_1.0/logs/stevens_ideas diff --git a/doc/internal/puppet-analysis b/doc/internal.REMOVE_PRE_1.0/puppet-analysis.REMOVE_PRE_1.0 similarity index 100% rename from doc/internal/puppet-analysis rename to doc/internal.REMOVE_PRE_1.0/puppet-analysis.REMOVE_PRE_1.0 diff --git a/doc/internal/explorer-implementation-ideas b/doc/internal/explorer-implementation-ideas deleted file mode 100644 index 9006b66f..00000000 --- a/doc/internal/explorer-implementation-ideas +++ /dev/null @@ -1,12 +0,0 @@ -1) safer and fast version - cat blob | ssh host > tmp; - for var in ... - var=grep ^var= tmp -2) slow & secure - for var in ... - eval var=$(cat single_blob | ssh host" - -3) easy & insecure - cat blob | ssh host > tmp; . tmp - - diff --git a/doc/internal/profile b/doc/internal/profile deleted file mode 100644 index e18cf3e3..00000000 --- a/doc/internal/profile +++ /dev/null @@ -1,2 +0,0 @@ -export PATH=$PATH:$HOME/cdist/bin -export CDIST_CONFIG=$HOME/cdist/conf diff --git a/doc/internal/shell-hints b/doc/internal/shell-hints deleted file mode 100644 index 0ad888d6..00000000 --- a/doc/internal/shell-hints +++ /dev/null @@ -1 +0,0 @@ -$0 evaluated in a sourced script returns name of the caller. diff --git a/doc/man/cdist-explorer-coordinator.text b/doc/man/cdist-explorer-coordinator-may-be-bogus.text similarity index 100% rename from doc/man/cdist-explorer-coordinator.text rename to doc/man/cdist-explorer-coordinator-may-be-bogus.text diff --git a/doc/man/cdist-explorer.text b/doc/man/cdist-explorers.text similarity index 100% rename from doc/man/cdist-explorer.text rename to doc/man/cdist-explorers.text From 3d940cda074b333bbeac842cf234e4f593ef8247 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Feb 2011 13:32:29 +0100 Subject: [PATCH 0119/6109] +testhost (gentoo) Signed-off-by: Nico Schottelius --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index d1123f31..28565e07 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,12 @@ install: cp bin/* $(BINDIR) sync: + # ubuntu .rsync lyni@tablett:cdist + # redhat .rsync nicosc@free.ethz.ch:cdist + # gentoo + .rsync nicosc@ru3.inf.ethz.ch:cdist web: cp REAL_README $$HOME/niconetz/software/cdist.mdwn From 8cfcaf30a48da8fd9cb60aa95415af045d3583f4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Feb 2011 17:39:32 +0100 Subject: [PATCH 0120/6109] adjust path to os explorer Signed-off-by: Nico Schottelius --- conf/explorers/pkg_system | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/conf/explorers/pkg_system b/conf/explorers/pkg_system index b8a44bab..db17f616 100755 --- a/conf/explorers/pkg_system +++ b/conf/explorers/pkg_system @@ -19,9 +19,6 @@ # # -cdist_explore_pkg_system() -{ - case "$(cdist_explore_os)" in +case "$(__cdist_explorer_dir/os)" in archlinux) echo pacman ;; - esac -} +esac From 8a802f6db37247ad754946d219fcb49a15d9697f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Feb 2011 17:40:30 +0100 Subject: [PATCH 0121/6109] add debian/ubuntu support for default pkg_system Signed-off-by: Nico Schottelius --- conf/explorers/pkg_system | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/explorers/pkg_system b/conf/explorers/pkg_system index db17f616..14f717ee 100755 --- a/conf/explorers/pkg_system +++ b/conf/explorers/pkg_system @@ -21,4 +21,5 @@ case "$(__cdist_explorer_dir/os)" in archlinux) echo pacman ;; + debian|ubuntu) echo apt ;; esac From 7c6a61f7517a0056675b99cf9eb746f9ed23ae88 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Feb 2011 17:40:57 +0100 Subject: [PATCH 0122/6109] +update header Signed-off-by: Nico Schottelius --- conf/explorers/hostname | 2 +- conf/explorers/os | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/explorers/hostname b/conf/explorers/hostname index 49e0d2cc..a3ae4e15 100755 --- a/conf/explorers/hostname +++ b/conf/explorers/hostname @@ -1,6 +1,6 @@ #!/bin/sh # -# 2010 Nico Schottelius (nico-cdist at schottelius.org) +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # diff --git a/conf/explorers/os b/conf/explorers/os index d460cab3..c7ccae01 100755 --- a/conf/explorers/os +++ b/conf/explorers/os @@ -1,6 +1,6 @@ #!/bin/sh # -# 2010 Nico Schottelius (nico-cdist at schottelius.org) +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # From 045c94952eb6ba513991b25bc36a1fc9ad72ed6e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Feb 2011 18:18:47 +0100 Subject: [PATCH 0123/6109] update header Signed-off-by: Nico Schottelius --- doc/{internal.REMOVE_PRE_1.0 => dev}/header | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename doc/{internal.REMOVE_PRE_1.0 => dev}/header (91%) diff --git a/doc/internal.REMOVE_PRE_1.0/header b/doc/dev/header similarity index 91% rename from doc/internal.REMOVE_PRE_1.0/header rename to doc/dev/header index 9eac6a74..6e673ae2 100755 --- a/doc/internal.REMOVE_PRE_1.0/header +++ b/doc/dev/header @@ -1,6 +1,6 @@ #!/bin/sh # -# 2010 Nico Schottelius (nico-cdist at schottelius.org) +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # From 0bd96e015cac171be891800a7abf506265d817c5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Feb 2011 18:28:10 +0100 Subject: [PATCH 0124/6109] requirement for explorers Signed-off-by: Nico Schottelius --- doc/man/cdist-explorers.text | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/man/cdist-explorers.text b/doc/man/cdist-explorers.text index 45022f31..99c7c609 100644 --- a/doc/man/cdist-explorers.text +++ b/doc/man/cdist-explorers.text @@ -26,6 +26,11 @@ will cause the cdist run to abort. Explorers can reuse other explorers on the target system by calling $__cdist_explorer_path/. +REQUIREMENTS +------------ +The directory $__cdist_remote_base_dir must be creatable +on the target host (i.e. requires read/write permission). + SEE ALSO -------- cdist(7) From 768c97ee489fcf8a17794febb3e3b107631522bc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 09:57:50 +0100 Subject: [PATCH 0125/6109] add script to coordinate run of explorers on the target Signed-off-by: Nico Schottelius --- bin/cdist-explorer-coordinator | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 bin/cdist-explorer-coordinator diff --git a/bin/cdist-explorer-coordinator b/bin/cdist-explorer-coordinator new file mode 100755 index 00000000..9d3c270a --- /dev/null +++ b/bin/cdist-explorer-coordinator @@ -0,0 +1,35 @@ +#!/bin/sh +# +# 2010-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 . +# +# +# Coordinate run of explorers on target +# + +. cdist-config + +[ $# -eq 2 ] || __cdist_usage " " + +set -e + +explorer_dir="$1"; shift +result_dir="$1"; shift + +cd "${explorer_dir}" +for explorer in *; do + ./$explorer > "${result_dir}/${explorer}" From 4450b2f573c50d317097dd1c465cb6750c485be7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 14:38:17 +0100 Subject: [PATCH 0126/6109] continue to integrate new explorer idea Signed-off-by: Nico Schottelius --- bin/cdist-build-explorer | 39 ------------------- bin/cdist-config | 9 +++++ bin/cdist-explorer-coordinator | 5 ++- bin/cdist-explorer-run | 68 ++++++++++++++++++++++++++++++++++ 4 files changed, 80 insertions(+), 41 deletions(-) delete mode 100755 bin/cdist-build-explorer create mode 100755 bin/cdist-explorer-run diff --git a/bin/cdist-build-explorer b/bin/cdist-build-explorer deleted file mode 100755 index 48ea38c8..00000000 --- a/bin/cdist-build-explorer +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# -# 2010 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 . -# -# - -. cdist-config - -find "${CDIST_LIBDIR}" -type f -name cdist_explore\*.sh > "${CDIST_TMP}" - -# first load all functions -while read funcfull; do - cat "${funcfull}" -done < "${CDIST_TMP}" - -# then execute functions -while read funcfull; do - sh="${funcfull##*/}" - func="${sh%.sh}" - var="__$func" - - echo "$var=\"\$($func)\"" - echo "echo $var=\\\"\$$var\\\"" -done < "${CDIST_TMP}" diff --git a/bin/cdist-config b/bin/cdist-config index 1e3b2392..4a7506ab 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -33,6 +33,15 @@ : ${__cdist_cache_hosts:=$__cdist_cache_dir/hosts} : ${__cdist_cache_bin:=$__cdist_cache_dir/bin} +: ${__cdist_explorer_dir:=$__cdist_config/explorers} + +# Paths used on the target - must be kind of secure.... +: ${__cdist_remote_base_dir:=/var/lib/cdist} +: ${__cdist_remote_explorer_dir:=$__cdist_remote_base/explorers} +: ${__cdist_remote_cache_dir:=$__cdist_remote_base/cache} +: ${__cdist_remote_cache_explorer:=$__cdist_remote_base/cache} +: ${__cdist_remote_cache_bin:=$__cdist_remote_base/bin} + # create basedir + tempfile for direct usage # FIXME: remove on exit : ${__cdist_tmp_dir:=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX")} diff --git a/bin/cdist-explorer-coordinator b/bin/cdist-explorer-coordinator index 9d3c270a..8556dbd9 100755 --- a/bin/cdist-explorer-coordinator +++ b/bin/cdist-explorer-coordinator @@ -18,7 +18,7 @@ # along with cdist. If not, see . # # -# Coordinate run of explorers on target +# Coordinate run of explorers on target (this script runs on the target) # . cdist-config @@ -32,4 +32,5 @@ result_dir="$1"; shift cd "${explorer_dir}" for explorer in *; do - ./$explorer > "${result_dir}/${explorer}" + "./$explorer" > "${result_dir}/${explorer}" +done diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run new file mode 100755 index 00000000..49e79de0 --- /dev/null +++ b/bin/cdist-explorer-run @@ -0,0 +1,68 @@ +#!/bin/sh +# +# 2010-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 . +# +# + +. cdist-config + +set -e + +# Transfer all explorers to the target dir - must be one level above, so +# coyping it multiple times works: a -> remote:/base/ = remote:/base/a vs. +# a -> remote:/base/a = remote:/base/a/a (second copy) +scp -r "${__cdist_explorer_dir}" \ + "root@${__cdist_target_host}:${__cdist_remote_cache_dir}" + +# Transfer explorer coordinator +scp "$(which cdist-explorer-coordinator)" \ + "root@${__cdist_target_host}:${__cdist_remote_cache_bin}" + +# Execute explorer coordinator, which will save results on target +ssh root@${__cdist_target_host} "\"${__cdist_remote_cache_bin}/cdist-explorer-coordinator\" \ + \"${__cdist_remote_explorer_dir}\" \"${__cdist_remote_cache_explorer}\"" + + +# Transfer back all results +scp -r "root@${__cdist_target_host}:${__cdist_remote_dir}" + + +exit 0 + +# -------------------------------------------------------------------------------- +# old idea with shell scripts (also sexy) +# Keep until above version successfully works + + +cd "${__cdist_explorer_dir}" +ls > "${__cdist_tmp_file}" + +# first load all functions +while read funcfull; do + cat "${funcfull}" +done < "${__cdist_tmp_file}" + +# then execute functions +while read funcfull; do + sh="${funcfull##*/}" + func="${sh%.sh}" + var="__$func" + + echo "$var=\"\$($func)\"" + echo "echo $var=\\\"\$$var\\\"" +done < "${CDIST_TMP}" From 16f51ca14d68ccaa0a299e9b70f2b37c7d9454e8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 22:39:26 +0100 Subject: [PATCH 0127/6109] Finish ugly explorer integration Signed-off-by: Nico Schottelius --- bin/cdist-config | 10 ++++++---- bin/cdist-deploy-to | 4 ++-- bin/cdist-explorer-run | 19 ++++++++++++++----- conf/explorers/os | 3 +++ conf/explorers/pkg_system | 4 +++- 5 files changed, 28 insertions(+), 12 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 4a7506ab..ff71ec80 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -37,10 +37,12 @@ # Paths used on the target - must be kind of secure.... : ${__cdist_remote_base_dir:=/var/lib/cdist} -: ${__cdist_remote_explorer_dir:=$__cdist_remote_base/explorers} -: ${__cdist_remote_cache_dir:=$__cdist_remote_base/cache} -: ${__cdist_remote_cache_explorer:=$__cdist_remote_base/cache} -: ${__cdist_remote_cache_bin:=$__cdist_remote_base/bin} +: ${__cdist_remote_explorer_dir:=$__cdist_remote_base_dir/explorers} +export __cdist_remote_explorer_dir +: ${__cdist_remote_cache_dir:=$__cdist_remote_base_dir/cache} +: ${__cdist_remote_cache_explorer:=$__cdist_remote_cache_dir/explorers} +export __cdist_remote_cache_explorer +: ${__cdist_remote_cache_bin:=$__cdist_remote_base_dir/bin} # create basedir + tempfile for direct usage # FIXME: remove on exit diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 02e0a3a0..7d766abd 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -31,5 +31,5 @@ set -e export __cdist_target_host="$1" export __cdist_source_host="$(cdist_explore_hostname)" -. cdist-build "$__cdist_intern_target_host" -. cdist-remote-exec "$__cdist_intern_target_host" +. cdist-build "$__cdist_target_host" +. cdist-remote-exec "$__cdist_target_host" diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index 49e79de0..b1b50dd6 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -21,25 +21,34 @@ . cdist-config +[ "${__cdist_target_host}" ] || __cdist_usage "Need \$__cdist_target_host setup" + set -e +# create basedir +ssh root@${__cdist_target_host} "mkdir -p \"${__cdist_remote_base_dir}\" \ + \"${__cdist_remote_cache_dir}\" \"${__cdist_remote_cache_bin}\" \ + \"${__cdist_remote_cache_explorer}\"" + # Transfer all explorers to the target dir - must be one level above, so # coyping it multiple times works: a -> remote:/base/ = remote:/base/a vs. # a -> remote:/base/a = remote:/base/a/a (second copy) scp -r "${__cdist_explorer_dir}" \ - "root@${__cdist_target_host}:${__cdist_remote_cache_dir}" + "root@${__cdist_target_host}:${__cdist_remote_base_dir}" -# Transfer explorer coordinator -scp "$(which cdist-explorer-coordinator)" \ +# Transfer cdist binaries - FIXME: should transfer all (needed?) of them! +scp "$(which cdist-explorer-coordinator)" "$(which cdist-config)" \ "root@${__cdist_target_host}:${__cdist_remote_cache_bin}" # Execute explorer coordinator, which will save results on target -ssh root@${__cdist_target_host} "\"${__cdist_remote_cache_bin}/cdist-explorer-coordinator\" \ +ssh root@${__cdist_target_host} \ + "PATH=\"${__cdist_remote_cache_bin}:\$PATH\" + \"${__cdist_remote_cache_bin}/cdist-explorer-coordinator\" \ \"${__cdist_remote_explorer_dir}\" \"${__cdist_remote_cache_explorer}\"" # Transfer back all results -scp -r "root@${__cdist_target_host}:${__cdist_remote_dir}" +# scp -r "root@${__cdist_target_host}:${__cdist_remote_dir}" exit 0 diff --git a/conf/explorers/os b/conf/explorers/os index c7ccae01..3bd3f2ef 100755 --- a/conf/explorers/os +++ b/conf/explorers/os @@ -33,3 +33,6 @@ fi [ -f /etc/debian_version ] && echo debian [ -f /etc/redhat-release ] && echo redhat + +# ensure correct exit, otherwise other explorer won't get started +exit 0 diff --git a/conf/explorers/pkg_system b/conf/explorers/pkg_system index 14f717ee..d9da3f1e 100755 --- a/conf/explorers/pkg_system +++ b/conf/explorers/pkg_system @@ -19,7 +19,9 @@ # # -case "$(__cdist_explorer_dir/os)" in +case "$("${__cdist_remote_explorer_dir}/os")" in archlinux) echo pacman ;; debian|ubuntu) echo apt ;; esac + +exit 0 From f22dcb5d8f2d61abc5f48e78d9d6804aa43ec9cd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 22:40:58 +0100 Subject: [PATCH 0128/6109] add cleanup reminder Signed-off-by: Nico Schottelius --- bin/cdist-explorer-run | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index b1b50dd6..67dfc0a4 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -18,6 +18,9 @@ # along with cdist. If not, see . # # +# FIXME: This script is ugly, should be either seperated into smaller ones, +# but definitely be cleaned up - PROOF OF CONCEPT CODE +# . cdist-config From 18500421264dc2ed401e195411d4b1f3fcd360de Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 22:49:20 +0100 Subject: [PATCH 0129/6109] also enable transfer of explorer data back to the server Signed-off-by: Nico Schottelius --- bin/cdist-config | 8 +++++--- bin/cdist-explorer-run | 8 ++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index ff71ec80..a489d020 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -27,20 +27,22 @@ : ${__cdist_manifest_dir:=$__cdist_config/manifests} : ${__cdist_manifest_init:=$__cdist_manifest_dir/init} +: ${__cdist_name_explorer:=explorers} + : ${__cdist_type_dir:=$__cdist_config/types} : ${__cdist_cache_dir:=$__cdist_config/cache} : ${__cdist_cache_hosts:=$__cdist_cache_dir/hosts} : ${__cdist_cache_bin:=$__cdist_cache_dir/bin} -: ${__cdist_explorer_dir:=$__cdist_config/explorers} +: ${__cdist_explorer_dir:=$__cdist_config/$__cdist_name_explorer} # Paths used on the target - must be kind of secure.... : ${__cdist_remote_base_dir:=/var/lib/cdist} -: ${__cdist_remote_explorer_dir:=$__cdist_remote_base_dir/explorers} +: ${__cdist_remote_explorer_dir:=$__cdist_remote_base_dir/$__cdist_name_explorer} export __cdist_remote_explorer_dir : ${__cdist_remote_cache_dir:=$__cdist_remote_base_dir/cache} -: ${__cdist_remote_cache_explorer:=$__cdist_remote_cache_dir/explorers} +: ${__cdist_remote_cache_explorer:=$__cdist_remote_cache_dir/$__cdist_name_explorer} export __cdist_remote_cache_explorer : ${__cdist_remote_cache_bin:=$__cdist_remote_base_dir/bin} diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index 67dfc0a4..57abfa87 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -49,9 +49,13 @@ ssh root@${__cdist_target_host} \ \"${__cdist_remote_cache_bin}/cdist-explorer-coordinator\" \ \"${__cdist_remote_explorer_dir}\" \"${__cdist_remote_cache_explorer}\"" +# Ensure local destination directory exists +mkdir -p "$(__cdist_cache_host)/$__cdist_name_explorer" -# Transfer back all results -# scp -r "root@${__cdist_target_host}:${__cdist_remote_dir}" + +# Transfer back all results - FIXME: Add 2 level cache, so old version is kept until success +scp -r "root@${__cdist_target_host}:${__cdist_remote_cache_explorer}/*" \ + "$(__cdist_cache_host)/$__cdist_name_explorer" exit 0 From afedb3b90c2815303a099028acb187cab35148c1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 22:51:16 +0100 Subject: [PATCH 0130/6109] document more functionality Signed-off-by: Nico Schottelius --- HACKERS_README | 6 ++++++ bin/cdist-explorer-run | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/HACKERS_README b/HACKERS_README index 4d497573..0ce3baa1 100644 --- a/HACKERS_README +++ b/HACKERS_README @@ -19,3 +19,9 @@ __cdist_config=$(pwd -P)/conf __cdist_target_host=ikq02.ethz.ch cdist-manifest-i # See what it generated find conf/cache + +# Run explorer on a "remote" host +__cdist_config=$(pwd -P)/conf __cdist_target_host=localhost ./bin/cdist-explorer-run + +# Display result +find conf/cache/hosts/localhost diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index 57abfa87..5d325d3e 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -36,6 +36,8 @@ ssh root@${__cdist_target_host} "mkdir -p \"${__cdist_remote_base_dir}\" \ # Transfer all explorers to the target dir - must be one level above, so # coyping it multiple times works: a -> remote:/base/ = remote:/base/a vs. # a -> remote:/base/a = remote:/base/a/a (second copy) + +# FIXME: enable -q as soon as the code is cleaned up scp -r "${__cdist_explorer_dir}" \ "root@${__cdist_target_host}:${__cdist_remote_base_dir}" @@ -52,7 +54,7 @@ ssh root@${__cdist_target_host} \ # Ensure local destination directory exists mkdir -p "$(__cdist_cache_host)/$__cdist_name_explorer" - +# FIXME: enable -q as soon as the code is cleaned up # Transfer back all results - FIXME: Add 2 level cache, so old version is kept until success scp -r "root@${__cdist_target_host}:${__cdist_remote_cache_explorer}/*" \ "$(__cdist_cache_host)/$__cdist_name_explorer" From b31ed214c389e5a194547c7f4fab22b1bc733c75 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 22:53:17 +0100 Subject: [PATCH 0131/6109] Revert "remove useless helper script" Yes, found a need for this script! This reverts commit 77c0153c3f15d195a57fd9479f862b4d973b2aae. --- doc_show_all_exported_variables | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 doc_show_all_exported_variables diff --git a/doc_show_all_exported_variables b/doc_show_all_exported_variables new file mode 100644 index 00000000..921a6f94 --- /dev/null +++ b/doc_show_all_exported_variables @@ -0,0 +1,4 @@ +cat bin/* | awk '/^export/ { print $2 }' + +# __cdist_intern_* : set by internal processes +# __cdist_explore_* : filled with information of the target host From 58e08315454d01e5e701c178597c5d50bf0b0a15 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 22:54:50 +0100 Subject: [PATCH 0132/6109] + cleanup script and move to subdir Signed-off-by: Nico Schottelius --- doc/dev/show_all_exported_variables | 25 +++++++++++++++++++++++++ doc_show_all_exported_variables | 4 ---- 2 files changed, 25 insertions(+), 4 deletions(-) create mode 100755 doc/dev/show_all_exported_variables delete mode 100644 doc_show_all_exported_variables diff --git a/doc/dev/show_all_exported_variables b/doc/dev/show_all_exported_variables new file mode 100755 index 00000000..18acceca --- /dev/null +++ b/doc/dev/show_all_exported_variables @@ -0,0 +1,25 @@ +#!/bin/sh +# +# 2010-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 . +# +# +# Generate documentation of exported variables +# + + +cat bin/* | awk '/^export/ { print $2 }' diff --git a/doc_show_all_exported_variables b/doc_show_all_exported_variables deleted file mode 100644 index 921a6f94..00000000 --- a/doc_show_all_exported_variables +++ /dev/null @@ -1,4 +0,0 @@ -cat bin/* | awk '/^export/ { print $2 }' - -# __cdist_intern_* : set by internal processes -# __cdist_explore_* : filled with information of the target host From 1996d07370c1a322d3fd1a7fbe987453328cad28 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 23:01:39 +0100 Subject: [PATCH 0133/6109] update roadmap Signed-off-by: Nico Schottelius --- ROADMAP | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ROADMAP b/ROADMAP index 5e1f1d65..889eafba 100644 --- a/ROADMAP +++ b/ROADMAP @@ -5,14 +5,14 @@ x Define how to get information from clients x Create configuration tree from manifest x write binaries, which create the tree when called from manifest (cdist_tree_wrapper) x Define configuration paths (doc/internal/config-layout) -- redo explorers (see manpage) +x Redo explorers (see manpage) / Write at least one type -- Parse configuration tree / generate code to be executed on client - - types? + +- Parse configuration tree/objects recursively - can/may types modify tree? - may open door for getting information from manifest / other stuff +- generate code to be executed on client + - check return codes + - abort on first error? -- Cleanup / refactor / documentation -- Write types, types, types, ... - doc/internal/type-integration - - type side: Steven +-> 1.0 From 67b3746160ac3da0c734e184979884b3bd7e4d93 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 23:02:28 +0100 Subject: [PATCH 0134/6109] more todo for 1.0 Signed-off-by: Nico Schottelius --- ROADMAP | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ROADMAP b/ROADMAP index 889eafba..44d61987 100644 --- a/ROADMAP +++ b/ROADMAP @@ -15,4 +15,6 @@ x Redo explorers (see manpage) - check return codes - abort on first error? +- Cleanup directories, cleanly document, what's possible + -> 1.0 From 6bd456f1e8891b5299bc19c9c810d8314b37318b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 23:04:27 +0100 Subject: [PATCH 0135/6109] remove lib.obsoleted and save pacman hint Signed-off-by: Nico Schottelius --- conf/lib.obsoleted/cdist_file.sh | 30 --------------- conf/lib.obsoleted/cdist_package.sh | 37 ------------------- .../cdist_package_backend_pacman_install.sh | 28 -------------- .../cdist_package_select_backend.sh | 28 -------------- conf/types/package/hints | 2 + 5 files changed, 2 insertions(+), 123 deletions(-) delete mode 100644 conf/lib.obsoleted/cdist_file.sh delete mode 100644 conf/lib.obsoleted/cdist_package.sh delete mode 100644 conf/lib.obsoleted/cdist_package_backend_pacman_install.sh delete mode 100644 conf/lib.obsoleted/cdist_package_select_backend.sh create mode 100644 conf/types/package/hints diff --git a/conf/lib.obsoleted/cdist_file.sh b/conf/lib.obsoleted/cdist_file.sh deleted file mode 100644 index 63f883a5..00000000 --- a/conf/lib.obsoleted/cdist_file.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -# -# 2010 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 . -# -# - -cdist_file() -{ - src="$1"; shift - dst="$1"; shift - - # FIXME later: ownership, permissions - cp "${src}" "${dst}" - -} diff --git a/conf/lib.obsoleted/cdist_package.sh b/conf/lib.obsoleted/cdist_package.sh deleted file mode 100644 index 65378ac9..00000000 --- a/conf/lib.obsoleted/cdist_package.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# -# 2010 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 . -# -# - -cdist_package() -{ - # select backend - backend="$(cdist_package_select_backend)" - - case "$1" in - install|is_installed|uninstall) - operation="$1"; shift - ${backend}_${operation} "$@" - ;; - - *) - echo "Unsupported operation" - ;; - esac -} diff --git a/conf/lib.obsoleted/cdist_package_backend_pacman_install.sh b/conf/lib.obsoleted/cdist_package_backend_pacman_install.sh deleted file mode 100644 index 6b716b83..00000000 --- a/conf/lib.obsoleted/cdist_package_backend_pacman_install.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# -# 2010 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 . -# -# -# Install a package -# -# - -cdist_package_backend_pacman_install() -{ - pacman --noconfirm --noprogressbar -S "$@" -} diff --git a/conf/lib.obsoleted/cdist_package_select_backend.sh b/conf/lib.obsoleted/cdist_package_select_backend.sh deleted file mode 100644 index f4cd4bc4..00000000 --- a/conf/lib.obsoleted/cdist_package_select_backend.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# -# 2010 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 . -# -# -# Select correct package management system -# -# - -cdist_package_select_backend() -{ - echo "cdist_package_backend_$(cdist_explore_pkg_system)" -} diff --git a/conf/types/package/hints b/conf/types/package/hints new file mode 100644 index 00000000..76fbcae6 --- /dev/null +++ b/conf/types/package/hints @@ -0,0 +1,2 @@ +install/pacman: +pacman --noconfirm --noprogressbar -S From 97a70cfc8b0169d897043a6b8750c94e158f4354 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 23:05:53 +0100 Subject: [PATCH 0136/6109] [ARCHIVE] Remove example modules containing collectd/efsh/nginx/postgres code Signed-off-by: Nico Schottelius --- conf/modules.obsoleted/collectd/manifest | 28 ------------------- conf/modules.obsoleted/efsh/base.sh | 6 ---- conf/modules.obsoleted/efsh/test.sh | 5 ---- .../nginx-website/nginx_config.sh | 18 ------------ conf/modules.obsoleted/postgresql/init | 2 -- 5 files changed, 59 deletions(-) delete mode 100644 conf/modules.obsoleted/collectd/manifest delete mode 100644 conf/modules.obsoleted/efsh/base.sh delete mode 100644 conf/modules.obsoleted/efsh/test.sh delete mode 100644 conf/modules.obsoleted/nginx-website/nginx_config.sh delete mode 100644 conf/modules.obsoleted/postgresql/init diff --git a/conf/modules.obsoleted/collectd/manifest b/conf/modules.obsoleted/collectd/manifest deleted file mode 100644 index abd2eb79..00000000 --- a/conf/modules.obsoleted/collectd/manifest +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# -# 2010 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 . -# -# - -collectd() -{ - config_source="${1:-modules/collectd/collectd.conf}" - - echo cdist_package collectd - echo cdist_file /etc/collectd/collectd.conf "${config_source}" -} diff --git a/conf/modules.obsoleted/efsh/base.sh b/conf/modules.obsoleted/efsh/base.sh deleted file mode 100644 index d7202593..00000000 --- a/conf/modules.obsoleted/efsh/base.sh +++ /dev/null @@ -1,6 +0,0 @@ -efsh_base() -{ - efsh_servicedir="/home/services" - efsh_userdir="/home/users" - efsh_groupdir="/home/groups" -} diff --git a/conf/modules.obsoleted/efsh/test.sh b/conf/modules.obsoleted/efsh/test.sh deleted file mode 100644 index a13a7ae0..00000000 --- a/conf/modules.obsoleted/efsh/test.sh +++ /dev/null @@ -1,5 +0,0 @@ -. ./base.sh - -echo $efsh_userdir -efsh -echo $efsh_userdir diff --git a/conf/modules.obsoleted/nginx-website/nginx_config.sh b/conf/modules.obsoleted/nginx-website/nginx_config.sh deleted file mode 100644 index cced7827..00000000 --- a/conf/modules.obsoleted/nginx-website/nginx_config.sh +++ /dev/null @@ -1,18 +0,0 @@ -cat << eof -# -# D-INFK SANS MANAGED FILE -# ======================== -# -# Do not change this file. Changes will be overwritten by puppet. -# - -server { - # Only bind on the reserved IP address - listen $nginx_website; - server_name $server_name; - - location / { - root /home/services/www/$username/$server_name/www; - } -} -eof diff --git a/conf/modules.obsoleted/postgresql/init b/conf/modules.obsoleted/postgresql/init deleted file mode 100644 index c02ccf46..00000000 --- a/conf/modules.obsoleted/postgresql/init +++ /dev/null @@ -1,2 +0,0 @@ -# Ensure postgresql 8.4 is instelled -__package --ensure installed --name postgresql-8.4 From d55eaba23a648500ff17f9f160e3f34e8feb571d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 23:08:02 +0100 Subject: [PATCH 0137/6109] remove obsolete test/ Signed-off-by: Nico Schottelius --- test/EXAMPLE_MANIFEST | 32 ------------ test/caller | 3 -- test/func_var1 | 5 -- test/func_var1var2 | 5 -- test/func_var2 | 4 -- test/reporter | 4 -- test/ssh-pseudo-interactive-explorer | 78 ---------------------------- test/test_collectd | 24 --------- test/test_package_install | 24 --------- 9 files changed, 179 deletions(-) delete mode 100755 test/EXAMPLE_MANIFEST delete mode 100755 test/caller delete mode 100644 test/func_var1 delete mode 100644 test/func_var1var2 delete mode 100644 test/func_var2 delete mode 100644 test/reporter delete mode 100755 test/ssh-pseudo-interactive-explorer delete mode 100755 test/test_collectd delete mode 100755 test/test_package_install diff --git a/test/EXAMPLE_MANIFEST b/test/EXAMPLE_MANIFEST deleted file mode 100755 index 900fc19d..00000000 --- a/test/EXAMPLE_MANIFEST +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# -# 2010 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 . -# -# -# Define configuration, currently global, add matches later! -# - -__file cdist_bin --source /from/outer/space --destination /to/earth -__user hal --uid 9000 -__service puppet --status disabled - -# fails -__service puppet --status duplicated - -# fails -__service time --missing diff --git a/test/caller b/test/caller deleted file mode 100755 index d9409538..00000000 --- a/test/caller +++ /dev/null @@ -1,3 +0,0 @@ -. ./reporter - -reporter diff --git a/test/func_var1 b/test/func_var1 deleted file mode 100644 index d1b6f145..00000000 --- a/test/func_var1 +++ /dev/null @@ -1,5 +0,0 @@ -func1() -{ - myvar="blu" - echo $myvar -} diff --git a/test/func_var1var2 b/test/func_var1var2 deleted file mode 100644 index 42f6d319..00000000 --- a/test/func_var1var2 +++ /dev/null @@ -1,5 +0,0 @@ -. ./func_var1 -. ./func_var2 - -func1 -func2 diff --git a/test/func_var2 b/test/func_var2 deleted file mode 100644 index 35680eb7..00000000 --- a/test/func_var2 +++ /dev/null @@ -1,4 +0,0 @@ -func2() -{ - echo $myvar -} diff --git a/test/reporter b/test/reporter deleted file mode 100644 index 293a0722..00000000 --- a/test/reporter +++ /dev/null @@ -1,4 +0,0 @@ -reporter() -{ - echo 0: $0 -} diff --git a/test/ssh-pseudo-interactive-explorer b/test/ssh-pseudo-interactive-explorer deleted file mode 100755 index 81ad0db5..00000000 --- a/test/ssh-pseudo-interactive-explorer +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/sh -# -# 2010 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 . -# -# -# Let's build a cconfig tree from a generic configuration (example) -# - -d1="$(date)" -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -uname=$(ssh localhost "uname -r") -d2="$(date)" - -echo $d1 $d2 diff --git a/test/test_collectd b/test/test_collectd deleted file mode 100755 index a3bb1d7c..00000000 --- a/test/test_collectd +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# 2010 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 . -# -# - -. cdist-config - -collectd diff --git a/test/test_package_install b/test/test_package_install deleted file mode 100755 index 9f6ba3d6..00000000 --- a/test/test_package_install +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# 2010 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 . -# -# - -. cdist-config - -cdist_package install "$@" From 8fc01c61cb53e4d907bf2ae3f9b39a265d719fcd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 23:10:04 +0100 Subject: [PATCH 0138/6109] update readmes Signed-off-by: Nico Schottelius --- HACKERS_README | 2 +- REAL_README | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index 0ce3baa1..88f3a013 100644 --- a/HACKERS_README +++ b/HACKERS_README @@ -21,7 +21,7 @@ __cdist_config=$(pwd -P)/conf __cdist_target_host=ikq02.ethz.ch cdist-manifest-i find conf/cache # Run explorer on a "remote" host -__cdist_config=$(pwd -P)/conf __cdist_target_host=localhost ./bin/cdist-explorer-run +__cdist_config=$(pwd -P)/conf __cdist_target_host=localhost cdist-explorer-run # Display result find conf/cache/hosts/localhost diff --git a/REAL_README b/REAL_README index 42cb1784..f9e989ee 100644 --- a/REAL_README +++ b/REAL_README @@ -19,7 +19,7 @@ and it is equipped with manpages. * KISS (keep it simple and stupid) * Allow very easy extension of cdist (creating own types for instance) * Push (server pushes configuration) and Pull (client retrieves config) supported - * User defines configuration in shell scripts using cdist functions + * User defines configuration in shell scripts * Cdist generates internal configuration (cconfig style) and afterwards applies configuration ## Requirements From 9d6f8012f2f08cd4b0e7d926195fc8d32c5fcd32 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 23:15:10 +0100 Subject: [PATCH 0139/6109] update webpage Signed-off-by: Nico Schottelius --- Makefile | 6 +++++- REAL_README | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 28565e07..dedd1458 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ PREFIX=/usr BINDIR=$(PREFIX}/bin +WEBDIR=$$HOME/niconetz +WEBPAGE=software/cdist.mdwn install: cp bin/* $(BINDIR) @@ -13,7 +15,9 @@ sync: .rsync nicosc@ru3.inf.ethz.ch:cdist web: - cp REAL_README $$HOME/niconetz/software/cdist.mdwn + cp REAL_README $(WEBDIR)/$(WEBPAGE) + cd $(WEBDIR) && git commit -m "cdist update" $(WEBPAGE) + cd $(WEBDIR) && make pub pub: git push --mirror diff --git a/REAL_README b/REAL_README index f9e989ee..de0ddbba 100644 --- a/REAL_README +++ b/REAL_README @@ -47,3 +47,19 @@ and it is equipped with manpages. ## How to use cdist man cdist + +## Support + +### IRC + +You can join the development ***IRC channel*** +[#cLinux on irc.freenode.org](irc://irc.freenode.org/#cLinux). + +### Mailing list +Bug reports, questions, patches, etc. should be send to the +[cdist mailing list](http://l.schottelius.org/mailman/listinfo/cdist). + + + + + From ced0b27058a2348be209c9c2a6df2231948d5790 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 23:22:01 +0100 Subject: [PATCH 0140/6109] cleanup Signed-off-by: Nico Schottelius --- REAL_README | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/REAL_README b/REAL_README index de0ddbba..5e6de430 100644 --- a/REAL_README +++ b/REAL_README @@ -56,10 +56,6 @@ You can join the development ***IRC channel*** [#cLinux on irc.freenode.org](irc://irc.freenode.org/#cLinux). ### Mailing list + Bug reports, questions, patches, etc. should be send to the [cdist mailing list](http://l.schottelius.org/mailman/listinfo/cdist). - - - - - From 8189a6e74519113b523a74450b7204b0724f8071 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 23:27:19 +0100 Subject: [PATCH 0141/6109] cleanup todos (and shrink them) Signed-off-by: Nico Schottelius --- ROADMAP | 20 ---------------- TODO | 54 ------------------------------------------- TODO-1.0 | 52 +++++++++++++++++++++++++++++++++++++++++ doc/dev/todo/post-1.0 | 9 ++++++++ 4 files changed, 61 insertions(+), 74 deletions(-) delete mode 100644 ROADMAP delete mode 100644 TODO create mode 100644 TODO-1.0 create mode 100644 doc/dev/todo/post-1.0 diff --git a/ROADMAP b/ROADMAP deleted file mode 100644 index 44d61987..00000000 --- a/ROADMAP +++ /dev/null @@ -1,20 +0,0 @@ -This document defines how to continue work on cdist: - -x Define how to get information from clients - x Create shell script that creates code to run on client (cdist-build-explorer) -x Create configuration tree from manifest - x write binaries, which create the tree when called from manifest (cdist_tree_wrapper) -x Define configuration paths (doc/internal/config-layout) -x Redo explorers (see manpage) -/ Write at least one type - -- Parse configuration tree/objects recursively - - can/may types modify tree? - - may open door for getting information from manifest / other stuff -- generate code to be executed on client - - check return codes - - abort on first error? - -- Cleanup directories, cleanly document, what's possible - --> 1.0 diff --git a/TODO b/TODO deleted file mode 100644 index 4b6c10b3..00000000 --- a/TODO +++ /dev/null @@ -1,54 +0,0 @@ -- doc: - - cdist manpage (main manpage) - - cleanup following man + their tree: - - cdist-language [IMPORTANT] - - cdist-design.text [IMPORTANT] - - cdist-push-pull - - cdist-quickstart - - cdist-types [IMPORTANT] - - cdist.text [IMPORTANT] - - add terminology - - define steps within configuration apply - - detect impossible/unsafe things: - - creating a file twice - - installing and removing a package - - and report location of occurence - - parse afterwards? - - multi master setups - - templating - - how to define templates - - variable substitution from shell may be problematic - - SHELL SCRIPTS! (executables? do not support?) - - stdout == output of template == what will be used -- cdist-explore - - add more stuff to explore - - write manpage - - save in cache as well -- Create usable Makefile - - install -- types needed: - - package management - - file / directory handling - - ssh-host-key: that uses cache / explored data from hosts! - - services - - user management - - including passwords - - file editing - - add_line_to_file_if_not_existing - - delete_line_from_file - - regexp replace (can probably cover all?) -- release first public version, which includes at least: - - manpages - - only do necessary work [TYPE IMPLEMENTATION HINTS] - - install packages only if not existent - - copy file only if different - -Before initial release, document: - - - how to add package backends - - how to write a minimal host manifest - - create library with all functions (and their parameters) - - cdist_package - - cdist_file - - cdist_dir - diff --git a/TODO-1.0 b/TODO-1.0 new file mode 100644 index 00000000..fcbc27f4 --- /dev/null +++ b/TODO-1.0 @@ -0,0 +1,52 @@ +This document defines how to continue work on cdist: + +x Define how to get information from clients + x Create shell script that creates code to run on client (cdist-build-explorer) +x Create configuration tree from manifest + x write binaries, which create the tree when called from manifest (cdist_tree_wrapper) +x Define configuration paths (doc/internal/config-layout) +x Redo explorers (see manpage) +/ Write at least one type + +- Parse configuration tree/objects recursively + - can/may types modify tree? + - may open door for getting information from manifest / other stuff +- generate code to be executed on client + - check return codes + - abort on first error? + +- doc 1.0: + - cdist manpage (main manpage) + - cleanup following man + their tree: + - cdist-language [IMPORTANT] + - cdist-design.text [IMPORTANT] + - cdist-push-pull + - cdist-quickstart + - how to write a minimal host manifest + - cdist-types [IMPORTANT] + - only do necessary work [TYPE IMPLEMENTATION HINTS] + - install packages only if not existent + - copy file only if different + - cdist [IMPORTANT] + - cdist-explorers + - add terminology + - define steps within configuration apply + - detect impossible/unsafe things: + - creating a file twice + - installing and removing a package + - and report location of occurence + - parse afterwards? + - multi master setups + - templating + - how to define templates + - variable substitution from shell may be problematic + - SHELL SCRIPTS! (executables? do not support?) + - stdout == output of template == what will be used +- Add install target to Makefile + +- types needed + - file (with directory) + - package + +- Cleanup directories, cleanly document, what's possible + diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 new file mode 100644 index 00000000..8835727e --- /dev/null +++ b/doc/dev/todo/post-1.0 @@ -0,0 +1,9 @@ +Types: + - ssh-keys (host/user) + - services + - user management + - file editing + - add_line_to_file_if_not_existing + - delete_line_from_file + - regexp replace (can probably cover all?) + From 5d3a3197f0723165af92ce30781075193035f8ab Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 23:28:54 +0100 Subject: [PATCH 0142/6109] little bit more todo before 1.0 Signed-off-by: Nico Schottelius --- TODO-1.0 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TODO-1.0 b/TODO-1.0 index fcbc27f4..69935a34 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -42,6 +42,9 @@ x Redo explorers (see manpage) - variable substitution from shell may be problematic - SHELL SCRIPTS! (executables? do not support?) - stdout == output of template == what will be used + - cleanup website + - remove HACKERS_README + - create doc/dev/HACKERS_README - Add install target to Makefile - types needed From b873835b87f0bc40a9fc54603c3c9c6d4d0eb5db Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Feb 2011 23:33:12 +0100 Subject: [PATCH 0143/6109] more hints Signed-off-by: Nico Schottelius --- Makefile | 2 ++ TODO-1.0 | 1 + 2 files changed, 3 insertions(+) diff --git a/Makefile b/Makefile index dedd1458..81d59325 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ BINDIR=$(PREFIX}/bin WEBDIR=$$HOME/niconetz WEBPAGE=software/cdist.mdwn +# FIXME: some distro nerd, can you make this more beautiful? +# I'm just a hacker, I don't really care... install: cp bin/* $(BINDIR) diff --git a/TODO-1.0 b/TODO-1.0 index 69935a34..6c509548 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -46,6 +46,7 @@ x Redo explorers (see manpage) - remove HACKERS_README - create doc/dev/HACKERS_README - Add install target to Makefile + - create cdist-config-init to create basic tree - types needed - file (with directory) From 7cb60aa5f5a33044bae3ee06bef7792eca80a170 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 5 Feb 2011 19:04:13 +0100 Subject: [PATCH 0144/6109] add template for cdist-manifest-recursive-run Signed-off-by: Nico Schottelius --- bin/cdist-manifest-recursive-run | 57 ++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100755 bin/cdist-manifest-recursive-run diff --git a/bin/cdist-manifest-recursive-run b/bin/cdist-manifest-recursive-run new file mode 100755 index 00000000..da9187fd --- /dev/null +++ b/bin/cdist-manifest-recursive-run @@ -0,0 +1,57 @@ +#!/bin/sh +# +# 2010 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 . +# +# +# For each created object +# run the manifest of the type (with object id), +# try to merge back newly created objects (otherwise fail), +# mark the object as being run +# and iterate until all objects are marked being run. +# + +. cdist-config + +if [ $# -ne 2 ]; then + __cdist_usage " " +fi + +set -eu + +__cdist_output_dir="$1"; shift +__cdist_manifest="$1"; shift + +__cdist_object_ran_all=0 + +while [ "$__cdist_object_ran_all" = 0 ]; do + +done + +# Ensure binaries exist and are up-to-date +cdist-build-bin + +# prepend our path, so all cdist tools come before other tools +PATH="${__cdist_cache_bin}:$PATH" + +# Force -x, so the user is aware the file is executed +if [ ! -x "${__cdist_manifest_init}" ]; then + __cdist_exit_err "${__cdist_manifest_init} needs to be executable." +fi + +mkdir -p "${__cdist_output_dir}" +"${__cdist_manifest}" From 0ca61d6ed8b8b421598ba5abebcfb48fbf9ef0e7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 5 Feb 2011 19:08:47 +0100 Subject: [PATCH 0145/6109] check for correct manifest, not the init one Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index d9269842..d5b64a58 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -40,8 +40,8 @@ cdist-build-bin PATH="${__cdist_cache_bin}:$PATH" # Force -x, so the user is aware the file is executed -if [ ! -x "${__cdist_manifest_init}" ]; then - __cdist_exit_err "${__cdist_manifest_init} needs to be executable." +if [ ! -x "${__cdist_manifest}" ]; then + __cdist_exit_err "${__cdist_manifest} needs to be executable." fi mkdir -p "${__cdist_output_dir}" From 9af46445ad05d592a9fe6da98b146e6b170a04cb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 5 Feb 2011 19:10:48 +0100 Subject: [PATCH 0146/6109] +set -eu Signed-off-by: Nico Schottelius --- bin/cdist_tree_wrapper | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/cdist_tree_wrapper b/bin/cdist_tree_wrapper index d7a2af6c..69835716 100755 --- a/bin/cdist_tree_wrapper +++ b/bin/cdist_tree_wrapper @@ -28,6 +28,8 @@ [ $# -ge 1 ] || __cdist_usage " " +set -eu + echo "I am $__cdist_myname and have been called with $@" __cdist_id="$1"; shift From 8591dde49a828f124d1a08c668ccbe7871951e70 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 5 Feb 2011 19:20:39 +0100 Subject: [PATCH 0147/6109] move examples to localhost Signed-off-by: Nico Schottelius --- HACKERS_README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HACKERS_README b/HACKERS_README index 88f3a013..d0dfe7a4 100644 --- a/HACKERS_README +++ b/HACKERS_README @@ -15,7 +15,7 @@ What you can do so far: (executed from top level directory) export PATH="$PATH:$(pwd -P)/bin" # Test first level manifest execution -__cdist_config=$(pwd -P)/conf __cdist_target_host=ikq02.ethz.ch cdist-manifest-init +__cdist_config=$(pwd -P)/conf __cdist_target_host=localhost cdist-manifest-init # See what it generated find conf/cache From 77038026a92c66471ffadba2295ce89a7c7870f1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 5 Feb 2011 19:20:59 +0100 Subject: [PATCH 0148/6109] fix source record Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run | 2 +- bin/cdist_tree_wrapper | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index d5b64a58..28123afa 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -31,7 +31,7 @@ fi set -aeu __cdist_output_dir="$1"; shift -__cdist_manifest="$1"; shift +export __cdist_manifest="$1"; shift # Ensure binaries exist and are up-to-date cdist-build-bin diff --git a/bin/cdist_tree_wrapper b/bin/cdist_tree_wrapper index 69835716..69da096d 100755 --- a/bin/cdist_tree_wrapper +++ b/bin/cdist_tree_wrapper @@ -46,6 +46,9 @@ fi mkdir -p "${__cdist_ddir}" +# Record (correct ;-) source +echo "${__cdist_manifest}" > "${__cdist_ddir}/${__cdist_object_source}" + while [ $# -gt 0 ]; do opt="$1"; shift @@ -62,6 +65,4 @@ while [ $# -gt 0 ]; do echo "${value}" > "${__cdist_ddir}/${opt_file}" - echo "${__cdist_abs_myname}" > "${__cdist_ddir}/${__cdist_object_source}" - done From b944d82e92284517b7632a9baed5d3eb29114e79 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 5 Feb 2011 19:22:00 +0100 Subject: [PATCH 0149/6109] include localhost in example configuration Signed-off-by: Nico Schottelius --- conf/manifests/init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/manifests/init b/conf/manifests/init index 195835a4..39aab355 100755 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -5,7 +5,7 @@ set -x # All ikqs get a sample file case "$__cdist_target_host" in - ikq*) + ikq*|localhost) __file cdist-config --source /home/users/nico/p/cdist/bin/cdist-config --destination /usr/bin/cdist-config ;; esac From 8446328bc670e3d57fad719afc7610c7b5680fb3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 5 Feb 2011 19:32:29 +0100 Subject: [PATCH 0150/6109] Implement automatic temp removal Signed-off-by: Nico Schottelius --- bin/cdist-config | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index a489d020..dd07a3c4 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -21,6 +21,7 @@ # Print configuration directories - helper for all other scripts # + # Values can be overriden from outside, so you can # customise paths as you like (for distributors, geeks and hackers) : ${__cdist_config:=/etc/cdist} @@ -46,10 +47,11 @@ export __cdist_remote_explorer_dir export __cdist_remote_cache_explorer : ${__cdist_remote_cache_bin:=$__cdist_remote_base_dir/bin} -# create basedir + tempfile for direct usage -# FIXME: remove on exit -: ${__cdist_tmp_dir:=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX")} -: ${__cdist_tmp_file:=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX")} +# Tempfiles need to be recreated for each individual script, unshared! +__cdist_tmp_dir=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX") +export __cdist_tmp_dir +__cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") +export __cdist_tmp_file ################################################################################ # cconf standard vars prefixed with cdist @@ -72,6 +74,7 @@ __cdist_sane_regexp='[A-Za-z0-9]*[-A-Za-z0-9_]*' # Used to mark file that created a specific type __cdist_object_source=".source" + ################################################################################ # Function list # @@ -97,3 +100,13 @@ __cdist_cache_host() { echo "${__cdist_cache_hosts}/${__cdist_target_host}" } + +__cdist_tmp_removal() +{ + rm -rf "${__cdist_tmp_dir}" +} + +################################################################################ +# Trap for tmp removal +# +trap __cdist_tmp_removal EXIT From 92a3661ece35319c75b04f88c7bf3109bc9343e7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 5 Feb 2011 19:36:19 +0100 Subject: [PATCH 0151/6109] -debug Signed-off-by: Nico Schottelius --- conf/manifests/init | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/manifests/init b/conf/manifests/init index 39aab355..a37d632d 100755 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -2,7 +2,6 @@ # This is a sample manifest, but used in real world # -set -x # All ikqs get a sample file case "$__cdist_target_host" in ikq*|localhost) From 9b44fc6c9cafaad2322cede5b5606dd30f838907 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 5 Feb 2011 19:41:47 +0100 Subject: [PATCH 0152/6109] add names for everything in config Signed-off-by: Nico Schottelius --- bin/cdist-config | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index dd07a3c4..5139c87c 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -24,17 +24,26 @@ # Values can be overriden from outside, so you can # customise paths as you like (for distributors, geeks and hackers) + +# Names +: ${__cdist_name_bin:=bin} +: ${__cdist_name_cache:=cache} +: ${__cdist_name_explorer:=explorers} +: ${__cdist_name_host:=hosts} +: ${__cdist_name_init:=init} +: ${__cdist_name_object:=objects} +: ${__cdist_name_type:=types} + +# Base : ${__cdist_config:=/etc/cdist} : ${__cdist_manifest_dir:=$__cdist_config/manifests} -: ${__cdist_manifest_init:=$__cdist_manifest_dir/init} - -: ${__cdist_name_explorer:=explorers} - -: ${__cdist_type_dir:=$__cdist_config/types} +: ${__cdist_manifest_init:=$__cdist_manifest_dir/$__cdist_name_init} +: ${__cdist_type_dir:=$__cdist_config/$__cdist_name_type} +# Cache : ${__cdist_cache_dir:=$__cdist_config/cache} -: ${__cdist_cache_hosts:=$__cdist_cache_dir/hosts} -: ${__cdist_cache_bin:=$__cdist_cache_dir/bin} +: ${__cdist_cache_hosts:=$__cdist_cache_dir/$__cdist_name_host} +: ${__cdist_cache_bin:=$__cdist_cache_dir/$__cdist_name_bin} : ${__cdist_explorer_dir:=$__cdist_config/$__cdist_name_explorer} @@ -42,10 +51,10 @@ : ${__cdist_remote_base_dir:=/var/lib/cdist} : ${__cdist_remote_explorer_dir:=$__cdist_remote_base_dir/$__cdist_name_explorer} export __cdist_remote_explorer_dir -: ${__cdist_remote_cache_dir:=$__cdist_remote_base_dir/cache} +: ${__cdist_remote_cache_dir:=$__cdist_remote_base_dir/$__cdist_name_cache} : ${__cdist_remote_cache_explorer:=$__cdist_remote_cache_dir/$__cdist_name_explorer} export __cdist_remote_cache_explorer -: ${__cdist_remote_cache_bin:=$__cdist_remote_base_dir/bin} +: ${__cdist_remote_cache_bin:=$__cdist_remote_base_dir/$__cdist_name_bin} # Tempfiles need to be recreated for each individual script, unshared! __cdist_tmp_dir=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX") From d555ba57108983b8008c720e5d78ea5f5fd6d054 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 5 Feb 2011 19:42:49 +0100 Subject: [PATCH 0153/6109] cleanup 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 5139c87c..e3807243 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -36,6 +36,7 @@ # Base : ${__cdist_config:=/etc/cdist} +: ${__cdist_explorer_dir:=$__cdist_config/$__cdist_name_explorer} : ${__cdist_manifest_dir:=$__cdist_config/manifests} : ${__cdist_manifest_init:=$__cdist_manifest_dir/$__cdist_name_init} : ${__cdist_type_dir:=$__cdist_config/$__cdist_name_type} @@ -45,9 +46,8 @@ : ${__cdist_cache_hosts:=$__cdist_cache_dir/$__cdist_name_host} : ${__cdist_cache_bin:=$__cdist_cache_dir/$__cdist_name_bin} -: ${__cdist_explorer_dir:=$__cdist_config/$__cdist_name_explorer} -# Paths used on the target - must be kind of secure.... +# Remote : ${__cdist_remote_base_dir:=/var/lib/cdist} : ${__cdist_remote_explorer_dir:=$__cdist_remote_base_dir/$__cdist_name_explorer} export __cdist_remote_explorer_dir From 054f23a550e0d9f58e9e89c64d50512b0bb4dc68 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 5 Feb 2011 19:44:12 +0100 Subject: [PATCH 0154/6109] create objects in a seperate object dir, so no clashes with other stuff Signed-off-by: Nico Schottelius --- bin/cdist_tree_wrapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist_tree_wrapper b/bin/cdist_tree_wrapper index 69da096d..ac595888 100755 --- a/bin/cdist_tree_wrapper +++ b/bin/cdist_tree_wrapper @@ -37,7 +37,7 @@ __cdist_id="$1"; shift echo "$__cdist_id" | grep -q "^${__cdist_sane_regexp}\$" || __cdist_usage "Provide sane id, please" __cdist_tid="${__cdist_myname}/${__cdist_id}" -__cdist_ddir="$(__cdist_cache_host)/${__cdist_tid}" +__cdist_ddir="$(__cdist_cache_host)/${__cdist_name_object}/${__cdist_tid}" if [ -e "${__cdist_ddir}" ]; then source="$(cat "${__cdist_ddir}/${__cdist_object_source}")" From 5237bcd5cd8d94eca79c9ee6822e81ecdc77ae34 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 5 Feb 2011 19:49:08 +0100 Subject: [PATCH 0155/6109] first generic version working for objects Signed-off-by: Nico Schottelius --- bin/cdist-manifest-recursive-run | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/bin/cdist-manifest-recursive-run b/bin/cdist-manifest-recursive-run index da9187fd..7ebd89d7 100755 --- a/bin/cdist-manifest-recursive-run +++ b/bin/cdist-manifest-recursive-run @@ -24,24 +24,44 @@ # mark the object as being run # and iterate until all objects are marked being run. # +# +# . cdist-config if [ $# -ne 2 ]; then - __cdist_usage " " + __cdist_usage " " fi set -eu __cdist_output_dir="$1"; shift -__cdist_manifest="$1"; shift +__cdist_object_dir="$1"; shift __cdist_object_ran_all=0 while [ "$__cdist_object_ran_all" = 0 ]; do + cd "$__cdist_object_dir" + # FIXME past 1.0: allow multi level ids (/example/id instead of example_id only) + # OUTER LOOP NEEDED IF GOING OVER ALL OBJECTS WITH FIND? + for type in *; do + cd "$__cdist_object_dir/$type" + + # find all objects (every object has the source recorded) + find . -name "$__cdist_object_source" > "$__cdist_tmp_file" + + while read object; do + echo "Running object ${type}/${object} ..." + done < "$__cdist_tmp_file" + done + + # FIXME: abort on real case only :-) + __cdist_object_ran_all=1 done +exit 0 + # Ensure binaries exist and are up-to-date cdist-build-bin From f4c53e800c364b57e27dd94dfc6ac927b1b6c79a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 6 Feb 2011 15:52:28 +0100 Subject: [PATCH 0156/6109] begin to cleanup recursive call run Signed-off-by: Nico Schottelius --- HACKERS_README | 4 ++++ bin/cdist-config | 5 +++- bin/cdist-manifest-recursive-run | 40 +++++++++++++++++++++----------- doc/man/cdist.text | 6 ++++- 4 files changed, 40 insertions(+), 15 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index d0dfe7a4..ccfca971 100644 --- a/HACKERS_README +++ b/HACKERS_README @@ -25,3 +25,7 @@ __cdist_config=$(pwd -P)/conf __cdist_target_host=localhost cdist-explorer-run # Display result find conf/cache/hosts/localhost + +# Soon working: +cdist-manifest-recursive-run /tmp ~/p/cdist/conf/cache/hosts/localhost/objects + diff --git a/bin/cdist-config b/bin/cdist-config index e3807243..5b08ddff 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -80,9 +80,12 @@ __cdist_bin_prefix="__" # Used for IDs __cdist_sane_regexp='[A-Za-z0-9]*[-A-Za-z0-9_]*' -# Used to mark file that created a specific type +# File that contains source of a specific object creation __cdist_object_source=".source" +# Mark object finished +__cdist_object_finished=".done" + ################################################################################ # Function list diff --git a/bin/cdist-manifest-recursive-run b/bin/cdist-manifest-recursive-run index 7ebd89d7..0a2a885b 100755 --- a/bin/cdist-manifest-recursive-run +++ b/bin/cdist-manifest-recursive-run @@ -43,21 +43,35 @@ __cdist_object_ran_all=0 while [ "$__cdist_object_ran_all" = 0 ]; do cd "$__cdist_object_dir" - # FIXME past 1.0: allow multi level ids (/example/id instead of example_id only) - # OUTER LOOP NEEDED IF GOING OVER ALL OBJECTS WITH FIND? - for type in *; do - cd "$__cdist_object_dir/$type" + # find all objects (every object has the source recorded) + find . -name "$__cdist_object_source" | \ + sed -e "s;$__cdist_object_source\$;;" \ + -e 's;^./;;' \ + > "$__cdist_tmp_file" - # find all objects (every object has the source recorded) - find . -name "$__cdist_object_source" > "$__cdist_tmp_file" + while read object; do + if [ ! -f "${object}/$__cdist_object_finished" ]; then + echo "Running object ${object} ..." + echo "Merging stuff back..." + touch "${object}/$__cdist_object_finished" + fi + done < "$__cdist_tmp_file" - while read object; do - echo "Running object ${type}/${object} ..." - done < "$__cdist_tmp_file" - done - - # FIXME: abort on real case only :-) - __cdist_object_ran_all=1 +# # FIXME past 1.0: allow multi level ids (/example/id instead of example_id only) +# # OUTER LOOP NEEDED IF GOING OVER ALL OBJECTS WITH FIND? +# for type in *; do +# cd "$__cdist_object_dir/$type" +# +# # find all objects (every object has the source recorded) +# find . -name "$__cdist_object_source" > "$__cdist_tmp_file" +# +# while read object; do +# echo "Running object ${type}/${object} ..." +# done < "$__cdist_tmp_file" +# done +# +# # FIXME: abort on real case only :-) +# __cdist_object_ran_all=1 done exit 0 diff --git a/doc/man/cdist.text b/doc/man/cdist.text index 18f03489..109d2f01 100644 --- a/doc/man/cdist.text +++ b/doc/man/cdist.text @@ -27,7 +27,11 @@ a look at cdist-quickstart(7). REQUIREMENTS ------------ Cdist requires enabled ssh-server and a posix shell on the clients and -ssh-client and posix shell on the server. +ssh-client and posix shell on the server. Additionaly, it requires +the following unix tools: + +- find +- SEE ALSO From 3dacee432ee7c55388739643ca139c216857bfbf Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 6 Feb 2011 16:04:28 +0100 Subject: [PATCH 0157/6109] another cleanup and almost running cdist-manifest-recursive-run Signed-off-by: Nico Schottelius --- bin/cdist-manifest-recursive-run | 68 ++++++++++++++++---------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/bin/cdist-manifest-recursive-run b/bin/cdist-manifest-recursive-run index 0a2a885b..9cf3e94d 100755 --- a/bin/cdist-manifest-recursive-run +++ b/bin/cdist-manifest-recursive-run @@ -38,10 +38,17 @@ set -eu __cdist_output_dir="$1"; shift __cdist_object_dir="$1"; shift -__cdist_object_ran_all=0 +# change to directory containing objects +cd "$__cdist_object_dir" -while [ "$__cdist_object_ran_all" = 0 ]; do - cd "$__cdist_object_dir" +# Loop until we do not create new objects anymore +# which is equal to all objects have been run +__cdist_object_created_new=1 + + +while [ "$__cdist_object_created_new" = 1 ]; do + # assume we're done after this run + __cdist_object_created_new=0 # find all objects (every object has the source recorded) find . -name "$__cdist_object_source" | \ @@ -49,43 +56,38 @@ while [ "$__cdist_object_ran_all" = 0 ]; do -e 's;^./;;' \ > "$__cdist_tmp_file" + cat "$__cdist_tmp_file" + while read object; do if [ ! -f "${object}/$__cdist_object_finished" ]; then echo "Running object ${object} ..." - echo "Merging stuff back..." + + manifest="${object}/${__cdist_name_init}" + if [ -x "${manifest}" ]; then + cdist-manifest-run "${manifest}" "${__cdist_tmp_dir}" + + echo "Merging stuff back..." + # FIXME: continue here + # tar, cp, pax? + # - copy if not existing + # fail (abort whole recursive run) if existing + # + # iterate over all new objects and copy each back? + + else + # Be nice, warn user if manifests exists, but is not executable + if [ -f "${manifest}" ]; then + echo "Warning ${manifest} is not executable" + fi + fi + touch "${object}/$__cdist_object_finished" + + # At least one more run needed + __cdist_object_created_new=1 fi done < "$__cdist_tmp_file" -# # FIXME past 1.0: allow multi level ids (/example/id instead of example_id only) -# # OUTER LOOP NEEDED IF GOING OVER ALL OBJECTS WITH FIND? -# for type in *; do -# cd "$__cdist_object_dir/$type" -# -# # find all objects (every object has the source recorded) -# find . -name "$__cdist_object_source" > "$__cdist_tmp_file" -# -# while read object; do -# echo "Running object ${type}/${object} ..." -# done < "$__cdist_tmp_file" -# done -# -# # FIXME: abort on real case only :-) -# __cdist_object_ran_all=1 done exit 0 - -# Ensure binaries exist and are up-to-date -cdist-build-bin - -# prepend our path, so all cdist tools come before other tools -PATH="${__cdist_cache_bin}:$PATH" - -# Force -x, so the user is aware the file is executed -if [ ! -x "${__cdist_manifest_init}" ]; then - __cdist_exit_err "${__cdist_manifest_init} needs to be executable." -fi - -mkdir -p "${__cdist_output_dir}" -"${__cdist_manifest}" From 494ee906f2df5fd2ff28a3a0b65460629ec399f3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 6 Feb 2011 21:14:21 +0100 Subject: [PATCH 0158/6109] theorethic working version of recursive run :-) Signed-off-by: Nico Schottelius --- bin/cdist-manifest-recursive-run | 41 ++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/bin/cdist-manifest-recursive-run b/bin/cdist-manifest-recursive-run index 9cf3e94d..efd46b19 100755 --- a/bin/cdist-manifest-recursive-run +++ b/bin/cdist-manifest-recursive-run @@ -29,13 +29,12 @@ . cdist-config -if [ $# -ne 2 ]; then - __cdist_usage " " +if [ $# -ne 1 ]; then + __cdist_usage "" fi set -eu -__cdist_output_dir="$1"; shift __cdist_object_dir="$1"; shift # change to directory containing objects @@ -66,14 +65,46 @@ while [ "$__cdist_object_created_new" = 1 ]; do if [ -x "${manifest}" ]; then cdist-manifest-run "${manifest}" "${__cdist_tmp_dir}" - echo "Merging stuff back..." + echo "Trying to merge... " + + # list of new objects + cd "${__cdist_tmp_dir}" + find . -name "$__cdist_object_source" | \ + sed -e "s;$__cdist_object_source\$;;" \ + -e 's;^./;;' \ + > "$__cdist_tmp_file" + + while read newobject; do + if [ -e "$__cdist_object_dir/${newobject}" ]; then + echo FAIIIIIIIIL + exit 23 + else + # Fine, merge back! + pax -r -w "$newobject" "$__cdist_object_dir" + fi + + done < "$__cdist_tmp_file" + + # Always rerun the whole loop if we ran + # a manifest of an object + break + + # FIXME: continue here - # tar, cp, pax? + # tar, cp, pax, mv? + # mv/cp -n look good - posix? + + # pax: + # pax -r -w -k could work, but -k does not raise an error if files + # are already existing + # - copy if not existing # fail (abort whole recursive run) if existing # # iterate over all new objects and copy each back? + # FIXME: cleanup tmp directory, if necessary! + else # Be nice, warn user if manifests exists, but is not executable if [ -f "${manifest}" ]; then From 43e6db264b1bcd0a7c3f18a03ee307dc71532d89 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 6 Feb 2011 22:07:17 +0100 Subject: [PATCH 0159/6109] rename __cdist_id to __cdist_object_id Signed-off-by: Nico Schottelius --- bin/cdist_tree_wrapper | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cdist_tree_wrapper b/bin/cdist_tree_wrapper index ac595888..bcd36837 100755 --- a/bin/cdist_tree_wrapper +++ b/bin/cdist_tree_wrapper @@ -32,11 +32,11 @@ set -eu echo "I am $__cdist_myname and have been called with $@" -__cdist_id="$1"; shift +export __cdist_object_id="$1"; shift -echo "$__cdist_id" | grep -q "^${__cdist_sane_regexp}\$" || __cdist_usage "Provide sane id, please" +echo "$__cdist_object_id" | grep -q "^${__cdist_sane_regexp}\$" || __cdist_usage "Provide sane id, please" -__cdist_tid="${__cdist_myname}/${__cdist_id}" +__cdist_tid="${__cdist_myname}/${__cdist_object_id}" __cdist_ddir="$(__cdist_cache_host)/${__cdist_name_object}/${__cdist_tid}" if [ -e "${__cdist_ddir}" ]; then From 3892f9e71359575686f3df58ff7c1f4595703b5d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 17:50:25 +0100 Subject: [PATCH 0160/6109] add support for __cdist_type_mydir to find dir of current type Signed-off-by: Nico Schottelius --- bin/cdist-config | 8 +++++++- bin/cdist_tree_wrapper | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/cdist-config b/bin/cdist-config index 5b08ddff..186b176d 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -31,13 +31,14 @@ : ${__cdist_name_explorer:=explorers} : ${__cdist_name_host:=hosts} : ${__cdist_name_init:=init} +: ${__cdist_name_manifest:=manifests} : ${__cdist_name_object:=objects} : ${__cdist_name_type:=types} # Base : ${__cdist_config:=/etc/cdist} : ${__cdist_explorer_dir:=$__cdist_config/$__cdist_name_explorer} -: ${__cdist_manifest_dir:=$__cdist_config/manifests} +: ${__cdist_manifest_dir:=$__cdist_config/$__cdist_name_manifest} : ${__cdist_manifest_init:=$__cdist_manifest_dir/$__cdist_name_init} : ${__cdist_type_dir:=$__cdist_config/$__cdist_name_type} @@ -113,6 +114,11 @@ __cdist_cache_host() echo "${__cdist_cache_hosts}/${__cdist_target_host}" } +__cdist_type_mydir() +{ + echo "${__cdist_type_dir}/${__cdist_type_current}" +} + __cdist_tmp_removal() { rm -rf "${__cdist_tmp_dir}" diff --git a/bin/cdist_tree_wrapper b/bin/cdist_tree_wrapper index bcd36837..31c49ed7 100755 --- a/bin/cdist_tree_wrapper +++ b/bin/cdist_tree_wrapper @@ -33,6 +33,7 @@ set -eu echo "I am $__cdist_myname and have been called with $@" export __cdist_object_id="$1"; shift +export __cdist_type_current="$__cdist_myname" echo "$__cdist_object_id" | grep -q "^${__cdist_sane_regexp}\$" || __cdist_usage "Provide sane id, please" From 4c84c819f57ed915f11e0e3209bb65982ef14ed3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 17:53:53 +0100 Subject: [PATCH 0161/6109] [type] NEW: issue Signed-off-by: Nico Schottelius --- conf/types/issue/README | 1 + conf/types/issue/files/archlinux | 2 ++ conf/types/issue/files/default | 2 ++ conf/types/issue/init | 34 ++++++++++++++++++++++++++++++++ 4 files changed, 39 insertions(+) create mode 100644 conf/types/issue/README create mode 100644 conf/types/issue/files/archlinux create mode 100644 conf/types/issue/files/default create mode 100755 conf/types/issue/init diff --git a/conf/types/issue/README b/conf/types/issue/README new file mode 100644 index 00000000..f7bbde5c --- /dev/null +++ b/conf/types/issue/README @@ -0,0 +1 @@ +Manage /etc/issue diff --git a/conf/types/issue/files/archlinux b/conf/types/issue/files/archlinux new file mode 100644 index 00000000..261f977a --- /dev/null +++ b/conf/types/issue/files/archlinux @@ -0,0 +1,2 @@ +Arch Linux \r (\n) (\l) (cdist automated) + diff --git a/conf/types/issue/files/default b/conf/types/issue/files/default new file mode 100644 index 00000000..f8314de9 --- /dev/null +++ b/conf/types/issue/files/default @@ -0,0 +1,2 @@ +Some OS \r (\n) (\l) (cdist automated) + diff --git a/conf/types/issue/init b/conf/types/issue/init new file mode 100755 index 00000000..723a1378 --- /dev/null +++ b/conf/types/issue/init @@ -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 . +# +# + +destination=/etc/issue + +case "$__cdist_explorer_os" in + archlinux) + source="$(__cdist_type_mydir)/files/archlinux" + ;; + *) + source="$(__cdist_type_mydir)/files/default" + ;; +esac + +# FIXME: replace id with $destination post-1.0 +__file etc-issue --source "$source" --destination "$destination" From 028a4dc6ba87fcf434d2c909cc92666d1a36c5dd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 17:55:57 +0100 Subject: [PATCH 0162/6109] more todo post 1.0 Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.0 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index 8835727e..4169c7f9 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -7,3 +7,5 @@ Types: - delete_line_from_file - regexp replace (can probably cover all?) +Core: + - Support singletons (see types/issue for a good reason) From c8fedb99149447a250dd45bc4f984fca545bb6bf Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 18:08:44 +0100 Subject: [PATCH 0163/6109] new call for cdist-manifest-recursive-run Signed-off-by: Nico Schottelius --- HACKERS_README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HACKERS_README b/HACKERS_README index ccfca971..82185ab5 100644 --- a/HACKERS_README +++ b/HACKERS_README @@ -27,5 +27,5 @@ __cdist_config=$(pwd -P)/conf __cdist_target_host=localhost cdist-explorer-run find conf/cache/hosts/localhost # Soon working: -cdist-manifest-recursive-run /tmp ~/p/cdist/conf/cache/hosts/localhost/objects +cdist-manifest-recursive-run ~/p/cdist/conf/cache/hosts/localhost/objects From 9e2abff8be64e66a087c395a96440906ffa6845c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 18:09:00 +0100 Subject: [PATCH 0164/6109] add new type which generates another type Signed-off-by: Nico Schottelius --- conf/manifests/init | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/manifests/init b/conf/manifests/init index a37d632d..2923ba88 100755 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -6,5 +6,6 @@ case "$__cdist_target_host" in ikq*|localhost) __file cdist-config --source /home/users/nico/p/cdist/bin/cdist-config --destination /usr/bin/cdist-config + __issue iddoesnotmatterhere ;; esac From 344d59005b2d3c5c198d9a08b2241412a64f08ce Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 18:13:04 +0100 Subject: [PATCH 0165/6109] add initial types describing document Signed-off-by: Nico Schottelius --- conf/types/{file => __file}/cdist_dir.sh | 0 conf/types/{file => __file}/gencode | 0 .../mandority_parameters/path | 0 .../mandority_parameters/type | 0 conf/types/{file => __file}/manifest | 0 .../{file => __file}/optional_parameters/mode | 0 conf/types/{issue => __issue}/README | 0 conf/types/{issue => __issue}/files/archlinux | 0 conf/types/{issue => __issue}/files/default | 0 conf/types/{issue => __issue}/init | 0 conf/types/{package => __package}/hints | 0 doc/man/cdist-types.text | 28 +++++++++++++++++++ 12 files changed, 28 insertions(+) rename conf/types/{file => __file}/cdist_dir.sh (100%) rename conf/types/{file => __file}/gencode (100%) rename conf/types/{file => __file}/mandority_parameters/path (100%) rename conf/types/{file => __file}/mandority_parameters/type (100%) rename conf/types/{file => __file}/manifest (100%) rename conf/types/{file => __file}/optional_parameters/mode (100%) rename conf/types/{issue => __issue}/README (100%) rename conf/types/{issue => __issue}/files/archlinux (100%) rename conf/types/{issue => __issue}/files/default (100%) rename conf/types/{issue => __issue}/init (100%) rename conf/types/{package => __package}/hints (100%) create mode 100644 doc/man/cdist-types.text diff --git a/conf/types/file/cdist_dir.sh b/conf/types/__file/cdist_dir.sh similarity index 100% rename from conf/types/file/cdist_dir.sh rename to conf/types/__file/cdist_dir.sh diff --git a/conf/types/file/gencode b/conf/types/__file/gencode similarity index 100% rename from conf/types/file/gencode rename to conf/types/__file/gencode diff --git a/conf/types/file/mandority_parameters/path b/conf/types/__file/mandority_parameters/path similarity index 100% rename from conf/types/file/mandority_parameters/path rename to conf/types/__file/mandority_parameters/path diff --git a/conf/types/file/mandority_parameters/type b/conf/types/__file/mandority_parameters/type similarity index 100% rename from conf/types/file/mandority_parameters/type rename to conf/types/__file/mandority_parameters/type diff --git a/conf/types/file/manifest b/conf/types/__file/manifest similarity index 100% rename from conf/types/file/manifest rename to conf/types/__file/manifest diff --git a/conf/types/file/optional_parameters/mode b/conf/types/__file/optional_parameters/mode similarity index 100% rename from conf/types/file/optional_parameters/mode rename to conf/types/__file/optional_parameters/mode diff --git a/conf/types/issue/README b/conf/types/__issue/README similarity index 100% rename from conf/types/issue/README rename to conf/types/__issue/README diff --git a/conf/types/issue/files/archlinux b/conf/types/__issue/files/archlinux similarity index 100% rename from conf/types/issue/files/archlinux rename to conf/types/__issue/files/archlinux diff --git a/conf/types/issue/files/default b/conf/types/__issue/files/default similarity index 100% rename from conf/types/issue/files/default rename to conf/types/__issue/files/default diff --git a/conf/types/issue/init b/conf/types/__issue/init similarity index 100% rename from conf/types/issue/init rename to conf/types/__issue/init diff --git a/conf/types/package/hints b/conf/types/__package/hints similarity index 100% rename from conf/types/package/hints rename to conf/types/__package/hints diff --git a/doc/man/cdist-types.text b/doc/man/cdist-types.text new file mode 100644 index 00000000..deea7971 --- /dev/null +++ b/doc/man/cdist-types.text @@ -0,0 +1,28 @@ +cdist-types(7) +=============== +Nico Schottelius + + +NAME +---- +cdist-types - Functionality bundled + + +DESCRIPTION +----------- +A cdist type describes some kind of functionality. +Types can be run from manifests. +It is recommeneded to prefix all types with two +underscores, because types will be executed and +thus you prevent collisions with real binaries +(like "file"). + + +SEE ALSO +-------- + + +COPYING +------- +Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). From d9a07bfa3e3f791ffd6abfe7b87dbaf8fb528d92 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 18:16:02 +0100 Subject: [PATCH 0166/6109] remove automatic __ prefixing of types Signed-off-by: Nico Schottelius --- bin/cdist-build-bin | 2 +- bin/cdist-config | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/bin/cdist-build-bin b/bin/cdist-build-bin index a7ae3735..18b0dfbb 100755 --- a/bin/cdist-build-bin +++ b/bin/cdist-build-bin @@ -38,5 +38,5 @@ ls -1 > "${__cdist_tmp_file}" # Create binaries mkdir -p "${__cdist_cache_bin}" while read type; do - ln -sf "${__cdist_tree_wrapper}" "${__cdist_cache_bin}/${__cdist_bin_prefix}${type}" + ln -sf "${__cdist_tree_wrapper}" "${__cdist_cache_bin}/${type}" done < "${__cdist_tmp_file}" diff --git a/bin/cdist-config b/bin/cdist-config index 186b176d..5d308598 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -75,9 +75,6 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" ################################################################################ # Other constants -# Used for generating binaries in cdist-build-bin -__cdist_bin_prefix="__" - # Used for IDs __cdist_sane_regexp='[A-Za-z0-9]*[-A-Za-z0-9_]*' From 34f845ec864e2b0bfc9eccfde4457f371fc64ad3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 18:34:34 +0100 Subject: [PATCH 0167/6109] 2nd level cconfig generation works (with debug) Signed-off-by: Nico Schottelius --- HACKERS_README | 2 +- bin/cdist-manifest-recursive-run | 10 ++++++++-- conf/types/__issue/init | 2 ++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index 82185ab5..20c1c051 100644 --- a/HACKERS_README +++ b/HACKERS_README @@ -27,5 +27,5 @@ __cdist_config=$(pwd -P)/conf __cdist_target_host=localhost cdist-explorer-run find conf/cache/hosts/localhost # Soon working: -cdist-manifest-recursive-run ~/p/cdist/conf/cache/hosts/localhost/objects +__cdist_config=$(pwd -P)/conf __cdist_target_host=localhost cdist-manifest-recursive-run ~/p/cdist/conf/cache/hosts/localhost/objects diff --git a/bin/cdist-manifest-recursive-run b/bin/cdist-manifest-recursive-run index efd46b19..3e18999f 100755 --- a/bin/cdist-manifest-recursive-run +++ b/bin/cdist-manifest-recursive-run @@ -61,9 +61,15 @@ while [ "$__cdist_object_created_new" = 1 ]; do if [ ! -f "${object}/$__cdist_object_finished" ]; then echo "Running object ${object} ..." - manifest="${object}/${__cdist_name_init}" + set -x + pwd + + type=${object%%/*} + + manifest="$__cdist_type_dir/${type}/${__cdist_name_init}" + if [ -x "${manifest}" ]; then - cdist-manifest-run "${manifest}" "${__cdist_tmp_dir}" + cdist-manifest-run "${__cdist_tmp_dir}" "${manifest}" echo "Trying to merge... " diff --git a/conf/types/__issue/init b/conf/types/__issue/init index 723a1378..f525c2df 100755 --- a/conf/types/__issue/init +++ b/conf/types/__issue/init @@ -19,6 +19,8 @@ # # +. cdist-config + destination=/etc/issue case "$__cdist_explorer_os" in From 3f0e3bdc12ff4b7ca415a5b80c012aa6b6034d1a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 18:40:43 +0100 Subject: [PATCH 0168/6109] remove some debug Signed-off-by: Nico Schottelius --- bin/cdist-manifest-recursive-run | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bin/cdist-manifest-recursive-run b/bin/cdist-manifest-recursive-run index 3e18999f..1c0027d4 100755 --- a/bin/cdist-manifest-recursive-run +++ b/bin/cdist-manifest-recursive-run @@ -55,20 +55,18 @@ while [ "$__cdist_object_created_new" = 1 ]; do -e 's;^./;;' \ > "$__cdist_tmp_file" + # FIXME: DEBUG cat "$__cdist_tmp_file" while read object; do if [ ! -f "${object}/$__cdist_object_finished" ]; then - echo "Running object ${object} ..." - - set -x - pwd + echo "Working on object ${object} ..." type=${object%%/*} - manifest="$__cdist_type_dir/${type}/${__cdist_name_init}" if [ -x "${manifest}" ]; then + echo "Running manifest of type ${type} ..." cdist-manifest-run "${__cdist_tmp_dir}" "${manifest}" echo "Trying to merge... " From f988739d6333a5d7295ef6d0fc800517e8cd4b28 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 18:45:41 +0100 Subject: [PATCH 0169/6109] begin to merge internal type document into man/cdist-types.text Signed-off-by: Nico Schottelius --- .../cdist-types.CLEANUP+INTEGRATE_MAN | 127 ------------------ doc/man/cdist-types.text | 127 ++++++++++++++++++ 2 files changed, 127 insertions(+), 127 deletions(-) delete mode 100644 doc/internal.REMOVE_PRE_1.0/cdist-types.CLEANUP+INTEGRATE_MAN diff --git a/doc/internal.REMOVE_PRE_1.0/cdist-types.CLEANUP+INTEGRATE_MAN b/doc/internal.REMOVE_PRE_1.0/cdist-types.CLEANUP+INTEGRATE_MAN deleted file mode 100644 index c7f7682f..00000000 --- a/doc/internal.REMOVE_PRE_1.0/cdist-types.CLEANUP+INTEGRATE_MAN +++ /dev/null @@ -1,127 +0,0 @@ -This document is a brainstorming document, on how to integrate types. - -Proposed/discussed structures: - -1) 2010-11-02 - $basedir/$type/ - properties/ - name/ - required # required | optional - choices # \n liste - - - meta/ - default (shell script) - types/ - pukman/ - -2) 2010-11-09 - -How to write my own type named "coffee": - - Create the directory /etc/cdist/types/coffee/ - Create the file /etc/cdist/types/coffee/README containing a description of the -type. - If your type supports attributes, create the directory /etc/cdist/types/coffee/ -attributes. - For each attribute, create the file - /etc/cdist/types/coffee/attributes/$attribute_name which contains - - a short description on the first line - then a blank line - then a long description (probably over several lines) - - If you think your type may be useful for others, submit it for inclusion - into cdist at cdist -- at -- l.schottelius.org. - - Create /etc/cdist/types/coffee/init which reads $configinput - (either via cconfig or via environment) and outputs a block of - shell code suitable for running on the client. - - - --------------------------------------------------------------------------------- -type layout: - - / - config # binary that is called to adjust cconfig tree - change # binary that is called on the remote host? --------------------------------------------------------------------------------- -cdist view on types: - -How types are integrated/run: - - First stage: - - If cdist encounters type in manifest, - a wrapper script is run, that creates a - new entry in the cconfig database and adds - attribute values. This defines a cconfig - tree, that may look as follows: - - ///: - - myhost/__file/cdist_bin/source - myhost/__file/cdist_bin/destination - ... - - - In this stage, no conflicts may occur, as - no type code has been called (i.e. only - manifests, which map config to hosts is - applied). - - Second stage: - - The "manifest" script of every used type - (i.e. the manifests created at least one object) - is called, which again is able to call other - types. All created objects may also be modified - by the type. - - For instance a "httpd" type may call the - "webroot" type with --path / ... - # FIND CASE WHERE SENSEFUL => look through - current puppet config - - - The newly created objects are merged back into - the existing tree. No conflicts may occur during - the merge, because this would implicit that the - type conflicts with other types. - - The idea of this that a type may expand another - type with functionality, but may need to adjust - ("overwrite") settings from the original type. - - Third stage: - - Cdist calls the "gencode" binary of the types - for every created object. This binary should create - code to be executed on the target on stdout. - - If the gencode binary fails, it must print diagnostic - messages on stderr and exit non-zero. - - A description of what the generated code may/must/should - do can be found at the end of this document. - - - Cdist merges together the generated code - (taking care of DEPENDENCIES (which are not - yet defined (take care, double nested brackets))) - - Fourth stage: - - The resulting shell script is transferred - to the target and executed. - --------------------------------------------------------------------------------- -Scope of code execution on the client - - It should be assumed that the clients are pretty dumb - and thus do not have high level tools like python - installed. - - If a type requires specific tools to be present - on the target, there must be another type that - provides this tool and the first type must create - an object of the specific type. - - If the generated code fails on the client, it must - print diagnostistic messages on stderr and call - "exit 1", so the configuration is aborted. - diff --git a/doc/man/cdist-types.text b/doc/man/cdist-types.text index deea7971..828fa665 100644 --- a/doc/man/cdist-types.text +++ b/doc/man/cdist-types.text @@ -17,6 +17,133 @@ underscores, because types will be executed and thus you prevent collisions with real binaries (like "file"). +This document is a brainstorming document, on how to integrate types. + +Proposed/discussed structures: + +1) 2010-11-02 + $basedir/$type/ + properties/ + name/ + required # required | optional + choices # \n liste + + + meta/ + default (shell script) + types/ + pukman/ + +2) 2010-11-09 + +How to write my own type named "coffee": + + Create the directory /etc/cdist/types/coffee/ + Create the file /etc/cdist/types/coffee/README containing a description of the +type. + If your type supports attributes, create the directory /etc/cdist/types/coffee/ +attributes. + For each attribute, create the file + /etc/cdist/types/coffee/attributes/$attribute_name which contains + + a short description on the first line + then a blank line + then a long description (probably over several lines) + + If you think your type may be useful for others, submit it for inclusion + into cdist at cdist -- at -- l.schottelius.org. + + Create /etc/cdist/types/coffee/init which reads $configinput + (either via cconfig or via environment) and outputs a block of + shell code suitable for running on the client. + + + +-------------------------------------------------------------------------------- +type layout: + + / + config # binary that is called to adjust cconfig tree + change # binary that is called on the remote host? +-------------------------------------------------------------------------------- +cdist view on types: + +How types are integrated/run: + + First stage: [done] + - If cdist encounters type in manifest, + a wrapper script is run, that creates a + new entry in the cconfig database and adds + attribute values. This defines a cconfig + tree, that may look as follows: + + ///: + + myhost/__file/cdist_bin/source + myhost/__file/cdist_bin/destination + ... + + - In this stage, no conflicts may occur, as + no type code has been called (i.e. only + manifests, which map config to hosts is + applied). + + Second stage: [done] + - The "init" script of every used type + (i.e. the manifests created at least one object) + is called, which again is able to call other + types. All created objects may also be modified + by the type. + + For instance a "httpd" type may call the + "webroot" type with --path / ... + # FIND CASE WHERE SENSEFUL => look through + current puppet config + + - The newly created objects are merged back into + the existing tree. No conflicts may occur during + the merge, because this would implicit that the + type conflicts with other types. + + The idea of this that a type may expand another + type with functionality, but may need to adjust + ("overwrite") settings from the original type. + + Third stage: + - Cdist calls the "gencode" binary of the types + for every created object. This binary should create + code to be executed on the target on stdout. + + If the gencode binary fails, it must print diagnostic + messages on stderr and exit non-zero. + + A description of what the generated code may/must/should + do can be found at the end of this document. + + - Cdist merges together the generated code + (taking care of DEPENDENCIES (which are not + yet defined (take care, double nested brackets))) + + Fourth stage: + - The resulting shell script is transferred + to the target and executed. + +-------------------------------------------------------------------------------- +Scope of code execution on the client + + It should be assumed that the clients are pretty dumb + and thus do not have high level tools like python + installed. + + If a type requires specific tools to be present + on the target, there must be another type that + provides this tool and the first type must create + an object of the specific type. + + If the generated code fails on the client, it must + print diagnostistic messages on stderr and call + "exit 1", so the configuration is aborted. + SEE ALSO -------- From bba7f704dd9de61faa1c508da08a77787f07f70a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 18:49:43 +0100 Subject: [PATCH 0170/6109] also begin to migrate the configuration layout Signed-off-by: Nico Schottelius --- .../config-layout.TO_MAN => man/cdist-config-layout.text} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/{internal.REMOVE_PRE_1.0/config-layout.TO_MAN => man/cdist-config-layout.text} (100%) diff --git a/doc/internal.REMOVE_PRE_1.0/config-layout.TO_MAN b/doc/man/cdist-config-layout.text similarity index 100% rename from doc/internal.REMOVE_PRE_1.0/config-layout.TO_MAN rename to doc/man/cdist-config-layout.text From 1d65a77ebfa76a5826b756512ee49feda8eae849 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 22:35:01 +0100 Subject: [PATCH 0171/6109] cleanup main manpage Signed-off-by: Nico Schottelius --- doc/man/cdist.text | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/doc/man/cdist.text b/doc/man/cdist.text index 109d2f01..677a727a 100644 --- a/doc/man/cdist.text +++ b/doc/man/cdist.text @@ -5,7 +5,7 @@ Nico Schottelius NAME ---- -cdist - Configuration distribution system +cdist - Configuration management system DESCRIPTION @@ -15,28 +15,27 @@ UNIX systems and apply them. Cdist generally uses the push approach (a server pushes out the configuration to the clients), but can also be used the pull way (see cdist-push-pull(7)). -Cdist is configured in shell syntax, which is "compiled" to an -internal configuration representation (cdist-cconfig(7)), which again -is used to generate an executable, which is run on the client -(see cdist-language(7), cdist-design(7)). +Cdist-deploy-to(1) is the main command to be used to deploy +configurations to a host. -To get your fingers dirty with cdist very quick, have -a look at cdist-quickstart(7). +The mapping of configurations to hosts is defined +in so called manifests, which are written in shell +script language (see cdist-manifest(7)). +Logical units of files and directives are called "types" in cdist jargon +(see cdist-types(7)). Cdist ships with some types, which you can change +or create new ones or even submit your types for inclusion into mainstream +(see cdist-type-inclusion(7)). -REQUIREMENTS ------------- -Cdist requires enabled ssh-server and a posix shell on the clients and -ssh-client and posix shell on the server. Additionaly, it requires -the following unix tools: - -- find -- +The fastest way to get a host configured using cdist is probably +cdist-quickstart(7). SEE ALSO -------- -Website: http://www.nico.schottelius.org/cdist/[] +Website: http://www.nico.schottelius.org/cdist/[], cdist-push-pull(7), +cdist-deploy-to(1), cdist-manifest(7), cdist-types(7), cdist-type-inclusion(7), +cdist-quickstart(7) COPYING From 3112534213eb12d8d86a090e005ce197038d735c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 22:45:24 +0100 Subject: [PATCH 0172/6109] add manpage for cdist-deploy-to Signed-off-by: Nico Schottelius --- doc/man/cdist-deploy-to.text | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 doc/man/cdist-deploy-to.text diff --git a/doc/man/cdist-deploy-to.text b/doc/man/cdist-deploy-to.text new file mode 100644 index 00000000..fdb3dd93 --- /dev/null +++ b/doc/man/cdist-deploy-to.text @@ -0,0 +1,37 @@ +cdist-deploy-to(1) +================== +Nico Schottelius + + +NAME +---- +cdist-deploy-to - Deploy configuration to host + +SYNOPSIS +-------- +cdist-deploy-to HOSTNAME + + +DESCRIPTION +----------- +Cdist-deploy-to deploys the configuration to the specified host. +It triggers the execution of several other scripts, which are +explained (or referenced) in cdist-stages(7). +It is intented to run either from the command line or from cron. + + +REQUIREMENTS +------------ +Cdist-deploy-to requires an enabled ssh-server and a posix shell on the target +host and a ssh-client and posix shell on the server. + + +SEE ALSO +-------- +cdist(7), cdist-stages(7) + + +COPYING +------- +Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). From edc82f5423f7e8dfc739a0b66a4f48b1c112187b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 22:46:47 +0100 Subject: [PATCH 0173/6109] begin document cdist-stages Signed-off-by: Nico Schottelius --- doc/man/cdist-stages.text | 78 +++++++++++++++++++++++++++++++++++++++ doc/man/cdist-types.text | 63 ------------------------------- 2 files changed, 78 insertions(+), 63 deletions(-) create mode 100644 doc/man/cdist-stages.text diff --git a/doc/man/cdist-stages.text b/doc/man/cdist-stages.text new file mode 100644 index 00000000..0540682f --- /dev/null +++ b/doc/man/cdist-stages.text @@ -0,0 +1,78 @@ +cdist-types(7) +=============== +Nico Schottelius + + +NAME +---- +cdist-types - Functionality bundled + + +DESCRIPTION +----------- + First stage: [done] + - If cdist encounters type in manifest, + a wrapper script is run, that creates a + new entry in the cconfig database and adds + attribute values. This defines a cconfig + tree, that may look as follows: + + ///: + + myhost/__file/cdist_bin/source + myhost/__file/cdist_bin/destination + ... + + - In this stage, no conflicts may occur, as + no type code has been called (i.e. only + manifests, which map config to hosts is + applied). + + Second stage: [done] + - The "init" script of every used type + (i.e. the manifests created at least one object) + is called, which again is able to call other + types. All created objects may also be modified + by the type. + + For instance a "httpd" type may call the + "webroot" type with --path / ... + # FIND CASE WHERE SENSEFUL => look through + current puppet config + + - The newly created objects are merged back into + the existing tree. No conflicts may occur during + the merge, because this would implicit that the + type conflicts with other types. + + The idea of this that a type may expand another + type with functionality, but may need to adjust + ("overwrite") settings from the original type. + + Third stage: + - Cdist calls the "gencode" binary of the types + for every created object. This binary should create + code to be executed on the target on stdout. + + If the gencode binary fails, it must print diagnostic + messages on stderr and exit non-zero. + + A description of what the generated code may/must/should + do can be found at the end of this document. + + - Cdist merges together the generated code + (taking care of DEPENDENCIES (which are not + yet defined (take care, double nested brackets))) + + Fourth stage: + - The resulting shell script is transferred + to the target and executed. + +SEE ALSO +-------- + + +COPYING +------- +Copyright \(C) 2010-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/doc/man/cdist-types.text b/doc/man/cdist-types.text index 828fa665..89b0fc6f 100644 --- a/doc/man/cdist-types.text +++ b/doc/man/cdist-types.text @@ -66,69 +66,6 @@ type layout: config # binary that is called to adjust cconfig tree change # binary that is called on the remote host? -------------------------------------------------------------------------------- -cdist view on types: - -How types are integrated/run: - - First stage: [done] - - If cdist encounters type in manifest, - a wrapper script is run, that creates a - new entry in the cconfig database and adds - attribute values. This defines a cconfig - tree, that may look as follows: - - ///: - - myhost/__file/cdist_bin/source - myhost/__file/cdist_bin/destination - ... - - - In this stage, no conflicts may occur, as - no type code has been called (i.e. only - manifests, which map config to hosts is - applied). - - Second stage: [done] - - The "init" script of every used type - (i.e. the manifests created at least one object) - is called, which again is able to call other - types. All created objects may also be modified - by the type. - - For instance a "httpd" type may call the - "webroot" type with --path / ... - # FIND CASE WHERE SENSEFUL => look through - current puppet config - - - The newly created objects are merged back into - the existing tree. No conflicts may occur during - the merge, because this would implicit that the - type conflicts with other types. - - The idea of this that a type may expand another - type with functionality, but may need to adjust - ("overwrite") settings from the original type. - - Third stage: - - Cdist calls the "gencode" binary of the types - for every created object. This binary should create - code to be executed on the target on stdout. - - If the gencode binary fails, it must print diagnostic - messages on stderr and exit non-zero. - - A description of what the generated code may/must/should - do can be found at the end of this document. - - - Cdist merges together the generated code - (taking care of DEPENDENCIES (which are not - yet defined (take care, double nested brackets))) - - Fourth stage: - - The resulting shell script is transferred - to the target and executed. - --------------------------------------------------------------------------------- Scope of code execution on the client It should be assumed that the clients are pretty dumb From e43e910012172de203b6d35227022b7ee65cc4dd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 23:07:43 +0100 Subject: [PATCH 0174/6109] define stages Signed-off-by: Nico Schottelius --- doc/man/cdist-stages.text | 96 +++++++++++++++++++-------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/doc/man/cdist-stages.text b/doc/man/cdist-stages.text index 0540682f..69cea7d1 100644 --- a/doc/man/cdist-stages.text +++ b/doc/man/cdist-stages.text @@ -1,75 +1,75 @@ -cdist-types(7) +cdist-stages(7) =============== Nico Schottelius NAME ---- -cdist-types - Functionality bundled +cdist-stages - How the configuration is built DESCRIPTION ----------- - First stage: [done] - - If cdist encounters type in manifest, - a wrapper script is run, that creates a - new entry in the cconfig database and adds - attribute values. This defines a cconfig - tree, that may look as follows: - - ///: +Starting the execution of deployment with cdist-deploy-to(1), +cdist passes through different stages: - myhost/__file/cdist_bin/source - myhost/__file/cdist_bin/destination - ... +- First stage: Get information about target + Every existing explorer (see cdist-explorers(7) is run on + the target and the results are copied back into the local + cache (see cdist-cache(7)). These values can be used by + manifests and types. - - In this stage, no conflicts may occur, as - no type code has been called (i.e. only - manifests, which map config to hosts is - applied). +- Second stage: Initial manifest run + The initial manifest (see cdist-manifests(7) is run, + which is done by cdist-manifest-init(1). + + This run creates an internal database in cconfig + format (see cdist-config-layout(7), that contains all + objects configured for the specific host. - Second stage: [done] - - The "init" script of every used type - (i.e. the manifests created at least one object) - is called, which again is able to call other - types. All created objects may also be modified - by the type. + In this stage, no conflicts may occur, i.e. no + object of the same type with the same id may + be created. + + You can trigger the first stage part using + cdist-manifest-init(1). - For instance a "httpd" type may call the - "webroot" type with --path / ... - # FIND CASE WHERE SENSEFUL => look through - current puppet config +- Third stage: Execution of types + Every object is checked whether its type has an init + script (see cdist-types(7)). If the type of the object + has an init script, it is run. This init script may + generate additional objects. - - The newly created objects are merged back into - the existing tree. No conflicts may occur during - the merge, because this would implicit that the - type conflicts with other types. + For instance the object __apache/www.test.ch is of + type __apache, which may contain an init script, which + creates new objects of type __file. - The idea of this that a type may expand another - type with functionality, but may need to adjust - ("overwrite") settings from the original type. + The newly created objects are merged back into + the existing tree. No conflicts may occur during + the merge. A conflict would mean that two different + objects try to create the same object, which indicates a + broken configuration. - Third stage: - - Cdist calls the "gencode" binary of the types - for every created object. This binary should create - code to be executed on the target on stdout. +- Third stage: Code generation + The "gencode" binary of the types for every existing object is + called to generate code that will be executed on the target host. - If the gencode binary fails, it must print diagnostic - messages on stderr and exit non-zero. + This binary should create code to be executed on the target on stdout. - A description of what the generated code may/must/should - do can be found at the end of this document. + If the gencode binary fails, it must print diagnostic messages on stderr + and exit non-zero. - - Cdist merges together the generated code - (taking care of DEPENDENCIES (which are not - yet defined (take care, double nested brackets))) + A description of what the generated code may/must/should + do can be found in cdist-types-gencode(7). + +- Fourth stage: + The resulting code is transferred to the target host and executed, + the run of cdist-deploy-to(1) ends. - Fourth stage: - - The resulting shell script is transferred - to the target and executed. SEE ALSO -------- +cdist(7), cdist-deploy-to(1), cdist-config-layout(7), cdist-manifest-init(1) COPYING From 0ccb5ebcdb9ebb434728072c03713eb2834e33bd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 23:30:14 +0100 Subject: [PATCH 0175/6109] many more ideas for the config layout, many cleanups Signed-off-by: Nico Schottelius --- doc/man/cdist-config-layout.text | 128 ++++++++++++++++++++++++------- 1 file changed, 101 insertions(+), 27 deletions(-) diff --git a/doc/man/cdist-config-layout.text b/doc/man/cdist-config-layout.text index 97c0c22e..929d445e 100644 --- a/doc/man/cdist-config-layout.text +++ b/doc/man/cdist-config-layout.text @@ -1,33 +1,89 @@ -On the server: - -conf/manifests/init - - the central entry point - - is a shell script - - defines mapping from types to hosts - - will be called by cdist and the name - will be available for tracking in - cdist core functions - -conf/manifests/* (all other) - - same function as above - - but won't be called by cdist - - method to seperate configuration parts +cdist-config-layout(7) +====================== +Nico Schottelius + + + +NAME +---- +cdist-config-layout - Usage of paths in cdist + + +DESCRIPTION +----------- +If not otherwise specified, all paths are relative to the configuration +directory, which is normally /etc/cdist (but can be changed using environment +variables, see cdist-environment(7)). + +- manifests/init: + This is the central entry point used by cdist-manifest-init(1). + It is an executable (+x bit set) shell script that can use + values for the explorers to decide which configuration to create + for the specified target host. + + It should be primary used to define mapping from configurations to hosts. + +- manifests/*: All other files in this directory + Cdist does not use them directly, but you can seperate + configuration mappings, if you have a lot of code in the manifest/init + file. This may also be very helpful to have different admins maintain + different groups of hosts. + +- explorers/ + Contains explorers to be run on the target hosts, see cdist-explorers(7). + +- types/ + Contains all available types, which are used to provide + some kind of functionality. See cdist-stages(7). + +- types//init: + Used to generate additional objects from a type. + See cdist-stages(7), cdist-types(7). + +- types//gencode: + Used to generate code to be executed on the client. + See cdist-types(7). + +- cache/ + The cache contains results from previous runs, which may also + be used in types to gather information about other hosts + (like ssh-keys). + +- cache/ + +- tmpdir: Temporary storage + A tempdir and a tempfile is provided by cdist-config(1), which + will be removed when the scripts ends automatically. + +- tmpdir/cache/: New cache + This directory contains elements for the new cache of the host. + If all stages are completed successfully, the new cache is used + to replace the previous one. + +- tmpdir/explorers/: Output of explorers + If the run was successful, the results are copied into the new cache. + +- tmpdir/objects/: Objects created during run + If the run was successful, the results are copied into the new cache. + + +AUTHOR +------ +Nico Schottelius + + +RESOURCES +--------- +Main web site: http://www.nico.schottelius.org/cdist/[] + + +COPYING +------- +Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). -conf/types// - - provide standard types - - have required and optional arguments - - are independent of hosts - - may make use of other types to realise a new type - - how to overwrite stuff? - - overwrite in own tree? - - needs knowledge of inherited provider - - similar to current situation in puppet, - but more like reusable defines - - or may implement some functionality on their own -conf/explorers/ - - explorers to be run on the target hosts Differences manifests vs. types @@ -37,3 +93,21 @@ Differences manifests vs. types main purpose map config to host provide functionality can change config no (prevent conflicts) yes (allow inheritance) specificness site specific (globally) reusable + + +-------------------------------------------------------------------------------- +unsorted: cache / objects + + - If cdist encounters type in manifest, + a wrapper script is run, that creates a + new entry in the cconfig database and adds + attribute values. This defines a cconfig + tree, that may look as follows: + + + ///: + + myhost/__file/cdist_bin/source + myhost/__file/cdist_bin/destination + ... + From a3436bf775ef7cc238852b29d99304f39eb302fa Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 23:33:58 +0100 Subject: [PATCH 0176/6109] complete cleanup of config-layout manpage Signed-off-by: Nico Schottelius --- doc/man/cdist-config-layout.text | 43 ++++++++------------------------ 1 file changed, 11 insertions(+), 32 deletions(-) diff --git a/doc/man/cdist-config-layout.text b/doc/man/cdist-config-layout.text index 929d445e..03eb595d 100644 --- a/doc/man/cdist-config-layout.text +++ b/doc/man/cdist-config-layout.text @@ -3,7 +3,6 @@ cdist-config-layout(7) Nico Schottelius - NAME ---- cdist-config-layout - Usage of paths in cdist @@ -49,7 +48,17 @@ variables, see cdist-environment(7)). be used in types to gather information about other hosts (like ssh-keys). -- cache/ +- cache/hosts/: + Contains cache of every known host. + +- cache/hosts/: + Contains cache of the specific host. + +- cache/hosts//explorers: + Output of explorers from last run for the host. + +- cache/hosts//objects: + Objects created during last run for the host. - tmpdir: Temporary storage A tempdir and a tempfile is provided by cdist-config(1), which @@ -81,33 +90,3 @@ COPYING ------- Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is granted under the terms of the GNU General Public License version 3 (GPLv3). - - - - -Differences manifests vs. types - - - manifests types - -main purpose map config to host provide functionality -can change config no (prevent conflicts) yes (allow inheritance) -specificness site specific (globally) reusable - - --------------------------------------------------------------------------------- -unsorted: cache / objects - - - If cdist encounters type in manifest, - a wrapper script is run, that creates a - new entry in the cconfig database and adds - attribute values. This defines a cconfig - tree, that may look as follows: - - - ///: - - myhost/__file/cdist_bin/source - myhost/__file/cdist_bin/destination - ... - From 4ee71d5571e97db85ff3656387e22a842fa6b625 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 23:34:18 +0100 Subject: [PATCH 0177/6109] merge back and forth ideas for further manpages Signed-off-by: Nico Schottelius --- TODO-1.0 | 13 +++++++++---- doc/man/cdist-manifests.text | 15 +++++++++++++++ doc/man/cdist-types.text | 21 +++++++++++++++++++++ 3 files changed, 45 insertions(+), 4 deletions(-) diff --git a/TODO-1.0 b/TODO-1.0 index 6c509548..a9bf3bd7 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -6,15 +6,20 @@ x Create configuration tree from manifest x write binaries, which create the tree when called from manifest (cdist_tree_wrapper) x Define configuration paths (doc/internal/config-layout) x Redo explorers (see manpage) -/ Write at least one type -- Parse configuration tree/objects recursively - - can/may types modify tree? - - may open door for getting information from manifest / other stuff +x Parse configuration tree/objects recursively + x can/may types modify tree? + -> yes, of everything a type created itself! + x may open door for getting information from manifest / other stuff + +- Cleanly define paths for object creation, especially recursive calls + - generate code to be executed on client - check return codes - abort on first error? +/ Write at least one type (completly!) + - doc 1.0: - cdist manpage (main manpage) - cleanup following man + their tree: diff --git a/doc/man/cdist-manifests.text b/doc/man/cdist-manifests.text index c382fce5..1e3ce3cb 100644 --- a/doc/man/cdist-manifests.text +++ b/doc/man/cdist-manifests.text @@ -15,6 +15,21 @@ should be configured on a host. ENTRYPOINT: $prefix/manifests/init +unsorted: cache / objects + + - If cdist encounters type in manifest, + a wrapper script is run, that creates a + new entry in the cconfig database and adds + attribute values. This defines a cconfig + tree, that may look as follows: + + + ///: + + myhost/__file/cdist_bin/source + myhost/__file/cdist_bin/destination + ... + ENVIRONMENT ----------- diff --git a/doc/man/cdist-types.text b/doc/man/cdist-types.text index 89b0fc6f..2ef07284 100644 --- a/doc/man/cdist-types.text +++ b/doc/man/cdist-types.text @@ -81,6 +81,27 @@ Scope of code execution on the client print diagnostistic messages on stderr and call "exit 1", so the configuration is aborted. +-------------------------------------------------------------------------------- + - have required and optional arguments + - are independent of hosts + - may make use of other types to realise a new type + - how to overwrite stuff? + - overwrite in own tree? + - needs knowledge of inherited provider + - similar to current situation in puppet, + but more like reusable defines + - or may implement some functionality on their own + +-------------------------------------------------------------------------------- +Differences manifests vs. types + + + manifests types + +main purpose map config to host provide functionality +can change config no (prevent conflicts) yes (allow inheritance) +specificness site specific (globally) reusable + SEE ALSO -------- From 425f2bb71a15dd838c549ddd84b8c28dc6cb6ae5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Feb 2011 23:59:21 +0100 Subject: [PATCH 0178/6109] make scripts more variable and less dependent on each other Signed-off-by: Nico Schottelius --- bin/cdist-explorer-run | 11 ++++++++--- bin/cdist-manifest-init | 9 +++++++-- bin/cdist-manifest-run | 8 +++++--- bin/cdist_tree_wrapper | 11 ++++++----- 4 files changed, 26 insertions(+), 13 deletions(-) diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index 5d325d3e..bf738355 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -24,7 +24,12 @@ . cdist-config -[ "${__cdist_target_host}" ] || __cdist_usage "Need \$__cdist_target_host setup" +if [ $# -ne 2 ]; then + __cdist_usage " " +fi + +export __cdist_target_host="$1"; shift +export __cdist_output_dir="$1"; shift set -e @@ -52,12 +57,12 @@ ssh root@${__cdist_target_host} \ \"${__cdist_remote_explorer_dir}\" \"${__cdist_remote_cache_explorer}\"" # Ensure local destination directory exists -mkdir -p "$(__cdist_cache_host)/$__cdist_name_explorer" +mkdir -p "$__cdist_output_dir" # FIXME: enable -q as soon as the code is cleaned up # Transfer back all results - FIXME: Add 2 level cache, so old version is kept until success scp -r "root@${__cdist_target_host}:${__cdist_remote_cache_explorer}/*" \ - "$(__cdist_cache_host)/$__cdist_name_explorer" + "$__cdist_output_dir" exit 0 diff --git a/bin/cdist-manifest-init b/bin/cdist-manifest-init index 2ab2b758..7e3c0f2b 100755 --- a/bin/cdist-manifest-init +++ b/bin/cdist-manifest-init @@ -24,6 +24,11 @@ . cdist-config -[ "${__cdist_target_host}" ] || __cdist_usage "Need \$__cdist_target_host setup" +if [ $# -ne 2 ]; then + __cdist_usage " " +fi -cdist-manifest-run "$(__cdist_cache_host)" "${__cdist_manifest_init}" +export __cdist_target_host="$1"; shift +export __cdist_output_dir="$1"; shift + +cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest_init" "$__cdist_output_dir" diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 28123afa..ba9eb9e6 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -24,14 +24,16 @@ . cdist-config -if [ $# -ne 2 ]; then - __cdist_usage " " +if [ $# -ne 3 ]; then + __cdist_usage " " fi +set -x set -aeu -__cdist_output_dir="$1"; shift +export __cdist_target_host="$1"; shift export __cdist_manifest="$1"; shift +export __cdist_output_dir="$1"; shift # Ensure binaries exist and are up-to-date cdist-build-bin diff --git a/bin/cdist_tree_wrapper b/bin/cdist_tree_wrapper index 31c49ed7..dde151b5 100755 --- a/bin/cdist_tree_wrapper +++ b/bin/cdist_tree_wrapper @@ -35,14 +35,15 @@ echo "I am $__cdist_myname and have been called with $@" export __cdist_object_id="$1"; shift export __cdist_type_current="$__cdist_myname" -echo "$__cdist_object_id" | grep -q "^${__cdist_sane_regexp}\$" || __cdist_usage "Provide sane id, please" +echo "$__cdist_object_id" | grep -q "^${__cdist_sane_regexp}\$" || \ + __cdist_usage "Insane object id, ${__cdist_object_id}." -__cdist_tid="${__cdist_myname}/${__cdist_object_id}" -__cdist_ddir="$(__cdist_cache_host)/${__cdist_name_object}/${__cdist_tid}" +__cdist_tid="${__cdist_type_current}/${__cdist_object_id}" +__cdist_ddir="$__cdist_output_dir/${__cdist_tid}" if [ -e "${__cdist_ddir}" ]; then - source="$(cat "${__cdist_ddir}/${__cdist_object_source}")" - __cdist_usage "${__cdist_tid} already exists (source: $source)" + source="$(__cdist_object_source "${__cdist_ddir}")" + __cdist_exit_err "${__cdist_tid} already exists (source: $source)" fi mkdir -p "${__cdist_ddir}" From 2f926582e0cf69552fd57314811d3da888d118dc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Feb 2011 00:08:05 +0100 Subject: [PATCH 0179/6109] +mass cleanup Signed-off-by: Nico Schottelius --- HACKERS_README | 12 +++++++----- bin/cdist-manifest-recursive-run | 10 +++++----- bin/cdist-manifest-run | 1 - conf/manifests/init | 2 ++ doc/man/cdist-manifests.text | 2 ++ 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index 20c1c051..0015031c 100644 --- a/HACKERS_README +++ b/HACKERS_README @@ -13,19 +13,21 @@ What you can do so far: (executed from top level directory) # prepare use: export PATH="$PATH:$(pwd -P)/bin" +object_tmp=/tmp/localhost/objects +explorer_tmp=/tmp/localhost/explorers # Test first level manifest execution -__cdist_config=$(pwd -P)/conf __cdist_target_host=localhost cdist-manifest-init +__cdist_config=$(pwd -P)/conf cdist-manifest-init localhost $object_tmp # See what it generated -find conf/cache +find $object_tmp # Run explorer on a "remote" host -__cdist_config=$(pwd -P)/conf __cdist_target_host=localhost cdist-explorer-run +__cdist_config=$(pwd -P)/conf cdist-explorer-run localhost $explorer_tmp # Display result -find conf/cache/hosts/localhost +find $explorer_tmp # Soon working: -__cdist_config=$(pwd -P)/conf __cdist_target_host=localhost cdist-manifest-recursive-run ~/p/cdist/conf/cache/hosts/localhost/objects +__cdist_config=$(pwd -P)/conf cdist-manifest-recursive-run localhost $object_tmp diff --git a/bin/cdist-manifest-recursive-run b/bin/cdist-manifest-recursive-run index 1c0027d4..21a2c08e 100755 --- a/bin/cdist-manifest-recursive-run +++ b/bin/cdist-manifest-recursive-run @@ -29,12 +29,13 @@ . cdist-config -if [ $# -ne 1 ]; then - __cdist_usage "" +if [ $# -ne 2 ]; then + __cdist_usage " " fi set -eu +__cdist_target_host="$1"; shift __cdist_object_dir="$1"; shift # change to directory containing objects @@ -67,7 +68,7 @@ while [ "$__cdist_object_created_new" = 1 ]; do if [ -x "${manifest}" ]; then echo "Running manifest of type ${type} ..." - cdist-manifest-run "${__cdist_tmp_dir}" "${manifest}" + cdist-manifest-run "$__cdist_target_host" "${manifest}" "${__cdist_tmp_dir}" echo "Trying to merge... " @@ -80,8 +81,7 @@ while [ "$__cdist_object_created_new" = 1 ]; do while read newobject; do if [ -e "$__cdist_object_dir/${newobject}" ]; then - echo FAIIIIIIIIL - exit 23 + __cdist_exit_err "${newobject} already exists, merge failed." else # Fine, merge back! pax -r -w "$newobject" "$__cdist_object_dir" diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index ba9eb9e6..4bdbde79 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -28,7 +28,6 @@ if [ $# -ne 3 ]; then __cdist_usage " " fi -set -x set -aeu export __cdist_target_host="$1"; shift diff --git a/conf/manifests/init b/conf/manifests/init index 2923ba88..9e8ed4bb 100755 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -2,6 +2,8 @@ # This is a sample manifest, but used in real world # +set -x + # All ikqs get a sample file case "$__cdist_target_host" in ikq*|localhost) diff --git a/doc/man/cdist-manifests.text b/doc/man/cdist-manifests.text index 1e3ce3cb..852de7ec 100644 --- a/doc/man/cdist-manifests.text +++ b/doc/man/cdist-manifests.text @@ -30,6 +30,8 @@ unsorted: cache / objects myhost/__file/cdist_bin/destination ... +-------------------------------------------------------------------------------- + ENVIRONMENT ----------- From 0c6fc7aa863f2ed3389311d199d3beec84c7c913 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Feb 2011 00:12:07 +0100 Subject: [PATCH 0180/6109] remove obsolete cdist-preprocess Signed-off-by: Nico Schottelius --- bin/cdist-preprocess | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100755 bin/cdist-preprocess diff --git a/bin/cdist-preprocess b/bin/cdist-preprocess deleted file mode 100755 index 5fdab20e..00000000 --- a/bin/cdist-preprocess +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# -# 2010 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 other scripts -# - -. cdist-config - -[ $# -eq 1 ] || __cdist_usage "" - -set -e -cdist-build-explorer | ssh "$1" > "${__cdist_tmp_file}" - -# FIXME: Warning: An untrusted/compromised client could in theory exploit us -# And a filter function like grep '^__cdist_explore.*=".*"$' -# is probably not effective! -. "${__cdist_tmp_file}" - - -# Create cconfig for the host - FIXME: replace with a recursive version -# to allow type runners, overwrites and merges -cdist-manifest-init From 15bc9c9af1a9bcc7eeb0945b1d20b7f5dc8bc7e6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Feb 2011 00:12:42 +0100 Subject: [PATCH 0181/6109] remove obsolete cdist-compile Signed-off-by: Nico Schottelius --- bin/cdist-compile | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100755 bin/cdist-compile diff --git a/bin/cdist-compile b/bin/cdist-compile deleted file mode 100755 index 78b28263..00000000 --- a/bin/cdist-compile +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# -# 2010 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 . -# -# -# Compile configuration - create cconfig from manifests -# - -[ $# -eq 1 ] || __cdist_usage "" - -echo This script should run the manifest file From 2a65be81cfdc70ad15f741ec3411722edee7bdf5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Feb 2011 00:18:05 +0100 Subject: [PATCH 0182/6109] note status in manpage Signed-off-by: Nico Schottelius --- doc/man/cdist-stages.text | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/man/cdist-stages.text b/doc/man/cdist-stages.text index 69cea7d1..fc43d7da 100644 --- a/doc/man/cdist-stages.text +++ b/doc/man/cdist-stages.text @@ -50,7 +50,7 @@ cdist passes through different stages: objects try to create the same object, which indicates a broken configuration. -- Third stage: Code generation +- Third stage: Code generation [TODO] The "gencode" binary of the types for every existing object is called to generate code that will be executed on the target host. @@ -62,7 +62,7 @@ cdist passes through different stages: A description of what the generated code may/must/should do can be found in cdist-types-gencode(7). -- Fourth stage: +- Fourth stage: [TODO] The resulting code is transferred to the target host and executed, the run of cdist-deploy-to(1) ends. From 1bae761fa0126e954f0bddf30485ecc7f6b583cd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Feb 2011 00:26:26 +0100 Subject: [PATCH 0183/6109] prepare next steps: stage four and five Signed-off-by: Nico Schottelius --- bin/cdist-build | 32 -------------------------------- bin/cdist-config | 1 + bin/cdist-deploy-to | 28 +++++++++++++++++++++++----- bin/cdist-manifest-recursive-run | 9 ++++----- bin/cdist-template.obsolete | 27 --------------------------- 5 files changed, 28 insertions(+), 69 deletions(-) delete mode 100755 bin/cdist-build delete mode 100755 bin/cdist-template.obsolete diff --git a/bin/cdist-build b/bin/cdist-build deleted file mode 100755 index f5d5b870..00000000 --- a/bin/cdist-build +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# -# 2010 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 . -# -# -# Build configuration and executable for host -# - -. cdist-config - -[ $# -eq 1 ] || __cdist_usage "" - -set -e - -. cdist-preprocess "$1" -. cdist-compile "$1" -. cdist-link "$1" diff --git a/bin/cdist-config b/bin/cdist-config index 5d308598..e2846021 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -28,6 +28,7 @@ # Names : ${__cdist_name_bin:=bin} : ${__cdist_name_cache:=cache} +: ${__cdist_name_code:=code} : ${__cdist_name_explorer:=explorers} : ${__cdist_name_host:=hosts} : ${__cdist_name_init:=init} diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 7d766abd..ac22e26c 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -27,9 +27,27 @@ set -e -# Internal variables, usable by -export __cdist_target_host="$1" -export __cdist_source_host="$(cdist_explore_hostname)" +__cdist_target_host="$1" -. cdist-build "$__cdist_target_host" -. cdist-remote-exec "$__cdist_target_host" +tmp_exp="$__cdist_tmp_dir/$__cdist_name_explorer" +tmp_obj="$__cdist_tmp_dir/$__cdist_name_object" +tmp_code="$__cdist_tmp_dir/$__cdist_name_code" + +# See cdist-stages(7) +cdist-explorer-run "$__cdist_target_host" "$tmp_exp" +cdist-manifest-init "$__cdist_target_host" "$tmp_obj" +cdist-manifest-recursive-run "$__cdist_target_host" "$tmp_obj" + +# Create new cache - put into seperate script? +echo rm -rf "$(__cdist_cache_host)" +mkdir -p "$(__cdist_cache_host)" +mv "$tmp_exp" "$tmp_obj" "$(__cdist_cache_host)" + +# FIXME: continue below here +exit 1 + +cdist-code-gen "$(__cdist_cache_host)" > "$tmp_code" +cdist-target-exec "$__cdist_target_host" "$tmp_code" + +# Also save last code fragment +mv "$tmp_code" "$(__cdist_cache_host)" diff --git a/bin/cdist-manifest-recursive-run b/bin/cdist-manifest-recursive-run index 21a2c08e..5229f439 100755 --- a/bin/cdist-manifest-recursive-run +++ b/bin/cdist-manifest-recursive-run @@ -68,6 +68,8 @@ while [ "$__cdist_object_created_new" = 1 ]; do if [ -x "${manifest}" ]; then echo "Running manifest of type ${type} ..." + + # FIXME: use subdir in tmpdir? cdist-manifest-run "$__cdist_target_host" "${manifest}" "${__cdist_tmp_dir}" echo "Trying to merge... " @@ -83,10 +85,10 @@ while [ "$__cdist_object_created_new" = 1 ]; do if [ -e "$__cdist_object_dir/${newobject}" ]; then __cdist_exit_err "${newobject} already exists, merge failed." else - # Fine, merge back! + # Fine, merge back! FIXME: touch correct here? + touch "${object}/$__cdist_object_finished" pax -r -w "$newobject" "$__cdist_object_dir" fi - done < "$__cdist_tmp_file" # Always rerun the whole loop if we ran @@ -107,8 +109,6 @@ while [ "$__cdist_object_created_new" = 1 ]; do # # iterate over all new objects and copy each back? - # FIXME: cleanup tmp directory, if necessary! - else # Be nice, warn user if manifests exists, but is not executable if [ -f "${manifest}" ]; then @@ -116,7 +116,6 @@ while [ "$__cdist_object_created_new" = 1 ]; do fi fi - touch "${object}/$__cdist_object_finished" # At least one more run needed __cdist_object_created_new=1 diff --git a/bin/cdist-template.obsolete b/bin/cdist-template.obsolete deleted file mode 100755 index 5e72e29c..00000000 --- a/bin/cdist-template.obsolete +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/sh -# -# 2010 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 . -# -# -# Show template -# - -# fail, if variable is not set - IMPORTANT! -set -u - -. "$1" From 6c72cd0d5ff5d7a0f16b729cd8261475907f3929 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Feb 2011 00:28:34 +0100 Subject: [PATCH 0184/6109] two stages left until production mode Signed-off-by: Nico Schottelius --- TODO-1.0 | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/TODO-1.0 b/TODO-1.0 index a9bf3bd7..03ee5354 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -12,21 +12,24 @@ x Parse configuration tree/objects recursively -> yes, of everything a type created itself! x may open door for getting information from manifest / other stuff -- Cleanly define paths for object creation, especially recursive calls +x Cleanly define paths for object creation, especially recursive calls + x doc/man/cdist-config-layout.text - generate code to be executed on client - check return codes - abort on first error? +- execute code on client + / Write at least one type (completly!) - doc 1.0: - cdist manpage (main manpage) - cleanup following man + their tree: - - cdist-language [IMPORTANT] - - cdist-design.text [IMPORTANT] - - cdist-push-pull - - cdist-quickstart + - cdist-language [CLEANUP AND REMOVE] + - cdist-design.text [CLEANUP AND REMOVE] + - cdist-push-pull [WRITE] + - cdist-quickstart [WRITE] - how to write a minimal host manifest - cdist-types [IMPORTANT] - only do necessary work [TYPE IMPLEMENTATION HINTS] @@ -58,4 +61,3 @@ x Parse configuration tree/objects recursively - package - Cleanup directories, cleanly document, what's possible - From 3e89e05b303e46ca960d8b0c1fc6b46b554e199f Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 8 Feb 2011 11:01:47 +0100 Subject: [PATCH 0185/6109] add support for gentoo to explorer os Signed-off-by: Steven Armstrong --- conf/explorers/os | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/explorers/os b/conf/explorers/os index 3bd3f2ef..41d70545 100755 --- a/conf/explorers/os +++ b/conf/explorers/os @@ -32,6 +32,8 @@ fi [ -f /etc/debian_version ] && echo debian +[ -f /etc/gentoo-release ] && echo gentoo + [ -f /etc/redhat-release ] && echo redhat # ensure correct exit, otherwise other explorer won't get started From e1f90293b985f8657a0334b23438daac7dd93173 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 8 Feb 2011 11:02:46 +0100 Subject: [PATCH 0186/6109] add support for gentoo to explorer pgk_system Signed-off-by: Steven Armstrong --- conf/explorers/pkg_system | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/explorers/pkg_system b/conf/explorers/pkg_system index d9da3f1e..585f107d 100755 --- a/conf/explorers/pkg_system +++ b/conf/explorers/pkg_system @@ -22,6 +22,7 @@ case "$("${__cdist_remote_explorer_dir}/os")" in archlinux) echo pacman ;; debian|ubuntu) echo apt ;; + gentoo) echo emerge ;; esac exit 0 From f3584aa727ecb6c395c204ef1204695a143c5457 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 8 Feb 2011 11:01:47 +0100 Subject: [PATCH 0187/6109] add support for gentoo to explorer os Signed-off-by: Steven Armstrong --- conf/explorers/os | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/explorers/os b/conf/explorers/os index 3bd3f2ef..41d70545 100755 --- a/conf/explorers/os +++ b/conf/explorers/os @@ -32,6 +32,8 @@ fi [ -f /etc/debian_version ] && echo debian +[ -f /etc/gentoo-release ] && echo gentoo + [ -f /etc/redhat-release ] && echo redhat # ensure correct exit, otherwise other explorer won't get started From 4f1cc56bcda28ed01ed4ba7aaff8b8b32ab4b828 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 8 Feb 2011 11:02:46 +0100 Subject: [PATCH 0188/6109] add support for gentoo to explorer pgk_system Signed-off-by: Steven Armstrong --- conf/explorers/pkg_system | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/explorers/pkg_system b/conf/explorers/pkg_system index d9da3f1e..585f107d 100755 --- a/conf/explorers/pkg_system +++ b/conf/explorers/pkg_system @@ -22,6 +22,7 @@ case "$("${__cdist_remote_explorer_dir}/os")" in archlinux) echo pacman ;; debian|ubuntu) echo apt ;; + gentoo) echo emerge ;; esac exit 0 From d8a69a75a835afe98d90d84f804aa6452522271f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 14 Feb 2011 10:27:30 +0100 Subject: [PATCH 0189/6109] third -> fourth stage Signed-off-by: Nico Schottelius --- doc/man/cdist-stages.text | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/man/cdist-stages.text b/doc/man/cdist-stages.text index fc43d7da..4a77f7b1 100644 --- a/doc/man/cdist-stages.text +++ b/doc/man/cdist-stages.text @@ -50,7 +50,7 @@ cdist passes through different stages: objects try to create the same object, which indicates a broken configuration. -- Third stage: Code generation [TODO] +- Fourth stage: Code generation [TODO] The "gencode" binary of the types for every existing object is called to generate code that will be executed on the target host. @@ -62,7 +62,7 @@ cdist passes through different stages: A description of what the generated code may/must/should do can be found in cdist-types-gencode(7). -- Fourth stage: [TODO] +- Fifth stage: [TODO] The resulting code is transferred to the target host and executed, the run of cdist-deploy-to(1) ends. From 11f80a63873842f51251b3b1f546325b06c62f11 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 14 Feb 2011 11:16:50 +0100 Subject: [PATCH 0190/6109] Make hackers readme executable Signed-off-by: Nico Schottelius --- HACKERS_README | 6 ++++++ 1 file changed, 6 insertions(+) mode change 100644 => 100755 HACKERS_README diff --git a/HACKERS_README b/HACKERS_README old mode 100644 new mode 100755 index 0015031c..e339499a --- a/HACKERS_README +++ b/HACKERS_README @@ -1,3 +1,5 @@ +cat << eof + Hey hackers, cdist has not been published, you're accessing a early in developent @@ -11,6 +13,10 @@ Do not believe anything written in cdist, besides what's written in this file What you can do so far: (executed from top level directory) +The following code will get executed if you run this README: + +eof + # prepare use: export PATH="$PATH:$(pwd -P)/bin" object_tmp=/tmp/localhost/objects From a7fc72148809cbe8f14bac9be0b0a64de995b982 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 14 Feb 2011 11:21:49 +0100 Subject: [PATCH 0191/6109] fix typo: /object/newobject/ Signed-off-by: Steven Armstrong --- bin/cdist-manifest-recursive-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-manifest-recursive-run b/bin/cdist-manifest-recursive-run index 5229f439..99d86aec 100755 --- a/bin/cdist-manifest-recursive-run +++ b/bin/cdist-manifest-recursive-run @@ -86,7 +86,7 @@ while [ "$__cdist_object_created_new" = 1 ]; do __cdist_exit_err "${newobject} already exists, merge failed." else # Fine, merge back! FIXME: touch correct here? - touch "${object}/$__cdist_object_finished" + touch "${newobject}/$__cdist_object_finished" pax -r -w "$newobject" "$__cdist_object_dir" fi done < "$__cdist_tmp_file" From fafb427928c37840724b2ffc4c54d7c988dd7dab Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 14 Feb 2011 11:28:14 +0100 Subject: [PATCH 0192/6109] implement cdist-code-gen (in theory) Signed-off-by: Nico Schottelius --- bin/cdist-code-gen | 43 +++++++++++++++++++++++++++++++++++++++++++ bin/cdist-config | 1 + 2 files changed, 44 insertions(+) create mode 100755 bin/cdist-code-gen diff --git a/bin/cdist-code-gen b/bin/cdist-code-gen new file mode 100755 index 00000000..33c67b08 --- /dev/null +++ b/bin/cdist-code-gen @@ -0,0 +1,43 @@ +#!/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 . +# +# +# Generate code from one object (object must be relative path!) +# + +. cdist-config + +[ $# -eq 2 ] || __cdist_usage "" "" + +set -ue + +export __cdist_target_host="$1"; shift +export __cdist_object="$1"; shift + +# Get type from object path +export __cdist_type=${__cdist_object%%/*} + +# Full path to where the executable should exist, if the type has one +export __cdist_gencode="${__cdist_type_dir}/$__cdist_type/$__cdist_name_gencode" + + +# Call gencode of type with __cdist_object +if [ -x "$__cdist_gencode" ]; then + "$__cdist_gencode" +fi diff --git a/bin/cdist-config b/bin/cdist-config index e2846021..9aafe1d9 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -30,6 +30,7 @@ : ${__cdist_name_cache:=cache} : ${__cdist_name_code:=code} : ${__cdist_name_explorer:=explorers} +: ${__cdist_name_gencode:=gencode} : ${__cdist_name_host:=hosts} : ${__cdist_name_init:=init} : ${__cdist_name_manifest:=manifests} From f4a5f8a49a414a7233b02c7de57ed99a3d2314e4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 14 Feb 2011 12:44:43 +0100 Subject: [PATCH 0193/6109] execution of types needs testing, recursive, thus TODO Signed-off-by: Nico Schottelius --- doc/man/cdist-stages.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/cdist-stages.text b/doc/man/cdist-stages.text index 4a77f7b1..bf7ac1ec 100644 --- a/doc/man/cdist-stages.text +++ b/doc/man/cdist-stages.text @@ -34,7 +34,7 @@ cdist passes through different stages: You can trigger the first stage part using cdist-manifest-init(1). -- Third stage: Execution of types +- Third stage: Execution of types [TODO] Every object is checked whether its type has an init script (see cdist-types(7)). If the type of the object has an init script, it is run. This init script may From 42de01e782f923a1d483ab9c9acb13e1d3061b3f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 14 Feb 2011 13:07:24 +0100 Subject: [PATCH 0194/6109] more todo past 1.0 Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.0 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index 4169c7f9..32d99614 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -9,3 +9,5 @@ Types: Core: - Support singletons (see types/issue for a good reason) + - extend cdist_tree_wrapper to look for optional/mandority parameters for types + - gives "good" database, which contains only valid objects From 9a9ae7c1140637e011d36329b8965fed4e77aad0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 14 Feb 2011 13:25:56 +0100 Subject: [PATCH 0195/6109] add stuff to the readme that should work today (or vanishes from readme today) Signed-off-by: Nico Schottelius --- HACKERS_README | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index e339499a..5a0aa8d7 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -23,17 +23,26 @@ object_tmp=/tmp/localhost/objects explorer_tmp=/tmp/localhost/explorers # Test first level manifest execution -__cdist_config=$(pwd -P)/conf cdist-manifest-init localhost $object_tmp +__cdist_config=$(pwd -P)/conf cdist-manifest-init localhost "$object_tmp" # See what it generated find $object_tmp # Run explorer on a "remote" host -__cdist_config=$(pwd -P)/conf cdist-explorer-run localhost $explorer_tmp +__cdist_config=$(pwd -P)/conf cdist-explorer-run localhost "$explorer_tmp" # Display result find $explorer_tmp # Soon working: -__cdist_config=$(pwd -P)/conf cdist-manifest-recursive-run localhost $object_tmp +__cdist_config=$(pwd -P)/conf cdist-manifest-recursive-run localhost "$object_tmp" +################################################################################ +# Further in the future +# + +# Generate code for one object +__cdist_config=$(pwd -P)/conf cdist-code-gen localhost "$object_tmp" __file/etc-issue + +# Generate code for all objects in object dir +__cdist_config=$(pwd -P)/conf cdist-code-gen-all localhost "$object_tmp" From b8f8b4e2c1bcfbf008b21593961f6fb25416e247 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 16 Feb 2011 16:04:29 +0100 Subject: [PATCH 0196/6109] +todos Signed-off-by: Steven Armstrong --- TODO-1.0 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TODO-1.0 b/TODO-1.0 index 03ee5354..cb0743e9 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -61,3 +61,7 @@ x Cleanly define paths for object creation, especially recursive calls - package - Cleanup directories, cleanly document, what's possible + +- rename $__object_dir to $__object_base_dir +- cd $__object_dir, before running manifest + && document it in doc/man/cdist-types.text From f7bfafb6202661b7a9f70115af95ca45c3272dea Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 16 Feb 2011 16:08:04 +0100 Subject: [PATCH 0197/6109] +todos Signed-off-by: Steven Armstrong --- TODO-1.0 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TODO-1.0 b/TODO-1.0 index cb0743e9..cfee0f28 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -65,3 +65,5 @@ x Cleanly define paths for object creation, especially recursive calls - rename $__object_dir to $__object_base_dir - cd $__object_dir, before running manifest && document it in doc/man/cdist-types.text +- document that /manifest|/init is executed for every object/instance + From 18d7945b2f5010c46c6d7607d7f5da8e3a37ab7c Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 16 Feb 2011 16:10:09 +0100 Subject: [PATCH 0198/6109] +todos Signed-off-by: Steven Armstrong --- TODO-1.0 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TODO-1.0 b/TODO-1.0 index cfee0f28..11a07ef9 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -65,5 +65,6 @@ x Cleanly define paths for object creation, especially recursive calls - rename $__object_dir to $__object_base_dir - cd $__object_dir, before running manifest && document it in doc/man/cdist-types.text -- document that /manifest|/init is executed for every object/instance +- use $type/manifest instead of $type/init +- document that $type/manifest is executed for every object/instance From f537494e646c0b2e79342f551ee5e923bfc58468 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 16 Feb 2011 16:24:33 +0100 Subject: [PATCH 0199/6109] +todos Signed-off-by: Steven Armstrong --- TODO-1.0 | 1 + 1 file changed, 1 insertion(+) diff --git a/TODO-1.0 b/TODO-1.0 index 11a07ef9..7c6a2d0e 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -67,4 +67,5 @@ x Cleanly define paths for object creation, especially recursive calls && document it in doc/man/cdist-types.text - use $type/manifest instead of $type/init - document that $type/manifest is executed for every object/instance +- find $object_id in recursive runner From 709271fd2eb616ff221b7ba5b8d34b52e759ec96 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 19:42:10 +0100 Subject: [PATCH 0200/6109] cleanup type __file, it can use cat from current dir directly now Signed-off-by: Nico Schottelius --- conf/manifests/init | 2 -- conf/types/__file/gencode | 20 ++++++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/conf/manifests/init b/conf/manifests/init index 9e8ed4bb..2923ba88 100755 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -2,8 +2,6 @@ # This is a sample manifest, but used in real world # -set -x - # All ikqs get a sample file case "$__cdist_target_host" in ikq*|localhost) diff --git a/conf/types/__file/gencode b/conf/types/__file/gencode index caa6bb14..904a871f 100755 --- a/conf/types/__file/gencode +++ b/conf/types/__file/gencode @@ -18,25 +18,33 @@ # along with cdist. If not, see . # # +# __file is a very basic type and should be able to be used as an +# example for typewrites later +# +. cdist-config -case "$__arg_type" in +type="$(cat type)" +mode="$(cat mode)" +path="$(cat path)" + +case "$type" in directory) - echo mkdir \"$__arg_path\" + echo mkdir \"$path\" ;; file) - echo touch \"$__arg_path\" + echo touch \"$path\" ;; *) - echo "Unsupported type: $__arg_type" >&2 + echo "Unsupported type: \"$type\"" >&2 exit 1 ;; esac -if [ "$__arg_mode" ]; then - echo chmod \"$__arg_mode\" \"$__arg_path\" +if [ "$mode" ]; then + echo chmod \"$mode\" \"$path\" fi From e4fbb1a5d8a3bed0af3f4289a21098bf90568f1e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 19:43:11 +0100 Subject: [PATCH 0201/6109] finish cdist-code-gen Signed-off-by: Nico Schottelius --- bin/cdist-code-gen | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/bin/cdist-code-gen b/bin/cdist-code-gen index 33c67b08..07f2604d 100755 --- a/bin/cdist-code-gen +++ b/bin/cdist-code-gen @@ -23,21 +23,36 @@ . cdist-config -[ $# -eq 2 ] || __cdist_usage "" "" +[ $# -eq 3 ] || __cdist_usage "" "" "" set -ue export __cdist_target_host="$1"; shift +export __cdist_object_base_dir="$1"; shift export __cdist_object="$1"; shift +# Full path to object +export __cdist_object_dir="${__cdist_object_base_dir}/${__cdist_object}" + # Get type from object path -export __cdist_type=${__cdist_object%%/*} +export __cdist_type="${__cdist_object%%/*}" -# Full path to where the executable should exist, if the type has one -export __cdist_gencode="${__cdist_type_dir}/$__cdist_type/$__cdist_name_gencode" +# Get id from object path (i.e no type prefix) +export __cdist_object_id="${__cdist_object#*/}" +# Full path to where the executable of the type should exist, if the type has one +gencode="$(__cdist_type_gencode "$__cdist_type")" + +cd "$__cdist_object_dir" # Call gencode of type with __cdist_object -if [ -x "$__cdist_gencode" ]; then - "$__cdist_gencode" +if [ -x "$gencode" ]; then + cat << eof +# +# Code imported from $gencode +# + +eof + + "$gencode" fi From ce3b83bfc105cd056ff3bdd74cdad02117a61b7d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 19:44:04 +0100 Subject: [PATCH 0202/6109] update cdist-config with more helper functions Signed-off-by: Nico Schottelius --- bin/cdist-config | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bin/cdist-config b/bin/cdist-config index 9aafe1d9..9610e063 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -118,6 +118,21 @@ __cdist_type_mydir() echo "${__cdist_type_dir}/${__cdist_type_current}" } +__cdist_type_gencode() +{ + local type="$1" + + echo "${__cdist_type_dir}/${type}/$__cdist_name_gencode" +} + +__cdist_object_arg() +{ + local arg="$1"; shift + local object="$1"; shift + + cat "${__cdist_object_base_dir}/${object}/${arg}" +} + __cdist_tmp_removal() { rm -rf "${__cdist_tmp_dir}" From 31883b1e3c825bb36b54017123737ca7737ac591 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 19:44:13 +0100 Subject: [PATCH 0203/6109] cleanup readme Signed-off-by: Nico Schottelius --- HACKERS_README | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index 5a0aa8d7..da0edc61 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -34,13 +34,13 @@ __cdist_config=$(pwd -P)/conf cdist-explorer-run localhost "$explorer_tmp" # Display result find $explorer_tmp -# Soon working: -__cdist_config=$(pwd -P)/conf cdist-manifest-recursive-run localhost "$object_tmp" - ################################################################################ -# Further in the future +# Soon working # +# Generate all objects, including from types that generate objects as well +__cdist_config=$(pwd -P)/conf cdist-manifest-recursive-run localhost "$object_tmp" + # Generate code for one object __cdist_config=$(pwd -P)/conf cdist-code-gen localhost "$object_tmp" __file/etc-issue From 8c27d00c2339321af9889134cb7169a462f1f77b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 19:45:33 +0100 Subject: [PATCH 0204/6109] +set -x in README (fancy, uuuh) Signed-off-by: Nico Schottelius --- HACKERS_README | 3 +++ 1 file changed, 3 insertions(+) diff --git a/HACKERS_README b/HACKERS_README index da0edc61..d7e3217d 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -17,6 +17,9 @@ The following code will get executed if you run this README: eof +# Tell the user what we do, so this script makes sense during execution +set -x + # prepare use: export PATH="$PATH:$(pwd -P)/bin" object_tmp=/tmp/localhost/objects From 84497e176e5b6312a6eb6a18a0e6436f36ec29b6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 19:59:43 +0100 Subject: [PATCH 0205/6109] cleanup todo for 1.0 Signed-off-by: Nico Schottelius --- TODO-1.0 | 121 +++++++++++++++++++++++++++---------------------------- 1 file changed, 60 insertions(+), 61 deletions(-) diff --git a/TODO-1.0 b/TODO-1.0 index 7c6a2d0e..df0699cb 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -1,71 +1,70 @@ This document defines how to continue work on cdist: -x Define how to get information from clients - x Create shell script that creates code to run on client (cdist-build-explorer) -x Create configuration tree from manifest - x write binaries, which create the tree when called from manifest (cdist_tree_wrapper) -x Define configuration paths (doc/internal/config-layout) -x Redo explorers (see manpage) +x general stuff + x Define configuration paths (doc/internal/config-layout) -x Parse configuration tree/objects recursively - x can/may types modify tree? - -> yes, of everything a type created itself! - x may open door for getting information from manifest / other stuff +x get information from target (stage 1) + x Define how to get information from targets + x Create shell script that creates code to run on client (cdist-build-explorer) + x Redo explorers (see manpage) +x run initial manifest (stage 2) + x Create configuration tree from manifest + x write binaries, which create the tree when called from manifest (cdist_tree_wrapper) -x Cleanly define paths for object creation, especially recursive calls - x doc/man/cdist-config-layout.text +- be able to run manifest of types (stage 3) + x Parse configuration tree/objects recursively + x can/may types modify tree? + -> yes, of everything a type created itself! + x may open door for getting information from manifest / other stuff + x Cleanly define paths for object creation, especially recursive calls + x doc/man/cdist-config-layout.text + x cd $__object_dir, before running manifest + x rename $__object_dir to $__object_base_dir + - document "cd $__object_dir, before running manifest" in doc/man/cdist-types.text + - use $type/manifest instead of $type/init + - document that $type/manifest is executed for every object/instance + - find $object_id in recursive runner (before merge) -- generate code to be executed on client +- generate code to be executed on clients (stage 4) + x for one type (cdist-code-gen) - check return codes - abort on first error? -- execute code on client +- execute code on client (stage 5) -/ Write at least one type (completly!) - -- doc 1.0: - - cdist manpage (main manpage) - - cleanup following man + their tree: - - cdist-language [CLEANUP AND REMOVE] - - cdist-design.text [CLEANUP AND REMOVE] - - cdist-push-pull [WRITE] - - cdist-quickstart [WRITE] - - how to write a minimal host manifest - - cdist-types [IMPORTANT] - - only do necessary work [TYPE IMPLEMENTATION HINTS] - - install packages only if not existent - - copy file only if different - - cdist [IMPORTANT] - - cdist-explorers - - add terminology - - define steps within configuration apply - - detect impossible/unsafe things: - - creating a file twice - - installing and removing a package - - and report location of occurence - - parse afterwards? - - multi master setups - - templating - - how to define templates - - variable substitution from shell may be problematic - - SHELL SCRIPTS! (executables? do not support?) - - stdout == output of template == what will be used - - cleanup website - - remove HACKERS_README - - create doc/dev/HACKERS_README -- Add install target to Makefile +- Other stuff pre 1.0: + - Write some basic types + - file (with directory) + - package + - doc cleanup for 1.0: + - cdist manpage (main manpage) + - cleanup following man + their tree: + - cdist-language [CLEANUP AND REMOVE] + - cdist-design.text [CLEANUP AND REMOVE] + - cdist-push-pull [WRITE] + - cdist-quickstart [WRITE] + - how to write a minimal host manifest + - cdist-types [IMPORTANT] + - only do necessary work [TYPE IMPLEMENTATION HINTS] + - install packages only if not existent + - copy file only if different + - cdist [IMPORTANT] + - cdist-explorers + - add terminology + - define steps within configuration apply + - detect impossible/unsafe things: + - creating a file twice + - installing and removing a package + - and report location of occurence + - parse afterwards? + - multi master setups + - templating + - how to define templates + - variable substitution from shell may be problematic + - SHELL SCRIPTS! (executables? do not support?) + - stdout == output of template == what will be used + - cleanup website + - remove HACKERS_README + - create doc/dev/HACKERS_README + - Add install target to Makefile - create cdist-config-init to create basic tree - -- types needed - - file (with directory) - - package - -- Cleanup directories, cleanly document, what's possible - -- rename $__object_dir to $__object_base_dir -- cd $__object_dir, before running manifest - && document it in doc/man/cdist-types.text -- use $type/manifest instead of $type/init -- document that $type/manifest is executed for every object/instance -- find $object_id in recursive runner - From 04dd1672b14db483eb98ec15e078ee21e99c7f8f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 20:03:09 +0100 Subject: [PATCH 0206/6109] rename cdist-code-gen -> cdist-object-codegen Signed-off-by: Nico Schottelius --- HACKERS_README | 2 +- bin/{cdist-code-gen => cdist-object-codegen} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename bin/{cdist-code-gen => cdist-object-codegen} (100%) diff --git a/HACKERS_README b/HACKERS_README index d7e3217d..89e4d8c2 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -45,7 +45,7 @@ find $explorer_tmp __cdist_config=$(pwd -P)/conf cdist-manifest-recursive-run localhost "$object_tmp" # Generate code for one object -__cdist_config=$(pwd -P)/conf cdist-code-gen localhost "$object_tmp" __file/etc-issue +__cdist_config=$(pwd -P)/conf cdist-object-codegen localhost "$object_tmp" __file/etc-issue # Generate code for all objects in object dir __cdist_config=$(pwd -P)/conf cdist-code-gen-all localhost "$object_tmp" diff --git a/bin/cdist-code-gen b/bin/cdist-object-codegen similarity index 100% rename from bin/cdist-code-gen rename to bin/cdist-object-codegen From 1609e5287371b92fe474953985cd4ec5560e1cc1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 20:04:04 +0100 Subject: [PATCH 0207/6109] add template for code generation for all objects Signed-off-by: Nico Schottelius --- bin/cdist-object-codegen-all | 127 +++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100755 bin/cdist-object-codegen-all diff --git a/bin/cdist-object-codegen-all b/bin/cdist-object-codegen-all new file mode 100755 index 00000000..99d86aec --- /dev/null +++ b/bin/cdist-object-codegen-all @@ -0,0 +1,127 @@ +#!/bin/sh +# +# 2010 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 . +# +# +# For each created object +# run the manifest of the type (with object id), +# try to merge back newly created objects (otherwise fail), +# mark the object as being run +# and iterate until all objects are marked being run. +# +# +# + +. cdist-config + +if [ $# -ne 2 ]; then + __cdist_usage " " +fi + +set -eu + +__cdist_target_host="$1"; shift +__cdist_object_dir="$1"; shift + +# change to directory containing objects +cd "$__cdist_object_dir" + +# Loop until we do not create new objects anymore +# which is equal to all objects have been run +__cdist_object_created_new=1 + + +while [ "$__cdist_object_created_new" = 1 ]; do + # assume we're done after this run + __cdist_object_created_new=0 + + # find all objects (every object has the source recorded) + find . -name "$__cdist_object_source" | \ + sed -e "s;$__cdist_object_source\$;;" \ + -e 's;^./;;' \ + > "$__cdist_tmp_file" + + # FIXME: DEBUG + cat "$__cdist_tmp_file" + + while read object; do + if [ ! -f "${object}/$__cdist_object_finished" ]; then + echo "Working on object ${object} ..." + + type=${object%%/*} + manifest="$__cdist_type_dir/${type}/${__cdist_name_init}" + + if [ -x "${manifest}" ]; then + echo "Running manifest of type ${type} ..." + + # FIXME: use subdir in tmpdir? + cdist-manifest-run "$__cdist_target_host" "${manifest}" "${__cdist_tmp_dir}" + + echo "Trying to merge... " + + # list of new objects + cd "${__cdist_tmp_dir}" + find . -name "$__cdist_object_source" | \ + sed -e "s;$__cdist_object_source\$;;" \ + -e 's;^./;;' \ + > "$__cdist_tmp_file" + + while read newobject; do + if [ -e "$__cdist_object_dir/${newobject}" ]; then + __cdist_exit_err "${newobject} already exists, merge failed." + else + # Fine, merge back! FIXME: touch correct here? + touch "${newobject}/$__cdist_object_finished" + pax -r -w "$newobject" "$__cdist_object_dir" + fi + done < "$__cdist_tmp_file" + + # Always rerun the whole loop if we ran + # a manifest of an object + break + + + # FIXME: continue here + # tar, cp, pax, mv? + # mv/cp -n look good - posix? + + # pax: + # pax -r -w -k could work, but -k does not raise an error if files + # are already existing + + # - copy if not existing + # fail (abort whole recursive run) if existing + # + # iterate over all new objects and copy each back? + + else + # Be nice, warn user if manifests exists, but is not executable + if [ -f "${manifest}" ]; then + echo "Warning ${manifest} is not executable" + fi + fi + + + # At least one more run needed + __cdist_object_created_new=1 + fi + done < "$__cdist_tmp_file" + +done + +exit 0 From 64d71229f832d71fec795ffb0ac756e7768b36d5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 20:12:29 +0100 Subject: [PATCH 0208/6109] BREAK __cdist_object_source (due to rename to __cdist_name_object_source) Signed-off-by: Nico Schottelius --- bin/cdist-config | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 9610e063..ec2a22f1 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -36,6 +36,11 @@ : ${__cdist_name_manifest:=manifests} : ${__cdist_name_object:=objects} : ${__cdist_name_type:=types} +: ${__cdist_name_exec:=exec} + +# File that contains source of a specific object creation +: ${__cdist_name_object_source=.source} + # Base : ${__cdist_config:=/etc/cdist} @@ -80,9 +85,6 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" # Used for IDs __cdist_sane_regexp='[A-Za-z0-9]*[-A-Za-z0-9_]*' -# File that contains source of a specific object creation -__cdist_object_source=".source" - # Mark object finished __cdist_object_finished=".done" @@ -133,6 +135,22 @@ __cdist_object_arg() cat "${__cdist_object_base_dir}/${object}/${arg}" } +__cdist_object_list() +{ + local basedir="$1"; shift + + cd "${basedir}" + + find . -name "$__cdist_object_source" | \ + sed -e "s;$__cdist_object_source\$;;" \ + -e 's;^./;;' \ + > "$__cdist_tmp_file" + + + cat "${__cdist_object_base_dir}/${object}/${arg}" + +} + __cdist_tmp_removal() { rm -rf "${__cdist_tmp_dir}" From 3c3dad18429f194804fca820b86d9e8ac99c9424 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 20:14:40 +0100 Subject: [PATCH 0209/6109] rename __cdist_name_object_finished as well Signed-off-by: Nico Schottelius --- bin/cdist-config | 10 ++++++---- bin/cdist-manifest-recursive-run | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index ec2a22f1..4b85d042 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -36,10 +36,15 @@ : ${__cdist_name_manifest:=manifests} : ${__cdist_name_object:=objects} : ${__cdist_name_type:=types} + +# Name of the executable generated : ${__cdist_name_exec:=exec} # File that contains source of a specific object creation -: ${__cdist_name_object_source=.source} +: ${__cdist_name_object_source:=.source} + +# Marks an object finished +: ${__cdist_name_object_finished:=.done} # Base @@ -85,9 +90,6 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" # Used for IDs __cdist_sane_regexp='[A-Za-z0-9]*[-A-Za-z0-9_]*' -# Mark object finished -__cdist_object_finished=".done" - ################################################################################ # Function list diff --git a/bin/cdist-manifest-recursive-run b/bin/cdist-manifest-recursive-run index 99d86aec..8bd95063 100755 --- a/bin/cdist-manifest-recursive-run +++ b/bin/cdist-manifest-recursive-run @@ -60,7 +60,7 @@ while [ "$__cdist_object_created_new" = 1 ]; do cat "$__cdist_tmp_file" while read object; do - if [ ! -f "${object}/$__cdist_object_finished" ]; then + if [ ! -f "${object}/$___cdist_name_object_finished" ]; then echo "Working on object ${object} ..." type=${object%%/*} @@ -86,7 +86,7 @@ while [ "$__cdist_object_created_new" = 1 ]; do __cdist_exit_err "${newobject} already exists, merge failed." else # Fine, merge back! FIXME: touch correct here? - touch "${newobject}/$__cdist_object_finished" + touch "${newobject}/$___cdist_name_object_finished" pax -r -w "$newobject" "$__cdist_object_dir" fi done < "$__cdist_tmp_file" From 6914071fe0b3eab737df4bf9004a7036066089f4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 20:16:19 +0100 Subject: [PATCH 0210/6109] finish __cdist_object_list Signed-off-by: Nico Schottelius --- bin/cdist-config | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 4b85d042..8607c830 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -89,8 +89,6 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" # Used for IDs __cdist_sane_regexp='[A-Za-z0-9]*[-A-Za-z0-9_]*' - - ################################################################################ # Function list # @@ -143,14 +141,9 @@ __cdist_object_list() cd "${basedir}" - find . -name "$__cdist_object_source" | \ - sed -e "s;$__cdist_object_source\$;;" \ - -e 's;^./;;' \ - > "$__cdist_tmp_file" - - - cat "${__cdist_object_base_dir}/${object}/${arg}" - + find . -name "$__cdist_name_object_source" | \ + sed -e "s;$__cdist_name_object_source\$;;" \ + -e 's;^./;;' } __cdist_tmp_removal() From 80c745383a1c962cc504e1800aab8524c3cc063f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 20:24:58 +0100 Subject: [PATCH 0211/6109] finish cdist-object-codegen-all Signed-off-by: Nico Schottelius --- HACKERS_README | 17 +++--- bin/cdist-config | 5 +- bin/cdist-object-codegen-all | 109 ++++++----------------------------- 3 files changed, 29 insertions(+), 102 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index 89e4d8c2..6caba8b6 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -24,18 +24,25 @@ set -x export PATH="$PATH:$(pwd -P)/bin" object_tmp=/tmp/localhost/objects explorer_tmp=/tmp/localhost/explorers +exec_tmp=/tmp/localhost/exec # Test first level manifest execution __cdist_config=$(pwd -P)/conf cdist-manifest-init localhost "$object_tmp" # See what it generated -find $object_tmp +find "$object_tmp" # Run explorer on a "remote" host __cdist_config=$(pwd -P)/conf cdist-explorer-run localhost "$explorer_tmp" # Display result -find $explorer_tmp +find "$explorer_tmp" + +# Generate code for all objects in object dir +__cdist_config=$(pwd -P)/conf cdist-object-codegen-all localhost "$object_tmp" "$exec_tmp" + +# Display result +find "$exec_tmp" ################################################################################ # Soon working @@ -43,9 +50,3 @@ find $explorer_tmp # Generate all objects, including from types that generate objects as well __cdist_config=$(pwd -P)/conf cdist-manifest-recursive-run localhost "$object_tmp" - -# Generate code for one object -__cdist_config=$(pwd -P)/conf cdist-object-codegen localhost "$object_tmp" __file/etc-issue - -# Generate code for all objects in object dir -__cdist_config=$(pwd -P)/conf cdist-code-gen-all localhost "$object_tmp" diff --git a/bin/cdist-config b/bin/cdist-config index 8607c830..b2ab1f8e 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -141,9 +141,8 @@ __cdist_object_list() cd "${basedir}" - find . -name "$__cdist_name_object_source" | \ - sed -e "s;$__cdist_name_object_source\$;;" \ - -e 's;^./;;' + find . -name "$__cdist_name_object_source" | \ + sed -e "s;$__cdist_name_object_source\$;;" -e 's;^./;;' } __cdist_tmp_removal() diff --git a/bin/cdist-object-codegen-all b/bin/cdist-object-codegen-all index 99d86aec..30919b25 100755 --- a/bin/cdist-object-codegen-all +++ b/bin/cdist-object-codegen-all @@ -18,110 +18,37 @@ # along with cdist. If not, see . # # -# For each created object -# run the manifest of the type (with object id), -# try to merge back newly created objects (otherwise fail), -# mark the object as being run -# and iterate until all objects are marked being run. -# -# +# For each created object create the code to be executed on the +# target. # . cdist-config -if [ $# -ne 2 ]; then - __cdist_usage " " +if [ $# -ne 3 ]; then + __cdist_usage " " fi set -eu __cdist_target_host="$1"; shift -__cdist_object_dir="$1"; shift +__cdist_object_base_dir="$1"; shift +__cdist_exec_dir="$1"; shift # change to directory containing objects -cd "$__cdist_object_dir" +# cd "$__cdist_object_base_dir" -# Loop until we do not create new objects anymore -# which is equal to all objects have been run -__cdist_object_created_new=1 +set -x +__cdist_object_list "$__cdist_object_base_dir" > "$__cdist_tmp_file" +while read object; do + outdir="$__cdist_exec_dir/${object}" + outfile="${outdir}/${__cdist_name_exec}" -while [ "$__cdist_object_created_new" = 1 ]; do - # assume we're done after this run - __cdist_object_created_new=0 + mkdir -p "${outdir}" - # find all objects (every object has the source recorded) - find . -name "$__cdist_object_source" | \ - sed -e "s;$__cdist_object_source\$;;" \ - -e 's;^./;;' \ - > "$__cdist_tmp_file" + cdist-object-codegen "$__cdist_target_host" \ + "$__cdist_object_base_dir" \ + "$object" > "${outfile}" - # FIXME: DEBUG - cat "$__cdist_tmp_file" - - while read object; do - if [ ! -f "${object}/$__cdist_object_finished" ]; then - echo "Working on object ${object} ..." - - type=${object%%/*} - manifest="$__cdist_type_dir/${type}/${__cdist_name_init}" - - if [ -x "${manifest}" ]; then - echo "Running manifest of type ${type} ..." - - # FIXME: use subdir in tmpdir? - cdist-manifest-run "$__cdist_target_host" "${manifest}" "${__cdist_tmp_dir}" - - echo "Trying to merge... " - - # list of new objects - cd "${__cdist_tmp_dir}" - find . -name "$__cdist_object_source" | \ - sed -e "s;$__cdist_object_source\$;;" \ - -e 's;^./;;' \ - > "$__cdist_tmp_file" - - while read newobject; do - if [ -e "$__cdist_object_dir/${newobject}" ]; then - __cdist_exit_err "${newobject} already exists, merge failed." - else - # Fine, merge back! FIXME: touch correct here? - touch "${newobject}/$__cdist_object_finished" - pax -r -w "$newobject" "$__cdist_object_dir" - fi - done < "$__cdist_tmp_file" - - # Always rerun the whole loop if we ran - # a manifest of an object - break - - - # FIXME: continue here - # tar, cp, pax, mv? - # mv/cp -n look good - posix? - - # pax: - # pax -r -w -k could work, but -k does not raise an error if files - # are already existing - - # - copy if not existing - # fail (abort whole recursive run) if existing - # - # iterate over all new objects and copy each back? - - else - # Be nice, warn user if manifests exists, but is not executable - if [ -f "${manifest}" ]; then - echo "Warning ${manifest} is not executable" - fi - fi - - - # At least one more run needed - __cdist_object_created_new=1 - fi - done < "$__cdist_tmp_file" - -done - -exit 0 + chmod u+x "${outfile}" +done < "$__cdist_tmp_file" From 8995c773012b965dadb190c15a976fe6605928ab Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 21:56:47 +0100 Subject: [PATCH 0212/6109] cleanup bin/cdist-object-codegen-all Signed-off-by: Nico Schottelius --- bin/cdist-object-codegen-all | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bin/cdist-object-codegen-all b/bin/cdist-object-codegen-all index 30919b25..2e7a5bab 100755 --- a/bin/cdist-object-codegen-all +++ b/bin/cdist-object-codegen-all @@ -34,10 +34,6 @@ __cdist_target_host="$1"; shift __cdist_object_base_dir="$1"; shift __cdist_exec_dir="$1"; shift -# change to directory containing objects -# cd "$__cdist_object_base_dir" - -set -x __cdist_object_list "$__cdist_object_base_dir" > "$__cdist_tmp_file" while read object; do From b639ed3b0ce9d3e709aa5fda31ffec4a9b378e7a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 21:57:33 +0100 Subject: [PATCH 0213/6109] less todo Signed-off-by: Nico Schottelius --- TODO-1.0 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/TODO-1.0 b/TODO-1.0 index df0699cb..1606c241 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -25,12 +25,13 @@ x run initial manifest (stage 2) - document that $type/manifest is executed for every object/instance - find $object_id in recursive runner (before merge) -- generate code to be executed on clients (stage 4) - x for one type (cdist-code-gen) - - check return codes - - abort on first error? +x generate code to be executed on clients (stage 4) + x for one object + x for all objects - execute code on client (stage 5) + - check return codes + - abort on first error? - Other stuff pre 1.0: - Write some basic types From c8242ef7da0dcf0cb18ed4d7e5f5fb92a1740b2f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 22:11:53 +0100 Subject: [PATCH 0214/6109] cleanup bin/cdist_tree_wrapper and introduce __cdist_object_source Signed-off-by: Nico Schottelius --- bin/cdist-config | 7 +++++++ bin/cdist_tree_wrapper | 14 +++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index b2ab1f8e..cf26bf90 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -145,6 +145,13 @@ __cdist_object_list() sed -e "s;$__cdist_name_object_source\$;;" -e 's;^./;;' } +__cdist_object_source() +{ + local object_dir="$1"; shift + + cat "${object_dir}/$__cdist_name_object_source" +} + __cdist_tmp_removal() { rm -rf "${__cdist_tmp_dir}" diff --git a/bin/cdist_tree_wrapper b/bin/cdist_tree_wrapper index dde151b5..1beda316 100755 --- a/bin/cdist_tree_wrapper +++ b/bin/cdist_tree_wrapper @@ -30,26 +30,26 @@ set -eu -echo "I am $__cdist_myname and have been called with $@" - export __cdist_object_id="$1"; shift -export __cdist_type_current="$__cdist_myname" +export __cdist_type="$__cdist_myname" echo "$__cdist_object_id" | grep -q "^${__cdist_sane_regexp}\$" || \ __cdist_usage "Insane object id, ${__cdist_object_id}." -__cdist_tid="${__cdist_type_current}/${__cdist_object_id}" -__cdist_ddir="$__cdist_output_dir/${__cdist_tid}" +__cdist_object="${__cdist_type}/${__cdist_object_id}" +__cdist_ddir="$__cdist_output_dir/${__cdist_object}" if [ -e "${__cdist_ddir}" ]; then source="$(__cdist_object_source "${__cdist_ddir}")" - __cdist_exit_err "${__cdist_tid} already exists (source: $source)" + __cdist_exit_err "${__cdist_object} already exists (source: $source)" fi mkdir -p "${__cdist_ddir}" +# echo "I am $__cdist_myname and have been called with $@" + # Record (correct ;-) source -echo "${__cdist_manifest}" > "${__cdist_ddir}/${__cdist_object_source}" +echo "${__cdist_manifest}" > "${__cdist_ddir}/${__cdist_name_object_source}" while [ $# -gt 0 ]; do opt="$1"; shift From 4354c68405c5e79f3a409fa90d033d83d72cc082 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 22:12:21 +0100 Subject: [PATCH 0215/6109] cleanup bin/cdist-manifest-recursive-run Signed-off-by: Nico Schottelius --- bin/cdist-manifest-recursive-run | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/bin/cdist-manifest-recursive-run b/bin/cdist-manifest-recursive-run index 8bd95063..59da5b00 100755 --- a/bin/cdist-manifest-recursive-run +++ b/bin/cdist-manifest-recursive-run @@ -30,16 +30,16 @@ . cdist-config if [ $# -ne 2 ]; then - __cdist_usage " " + __cdist_usage " " fi set -eu __cdist_target_host="$1"; shift -__cdist_object_dir="$1"; shift +__cdist_object_base_dir="$1"; shift # change to directory containing objects -cd "$__cdist_object_dir" +cd "$__cdist_object_base_dir" # Loop until we do not create new objects anymore # which is equal to all objects have been run @@ -51,16 +51,13 @@ while [ "$__cdist_object_created_new" = 1 ]; do __cdist_object_created_new=0 # find all objects (every object has the source recorded) - find . -name "$__cdist_object_source" | \ - sed -e "s;$__cdist_object_source\$;;" \ - -e 's;^./;;' \ - > "$__cdist_tmp_file" + __cdist_object_list . > "$__cdist_tmp_file" # FIXME: DEBUG cat "$__cdist_tmp_file" while read object; do - if [ ! -f "${object}/$___cdist_name_object_finished" ]; then + if [ ! -f "${object}/$__cdist_name_object_finished" ]; then echo "Working on object ${object} ..." type=${object%%/*} @@ -76,18 +73,15 @@ while [ "$__cdist_object_created_new" = 1 ]; do # list of new objects cd "${__cdist_tmp_dir}" - find . -name "$__cdist_object_source" | \ - sed -e "s;$__cdist_object_source\$;;" \ - -e 's;^./;;' \ - > "$__cdist_tmp_file" + __cdist_object_list . > "$__cdist_tmp_file" while read newobject; do - if [ -e "$__cdist_object_dir/${newobject}" ]; then + if [ -e "$__cdist_object_base_dir/${newobject}" ]; then __cdist_exit_err "${newobject} already exists, merge failed." else # Fine, merge back! FIXME: touch correct here? touch "${newobject}/$___cdist_name_object_finished" - pax -r -w "$newobject" "$__cdist_object_dir" + pax -r -w "$newobject" "$__cdist_object_base_dir" fi done < "$__cdist_tmp_file" From aae3c6827c438b997ffac437b0cd1ab9962f7cb5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 22:16:14 +0100 Subject: [PATCH 0216/6109] specify location of parameters Signed-off-by: Nico Schottelius --- .../{optional_parameters => parameters/optional}/mode | 0 .../{mandority_parameters => parameters/required}/path | 0 .../{mandority_parameters => parameters/required}/type | 0 doc/man/cdist-config-layout.text | 8 ++++++++ 4 files changed, 8 insertions(+) rename conf/types/__file/{optional_parameters => parameters/optional}/mode (100%) rename conf/types/__file/{mandority_parameters => parameters/required}/path (100%) rename conf/types/__file/{mandority_parameters => parameters/required}/type (100%) diff --git a/conf/types/__file/optional_parameters/mode b/conf/types/__file/parameters/optional/mode similarity index 100% rename from conf/types/__file/optional_parameters/mode rename to conf/types/__file/parameters/optional/mode diff --git a/conf/types/__file/mandority_parameters/path b/conf/types/__file/parameters/required/path similarity index 100% rename from conf/types/__file/mandority_parameters/path rename to conf/types/__file/parameters/required/path diff --git a/conf/types/__file/mandority_parameters/type b/conf/types/__file/parameters/required/type similarity index 100% rename from conf/types/__file/mandority_parameters/type rename to conf/types/__file/parameters/required/type diff --git a/doc/man/cdist-config-layout.text b/doc/man/cdist-config-layout.text index 03eb595d..fe0d0810 100644 --- a/doc/man/cdist-config-layout.text +++ b/doc/man/cdist-config-layout.text @@ -43,6 +43,14 @@ variables, see cdist-environment(7)). Used to generate code to be executed on the client. See cdist-types(7). +- types//parameters/required: + Parameters required by type. + See cdist-types(7). + +- types//parameters/required: + Parameters optionally accepted by type. + See cdist-types(7). + - cache/ The cache contains results from previous runs, which may also be used in types to gather information about other hosts From 15f784d848f36e18a803cf7ae78d85e43ef1cef1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 22:23:55 +0100 Subject: [PATCH 0217/6109] new style parameter list Signed-off-by: Nico Schottelius --- conf/types/__file/parameters/optional | 1 + conf/types/__file/parameters/optional/mode | 0 conf/types/__file/parameters/required | 2 ++ conf/types/__file/parameters/required/path | 0 conf/types/__file/parameters/required/type | 0 5 files changed, 3 insertions(+) create mode 100644 conf/types/__file/parameters/optional delete mode 100644 conf/types/__file/parameters/optional/mode create mode 100644 conf/types/__file/parameters/required delete mode 100644 conf/types/__file/parameters/required/path delete mode 100644 conf/types/__file/parameters/required/type diff --git a/conf/types/__file/parameters/optional b/conf/types/__file/parameters/optional new file mode 100644 index 00000000..17ab372f --- /dev/null +++ b/conf/types/__file/parameters/optional @@ -0,0 +1 @@ +mode diff --git a/conf/types/__file/parameters/optional/mode b/conf/types/__file/parameters/optional/mode deleted file mode 100644 index e69de29b..00000000 diff --git a/conf/types/__file/parameters/required b/conf/types/__file/parameters/required new file mode 100644 index 00000000..2eea64c9 --- /dev/null +++ b/conf/types/__file/parameters/required @@ -0,0 +1,2 @@ +path +type diff --git a/conf/types/__file/parameters/required/path b/conf/types/__file/parameters/required/path deleted file mode 100644 index e69de29b..00000000 diff --git a/conf/types/__file/parameters/required/type b/conf/types/__file/parameters/required/type deleted file mode 100644 index e69de29b..00000000 From a134d6c9e1fbc8aad907ed4f9b5ba4373f65acbc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 23:04:02 +0100 Subject: [PATCH 0218/6109] add function: __cdist_type_param_file Signed-off-by: Nico Schottelius --- bin/cdist-config | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bin/cdist-config b/bin/cdist-config index cf26bf90..8320879a 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -35,7 +35,11 @@ : ${__cdist_name_init:=init} : ${__cdist_name_manifest:=manifests} : ${__cdist_name_object:=objects} + : ${__cdist_name_type:=types} +: ${__cdist_name_type_params:=parameters} +: ${__cdist_name_type_params_required:=required} +: ${__cdist_name_type_params_optional:=optional} # Name of the executable generated : ${__cdist_name_exec:=exec} @@ -127,6 +131,14 @@ __cdist_type_gencode() echo "${__cdist_type_dir}/${type}/$__cdist_name_gencode" } +__cdist_type_param_file() +{ + local type="$1"; shift + local paramtype="$1"; shift + + echo "${__cdist_type_dir}/$type/$__cdist_name_type_params/$paramtype" +} + __cdist_object_arg() { local arg="$1"; shift From 8f4def18b586ec231c3f6d8593314b7d3a05c17e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 23:04:16 +0100 Subject: [PATCH 0219/6109] document new parames style Signed-off-by: Nico Schottelius --- doc/man/cdist-config-layout.text | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/man/cdist-config-layout.text b/doc/man/cdist-config-layout.text index fe0d0810..aec2694a 100644 --- a/doc/man/cdist-config-layout.text +++ b/doc/man/cdist-config-layout.text @@ -44,11 +44,11 @@ variables, see cdist-environment(7)). See cdist-types(7). - types//parameters/required: - Parameters required by type. + Parameters required by type, \n seperated list. See cdist-types(7). - types//parameters/required: - Parameters optionally accepted by type. + Parameters optionally accepted by type, \n seperated list. See cdist-types(7). - cache/ From a7505f10a4a7d462b2f6c64510786d5728c41222 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 23:04:33 +0100 Subject: [PATCH 0220/6109] add parameter checking to cdist_tree_wrapper Signed-off-by: Nico Schottelius --- bin/cdist_tree_wrapper | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/bin/cdist_tree_wrapper b/bin/cdist_tree_wrapper index 1beda316..238ef6b4 100755 --- a/bin/cdist_tree_wrapper +++ b/bin/cdist_tree_wrapper @@ -46,25 +46,50 @@ fi mkdir -p "${__cdist_ddir}" -# echo "I am $__cdist_myname and have been called with $@" +echo "I am $__cdist_myname and have been called with $@" # Record (correct ;-) source echo "${__cdist_manifest}" > "${__cdist_ddir}/${__cdist_name_object_source}" +# Record parameters to subdir +tempparams="${__cdist_tmp_dir}/params" +mkdir -p "$tempparams" + while [ $# -gt 0 ]; do opt="$1"; shift - echo "$opt" | grep -q "^--${__cdist_sane_regexp}\$" || __cdist_usage "Provide sane options" + echo "$opt" | grep -q "^--${__cdist_sane_regexp}\$" || \ + __cdist_usage "Provide sane options" opt_file="$(echo $opt | sed 's/^--//')" - # FIXME: check for options supported by type - or leave it to the type? - # I guess do it here, so we also check whether - [ $# -ge 1 ] || __cdist_usage "Missing value for $opt" value="$1"; shift - echo "${value}" > "${__cdist_ddir}/${opt_file}" - + echo "${value}" > "${tempparams}/${opt_file}" done + +# Ensure required parameters are given +while read required; do + if [ ! -f "${tempparams}/${required}" ]; then + __cdist_usage "Missing required parameter $required" + fi + + mv "${tempparams}/${required}" "${__cdist_ddir}" +done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_type_params_required")" + +# Allow optional parameters +while read optional; do + if [ -f "${tempparams}/${opt_file}" ]; then + mv "${tempparams}/${optional}" "${__cdist_ddir}" + fi +done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_type_params_optional")" + +# Error out on other paramaters +cd "${tempparams}" +other="$(ls)" + +if [ "$other" ]; then + __cdist_usage "Unsupported parameter: $other" +fi From 5ac606c563ca531df47bdd7f81e85136cbdbc946 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 23:07:09 +0100 Subject: [PATCH 0221/6109] adjust parameters of types Signed-off-by: Nico Schottelius --- conf/types/__file/parameters/required | 4 ++-- conf/types/__issue/parameters/optional | 0 conf/types/__issue/parameters/required | 0 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 conf/types/__issue/parameters/optional create mode 100644 conf/types/__issue/parameters/required diff --git a/conf/types/__file/parameters/required b/conf/types/__file/parameters/required index 2eea64c9..9239646e 100644 --- a/conf/types/__file/parameters/required +++ b/conf/types/__file/parameters/required @@ -1,2 +1,2 @@ -path -type +source +destination diff --git a/conf/types/__issue/parameters/optional b/conf/types/__issue/parameters/optional new file mode 100644 index 00000000..e69de29b diff --git a/conf/types/__issue/parameters/required b/conf/types/__issue/parameters/required new file mode 100644 index 00000000..e69de29b From 19bccc8fade5af3513bf2e2bc3ab68fdaebd2abe Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 23:08:33 +0100 Subject: [PATCH 0222/6109] new stuff working in hackers readme Signed-off-by: Nico Schottelius --- HACKERS_README | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index 6caba8b6..53f40081 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -32,6 +32,12 @@ __cdist_config=$(pwd -P)/conf cdist-manifest-init localhost "$object_tmp" # See what it generated find "$object_tmp" +# Generate all objects, including from types that generate objects as well +__cdist_config=$(pwd -P)/conf cdist-manifest-recursive-run localhost "$object_tmp" + +# See what it generated +find "$object_tmp" + # Run explorer on a "remote" host __cdist_config=$(pwd -P)/conf cdist-explorer-run localhost "$explorer_tmp" @@ -43,10 +49,3 @@ __cdist_config=$(pwd -P)/conf cdist-object-codegen-all localhost "$object_tmp" " # Display result find "$exec_tmp" - -################################################################################ -# Soon working -# - -# Generate all objects, including from types that generate objects as well -__cdist_config=$(pwd -P)/conf cdist-manifest-recursive-run localhost "$object_tmp" From d8ab79e1ab37c9b320432c222e6f5a625da4726a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 23:23:27 +0100 Subject: [PATCH 0223/6109] integrate another stage into cdist-deploy-to Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index ac22e26c..7b3617f2 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -1,6 +1,6 @@ #!/bin/sh # -# 2010 Nico Schottelius (nico-cdist at schottelius.org) +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -25,29 +25,31 @@ [ $# -eq 1 ] || __cdist_usage "" -set -e +set -eu __cdist_target_host="$1" tmp_exp="$__cdist_tmp_dir/$__cdist_name_explorer" tmp_obj="$__cdist_tmp_dir/$__cdist_name_object" -tmp_code="$__cdist_tmp_dir/$__cdist_name_code" +tmp_exec="$__cdist_tmp_dir/$__cdist_name_exec" # See cdist-stages(7) -cdist-explorer-run "$__cdist_target_host" "$tmp_exp" -cdist-manifest-init "$__cdist_target_host" "$tmp_obj" -cdist-manifest-recursive-run "$__cdist_target_host" "$tmp_obj" +cdist-explorer-run "$__cdist_target_host" "$tmp_exp" +cdist-manifest-init "$__cdist_target_host" "$tmp_obj" +cdist-manifest-recursive-run "$__cdist_target_host" "$tmp_obj" +cdist-object-codegen-all "$__cdist_target_host" "$tmp_obj" "$tmp_exec" -# Create new cache - put into seperate script? -echo rm -rf "$(__cdist_cache_host)" -mkdir -p "$(__cdist_cache_host)" -mv "$tmp_exp" "$tmp_obj" "$(__cdist_cache_host)" - -# FIXME: continue below here exit 1 -cdist-code-gen "$(__cdist_cache_host)" > "$tmp_code" cdist-target-exec "$__cdist_target_host" "$tmp_code" +# Create new cache - put into seperate script? +# cdist-cache migrate? + +# echo rm -rf "$(__cdist_cache_host)" +# mkdir -p "$(__cdist_cache_host)" +# mv "$tmp_exp" "$tmp_obj" "$(__cdist_cache_host)" + + # Also save last code fragment mv "$tmp_code" "$(__cdist_cache_host)" From 8d83511038e1b9f3d6704a70830617954c445a43 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Feb 2011 23:25:37 +0100 Subject: [PATCH 0224/6109] todo comments Signed-off-by: Nico Schottelius --- TODO-1.0 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TODO-1.0 b/TODO-1.0 index 1606c241..7ade17b8 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -20,9 +20,9 @@ x run initial manifest (stage 2) x doc/man/cdist-config-layout.text x cd $__object_dir, before running manifest x rename $__object_dir to $__object_base_dir - - document "cd $__object_dir, before running manifest" in doc/man/cdist-types.text + - DOC document "cd $__object_dir, before running manifest" in doc/man/cdist-types.text - use $type/manifest instead of $type/init - - document that $type/manifest is executed for every object/instance + - DOC document that $type/manifest is executed for every object/instance - find $object_id in recursive runner (before merge) x generate code to be executed on clients (stage 4) From 153be6af6ceb229b23e30c88d149c92d9443b191 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 00:08:39 +0100 Subject: [PATCH 0225/6109] init -> manifest Signed-off-by: Nico Schottelius --- ...{cdist-manifest-recursive-run => cdist-manifest-recursive-all} | 0 conf/types/__issue/{init => manifest} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename bin/{cdist-manifest-recursive-run => cdist-manifest-recursive-all} (100%) rename conf/types/__issue/{init => manifest} (100%) diff --git a/bin/cdist-manifest-recursive-run b/bin/cdist-manifest-recursive-all similarity index 100% rename from bin/cdist-manifest-recursive-run rename to bin/cdist-manifest-recursive-all diff --git a/conf/types/__issue/init b/conf/types/__issue/manifest similarity index 100% rename from conf/types/__issue/init rename to conf/types/__issue/manifest From 7f96e309710d3355315a21e03aeb702d2a1eb45d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 09:16:44 +0100 Subject: [PATCH 0226/6109] define __cdist_config at beginning Signed-off-by: Nico Schottelius --- HACKERS_README | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index 53f40081..cebe981c 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -20,32 +20,35 @@ eof # Tell the user what we do, so this script makes sense during execution set -x -# prepare use: +# prepare use (only from top level directory) export PATH="$PATH:$(pwd -P)/bin" +export __cdist_config="$(pwd -P)/conf" + object_tmp=/tmp/localhost/objects explorer_tmp=/tmp/localhost/explorers exec_tmp=/tmp/localhost/exec + # Test first level manifest execution -__cdist_config=$(pwd -P)/conf cdist-manifest-init localhost "$object_tmp" +cdist-manifest-init localhost "$object_tmp" # See what it generated find "$object_tmp" # Generate all objects, including from types that generate objects as well -__cdist_config=$(pwd -P)/conf cdist-manifest-recursive-run localhost "$object_tmp" +cdist-manifest-recursive-all localhost "$object_tmp" # See what it generated find "$object_tmp" # Run explorer on a "remote" host -__cdist_config=$(pwd -P)/conf cdist-explorer-run localhost "$explorer_tmp" +cdist-explorer-run localhost "$explorer_tmp" # Display result find "$explorer_tmp" # Generate code for all objects in object dir -__cdist_config=$(pwd -P)/conf cdist-object-codegen-all localhost "$object_tmp" "$exec_tmp" +cdist-object-codegen-all localhost "$object_tmp" "$exec_tmp" # Display result find "$exec_tmp" From 662eee7ea3c6a86b61da55aa9e9028e35fd1d09d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 09:17:13 +0100 Subject: [PATCH 0227/6109] rename manifest -> manifests and use subshell in__cdist_object_list() Signed-off-by: Nico Schottelius --- bin/cdist-config | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 8320879a..68df3d4b 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -33,7 +33,12 @@ : ${__cdist_name_gencode:=gencode} : ${__cdist_name_host:=hosts} : ${__cdist_name_init:=init} -: ${__cdist_name_manifest:=manifests} + +# Name of the manifest file in types +: ${__cdist_name_manifest:=manifest} + +# Name of the base directory containing the initial manifests +: ${__cdist_name_manifests:=manifests} : ${__cdist_name_object:=objects} : ${__cdist_name_type:=types} @@ -54,7 +59,7 @@ # Base : ${__cdist_config:=/etc/cdist} : ${__cdist_explorer_dir:=$__cdist_config/$__cdist_name_explorer} -: ${__cdist_manifest_dir:=$__cdist_config/$__cdist_name_manifest} +: ${__cdist_manifest_dir:=$__cdist_config/$__cdist_name_manifests} : ${__cdist_manifest_init:=$__cdist_manifest_dir/$__cdist_name_init} : ${__cdist_type_dir:=$__cdist_config/$__cdist_name_type} @@ -151,10 +156,14 @@ __cdist_object_list() { local basedir="$1"; shift - cd "${basedir}" + # Use subshell to prevent changing cwd in program + ( + cd "${basedir}" + + find . -name "$__cdist_name_object_source" | \ + sed -e "s;$__cdist_name_object_source\$;;" -e 's;^./;;' + ) - find . -name "$__cdist_name_object_source" | \ - sed -e "s;$__cdist_name_object_source\$;;" -e 's;^./;;' } __cdist_object_source() From 711f9d7647946f8cf3b3a804e772a17c5e085f3f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 09:17:30 +0100 Subject: [PATCH 0228/6109] include rename in bin/cdist-deploy-to 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 7b3617f2..10d7d154 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -36,7 +36,7 @@ tmp_exec="$__cdist_tmp_dir/$__cdist_name_exec" # See cdist-stages(7) cdist-explorer-run "$__cdist_target_host" "$tmp_exp" cdist-manifest-init "$__cdist_target_host" "$tmp_obj" -cdist-manifest-recursive-run "$__cdist_target_host" "$tmp_obj" +cdist-manifest-recursive-all "$__cdist_target_host" "$tmp_obj" cdist-object-codegen-all "$__cdist_target_host" "$tmp_obj" "$tmp_exec" exit 1 From 7bd2ba13587d7c6f895ccf416a9fe9e44b0030ad Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 09:23:38 +0100 Subject: [PATCH 0229/6109] fix many bugs in cdist-manifest-recursive-all Signed-off-by: Nico Schottelius --- bin/cdist-manifest-recursive-all | 103 ++++++++++++++----------------- 1 file changed, 48 insertions(+), 55 deletions(-) diff --git a/bin/cdist-manifest-recursive-all b/bin/cdist-manifest-recursive-all index 59da5b00..bda276f5 100755 --- a/bin/cdist-manifest-recursive-all +++ b/bin/cdist-manifest-recursive-all @@ -1,6 +1,6 @@ #!/bin/sh # -# 2010 Nico Schottelius (nico-cdist at schottelius.org) +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -38,84 +38,77 @@ set -eu __cdist_target_host="$1"; shift __cdist_object_base_dir="$1"; shift -# change to directory containing objects -cd "$__cdist_object_base_dir" +objectlist="${__cdist_tmp_dir}/objectfile" +newobjectlist="${__cdist_tmp_dir}/newobjectfile" +newobjects="${__cdist_tmp_dir}/newobjects" + +no_new_object=n # Loop until we do not create new objects anymore # which is equal to all objects have been run -__cdist_object_created_new=1 - - -while [ "$__cdist_object_created_new" = 1 ]; do +while [ "$no_new_object" = "n" ]; do # assume we're done after this run - __cdist_object_created_new=0 + no_new_object=y # find all objects (every object has the source recorded) - __cdist_object_list . > "$__cdist_tmp_file" - - # FIXME: DEBUG - cat "$__cdist_tmp_file" + __cdist_object_list "$__cdist_object_base_dir" > "$objectlist" + # Check every object, if we need to run it while read object; do - if [ ! -f "${object}/$__cdist_name_object_finished" ]; then + cur_object_dir="$__cdist_object_base_dir/$object" + + if [ ! -f "${cur_object_dir}/$__cdist_name_object_finished" ]; then echo "Working on object ${object} ..." - type=${object%%/*} - manifest="$__cdist_type_dir/${type}/${__cdist_name_init}" + type="${object%%/*}" + manifest="$__cdist_type_dir/${type}/${__cdist_name_manifest}" + echo $manifest if [ -x "${manifest}" ]; then - echo "Running manifest of type ${type} ..." - - # FIXME: use subdir in tmpdir? - cdist-manifest-run "$__cdist_target_host" "${manifest}" "${__cdist_tmp_dir}" - - echo "Trying to merge... " - - # list of new objects - cd "${__cdist_tmp_dir}" - __cdist_object_list . > "$__cdist_tmp_file" + echo "Executing manifest ${manifest} ..." + cdist-manifest-run "$__cdist_target_host" "${manifest}" "${newobjects}" + __cdist_object_list "${newobjects}" > "$newobjectlist" + # Verify no conflicting objects have been created while read newobject; do - if [ -e "$__cdist_object_base_dir/${newobject}" ]; then - __cdist_exit_err "${newobject} already exists, merge failed." - else - # Fine, merge back! FIXME: touch correct here? - touch "${newobject}/$___cdist_name_object_finished" - pax -r -w "$newobject" "$__cdist_object_base_dir" - fi - done < "$__cdist_tmp_file" - - # Always rerun the whole loop if we ran - # a manifest of an object - break + grep -q "^$newobject\$" "$objectlist" && \ + __cdist_exit_err "${manifest} tried to recreate ${newobject}" + done < "$newobjectlist" - # FIXME: continue here - # tar, cp, pax, mv? - # mv/cp -n look good - posix? + # Safe harbour: We can merge all objects into main tree + # Merge = mkdir + mv parameters + while read newobject; do + # Unset no_new_object - only once needed... FIXME (beautify) + no_new_object="n" + + set -x + # where to save the newly created object + object_dir="$__cdist_object_base_dir/$newobject" - # pax: - # pax -r -w -k could work, but -k does not raise an error if files - # are already existing + # Source of the new object + new_object_dir="${newobjects}/$newobject" - # - copy if not existing - # fail (abort whole recursive run) if existing - # - # iterate over all new objects and copy each back? + echo "MIGRATING: $newobject" + find $new_object_dir + mkdir -p "$object_dir" + mv "${new_object_dir}/"* "$object_dir" + set +x + done < "$newobjectlist" + + # Remove listing and rest of newobjects, otherwise the next type will reuse it... + rm -rf "$newobjects" "$newobjectlist" else # Be nice, warn user if manifests exists, but is not executable if [ -f "${manifest}" ]; then - echo "Warning ${manifest} is not executable" + echo "Warning ${manifest} exists, but is not executable." >&2 fi fi - - - # At least one more run needed - __cdist_object_created_new=1 fi - done < "$__cdist_tmp_file" + # done with this object + touch "$cur_object_dir/$__cdist_name_object_finished" + + done < "$objectlist" done - -exit 0 From 466e654bc4ccc71268496b06cff15d9cf0a3f840 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 09:24:14 +0100 Subject: [PATCH 0230/6109] correctly rename to cdist-manifest-run-all Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 2 +- bin/{cdist-manifest-recursive-all => cdist-manifest-run-all} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename bin/{cdist-manifest-recursive-all => cdist-manifest-run-all} (100%) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 10d7d154..1e9bd85c 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -36,7 +36,7 @@ tmp_exec="$__cdist_tmp_dir/$__cdist_name_exec" # See cdist-stages(7) cdist-explorer-run "$__cdist_target_host" "$tmp_exp" cdist-manifest-init "$__cdist_target_host" "$tmp_obj" -cdist-manifest-recursive-all "$__cdist_target_host" "$tmp_obj" +cdist-manifest-run-all "$__cdist_target_host" "$tmp_obj" cdist-object-codegen-all "$__cdist_target_host" "$tmp_obj" "$tmp_exec" exit 1 diff --git a/bin/cdist-manifest-recursive-all b/bin/cdist-manifest-run-all similarity index 100% rename from bin/cdist-manifest-recursive-all rename to bin/cdist-manifest-run-all From cd6f9697894035dc1af7c7cda04824b61e8b0845 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 09:28:35 +0100 Subject: [PATCH 0231/6109] cleanup + include source information in migration Signed-off-by: Nico Schottelius --- HACKERS_README | 2 +- bin/cdist-manifest-run-all | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index cebe981c..a5b1d23a 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -36,7 +36,7 @@ cdist-manifest-init localhost "$object_tmp" find "$object_tmp" # Generate all objects, including from types that generate objects as well -cdist-manifest-recursive-all localhost "$object_tmp" +cdist-manifest-run-all localhost "$object_tmp" # See what it generated find "$object_tmp" diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index bda276f5..08916a23 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -28,11 +28,7 @@ # . cdist-config - -if [ $# -ne 2 ]; then - __cdist_usage " " -fi - +[ $# -eq 2 ] || __cdist_usage " " set -eu __cdist_target_host="$1"; shift @@ -89,11 +85,12 @@ while [ "$no_new_object" = "n" ]; do # Source of the new object new_object_dir="${newobjects}/$newobject" - echo "MIGRATING: $newobject" find $new_object_dir mkdir -p "$object_dir" + # Move parameters and source information mv "${new_object_dir}/"* "$object_dir" + mv "${new_object_dir}/${__cdist_name_object_source}" "$object_dir" set +x done < "$newobjectlist" From 1d796e6ed1fc8275c1b2c6b7d8ee5edebbfffedd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 09:34:59 +0100 Subject: [PATCH 0232/6109] rename no_new_object to new_objects_created (more intuitive) Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 08916a23..6d6a1dd0 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -38,13 +38,13 @@ objectlist="${__cdist_tmp_dir}/objectfile" newobjectlist="${__cdist_tmp_dir}/newobjectfile" newobjects="${__cdist_tmp_dir}/newobjects" -no_new_object=n +new_objects_created=y # Loop until we do not create new objects anymore # which is equal to all objects have been run -while [ "$no_new_object" = "n" ]; do +while [ "$new_objects_created" = "y" ]; do # assume we're done after this run - no_new_object=y + new_objects_created=n # find all objects (every object has the source recorded) __cdist_object_list "$__cdist_object_base_dir" > "$objectlist" @@ -71,12 +71,10 @@ while [ "$no_new_object" = "n" ]; do __cdist_exit_err "${manifest} tried to recreate ${newobject}" done < "$newobjectlist" - # Safe harbour: We can merge all objects into main tree - # Merge = mkdir + mv parameters + # Merge = mkdir + mv parameters and source information while read newobject; do - # Unset no_new_object - only once needed... FIXME (beautify) - no_new_object="n" + [ "$new_objects_created" = "n" ] && new_objects_created="y" set -x # where to save the newly created object @@ -106,6 +104,5 @@ while [ "$no_new_object" = "n" ]; do # done with this object touch "$cur_object_dir/$__cdist_name_object_finished" - done < "$objectlist" done From db1b7eac6c90979df7e9e8a6174d28af502dc762 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 09:44:36 +0100 Subject: [PATCH 0233/6109] prefix all variables with __cdist Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 74 +++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 6d6a1dd0..7f8ea406 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -34,75 +34,75 @@ set -eu __cdist_target_host="$1"; shift __cdist_object_base_dir="$1"; shift -objectlist="${__cdist_tmp_dir}/objectfile" -newobjectlist="${__cdist_tmp_dir}/newobjectfile" -newobjects="${__cdist_tmp_dir}/newobjects" +__cdist_objects_list="${__cdist_tmp_dir}/objects_file" +__cdist_new_objects_list="${__cdist_tmp_dir}/new_objects_file" +__cdist_new_objects_dir="${__cdist_tmp_dir}/new_objects_dir" -new_objects_created=y +__cdist_new_objects_created=y # Loop until we do not create new objects anymore # which is equal to all objects have been run -while [ "$new_objects_created" = "y" ]; do +while [ "$__cdist_new_objects_created" = "y" ]; do # assume we're done after this run - new_objects_created=n + __cdist_new_objects_created=n # find all objects (every object has the source recorded) - __cdist_object_list "$__cdist_object_base_dir" > "$objectlist" + __cdist_object_list "$__cdist_object_base_dir" > "$__cdist_objects_list" # Check every object, if we need to run it - while read object; do - cur_object_dir="$__cdist_object_base_dir/$object" + while read __cdist_object; do + __cdist_cur_object_dir="$__cdist_object_base_dir/$__cdist_object" - if [ ! -f "${cur_object_dir}/$__cdist_name_object_finished" ]; then - echo "Working on object ${object} ..." + if [ ! -f "${__cdist_cur_object_dir}/$__cdist_name_object_finished" ]; then + echo "Working on object ${__cdist_object} ..." - type="${object%%/*}" - manifest="$__cdist_type_dir/${type}/${__cdist_name_manifest}" - echo $manifest + __cdist_type="${__cdist_object%%/*}" + __cdist_manifest="$__cdist_type_dir/${__cdist_type}/${__cdist_name_manifest}" + echo $__cdist_manifest - if [ -x "${manifest}" ]; then - echo "Executing manifest ${manifest} ..." - cdist-manifest-run "$__cdist_target_host" "${manifest}" "${newobjects}" - __cdist_object_list "${newobjects}" > "$newobjectlist" + if [ -x "${__cdist_manifest}" ]; then + echo "Executing manifest ${__cdist_manifest} ..." + cdist-manifest-run "$__cdist_target_host" "${__cdist_manifest}" "${__cdist_new_objects_dir}" + __cdist_object_list "${__cdist_new_objects_dir}" > "$__cdist_new_objects_list" # Verify no conflicting objects have been created - while read newobject; do - grep -q "^$newobject\$" "$objectlist" && \ - __cdist_exit_err "${manifest} tried to recreate ${newobject}" - done < "$newobjectlist" + while read __cdist_new_object; do + grep -q "^$__cdist_new_object\$" "$__cdist_objects_list" && \ + __cdist_exit_err "${__cdist_manifest}: Tried to recreate ${__cdist_new_object}" + done < "$__cdist_new_objects_list" # Safe harbour: We can merge all objects into main tree # Merge = mkdir + mv parameters and source information - while read newobject; do - [ "$new_objects_created" = "n" ] && new_objects_created="y" + while read __cdist_new_object; do + [ "$__cdist_new_objects_created" = "n" ] && __cdist_new_objects_created="y" set -x # where to save the newly created object - object_dir="$__cdist_object_base_dir/$newobject" + __cdist_object_dir="$__cdist_object_base_dir/$__cdist_new_object" # Source of the new object - new_object_dir="${newobjects}/$newobject" + __cdist_new_object_dir="${__cdist_new_objects_dir}/$__cdist_new_object" - find $new_object_dir + find $__cdist_new_object_dir - mkdir -p "$object_dir" + mkdir -p "$__cdist_object_dir" # Move parameters and source information - mv "${new_object_dir}/"* "$object_dir" - mv "${new_object_dir}/${__cdist_name_object_source}" "$object_dir" + mv "${__cdist_new_object_dir}/"* "$__cdist_object_dir" + mv "${__cdist_new_object_dir}/${__cdist_name_object_source}" "$__cdist_object_dir" set +x - done < "$newobjectlist" + done < "$__cdist_new_objects_list" - # Remove listing and rest of newobjects, otherwise the next type will reuse it... - rm -rf "$newobjects" "$newobjectlist" + # Remove listing and objects, otherwise the next type will reuse it... + rm -rf "$__cdist_new_objects_dir" "$__cdist_new_objects_list" else # Be nice, warn user if manifests exists, but is not executable - if [ -f "${manifest}" ]; then - echo "Warning ${manifest} exists, but is not executable." >&2 + if [ -f "${__cdist_manifest}" ]; then + echo "Warning ${__cdist_manifest} exists, but is not executable." >&2 fi fi fi # done with this object - touch "$cur_object_dir/$__cdist_name_object_finished" - done < "$objectlist" + touch "$__cdist_cur_object_dir/$__cdist_name_object_finished" + done < "$__cdist_objects_list" done From df68e515b7c11299928bc4d5b44c2f2cb801ff2d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 09:47:12 +0100 Subject: [PATCH 0234/6109] cleanup and -debug Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 7f8ea406..35b54e4d 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -38,15 +38,14 @@ __cdist_objects_list="${__cdist_tmp_dir}/objects_file" __cdist_new_objects_list="${__cdist_tmp_dir}/new_objects_file" __cdist_new_objects_dir="${__cdist_tmp_dir}/new_objects_dir" -__cdist_new_objects_created=y # Loop until we do not create new objects anymore # which is equal to all objects have been run +__cdist_new_objects_created=y while [ "$__cdist_new_objects_created" = "y" ]; do - # assume we're done after this run + # Assume we're done after this run __cdist_new_objects_created=n - # find all objects (every object has the source recorded) __cdist_object_list "$__cdist_object_base_dir" > "$__cdist_objects_list" # Check every object, if we need to run it @@ -76,20 +75,17 @@ while [ "$__cdist_new_objects_created" = "y" ]; do while read __cdist_new_object; do [ "$__cdist_new_objects_created" = "n" ] && __cdist_new_objects_created="y" - set -x # where to save the newly created object __cdist_object_dir="$__cdist_object_base_dir/$__cdist_new_object" # Source of the new object __cdist_new_object_dir="${__cdist_new_objects_dir}/$__cdist_new_object" - find $__cdist_new_object_dir - mkdir -p "$__cdist_object_dir" + # Move parameters and source information mv "${__cdist_new_object_dir}/"* "$__cdist_object_dir" mv "${__cdist_new_object_dir}/${__cdist_name_object_source}" "$__cdist_object_dir" - set +x done < "$__cdist_new_objects_list" # Remove listing and objects, otherwise the next type will reuse it... From 8d0d714f3c4537a3fe28172323bd24bee53a9bd8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 09:49:56 +0100 Subject: [PATCH 0235/6109] less todo Signed-off-by: Nico Schottelius --- TODO-1.0 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TODO-1.0 b/TODO-1.0 index 7ade17b8..e1721e7a 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -20,10 +20,10 @@ x run initial manifest (stage 2) x doc/man/cdist-config-layout.text x cd $__object_dir, before running manifest x rename $__object_dir to $__object_base_dir + x use $type/manifest instead of $type/init + x find $object_id in recursive runner (before merge) - DOC document "cd $__object_dir, before running manifest" in doc/man/cdist-types.text - - use $type/manifest instead of $type/init - DOC document that $type/manifest is executed for every object/instance - - find $object_id in recursive runner (before merge) x generate code to be executed on clients (stage 4) x for one object From da4cd7235c4ad23a72d4f8526c22e1d15876a939 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 15:03:24 +0100 Subject: [PATCH 0236/6109] add template for cdist-exec-transfer Signed-off-by: Nico Schottelius --- bin/cdist-exec-transfer | 91 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100755 bin/cdist-exec-transfer diff --git a/bin/cdist-exec-transfer b/bin/cdist-exec-transfer new file mode 100755 index 00000000..bf738355 --- /dev/null +++ b/bin/cdist-exec-transfer @@ -0,0 +1,91 @@ +#!/bin/sh +# +# 2010-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 . +# +# +# FIXME: This script is ugly, should be either seperated into smaller ones, +# but definitely be cleaned up - PROOF OF CONCEPT CODE +# + +. cdist-config + +if [ $# -ne 2 ]; then + __cdist_usage " " +fi + +export __cdist_target_host="$1"; shift +export __cdist_output_dir="$1"; shift + +set -e + +# create basedir +ssh root@${__cdist_target_host} "mkdir -p \"${__cdist_remote_base_dir}\" \ + \"${__cdist_remote_cache_dir}\" \"${__cdist_remote_cache_bin}\" \ + \"${__cdist_remote_cache_explorer}\"" + +# Transfer all explorers to the target dir - must be one level above, so +# coyping it multiple times works: a -> remote:/base/ = remote:/base/a vs. +# a -> remote:/base/a = remote:/base/a/a (second copy) + +# FIXME: enable -q as soon as the code is cleaned up +scp -r "${__cdist_explorer_dir}" \ + "root@${__cdist_target_host}:${__cdist_remote_base_dir}" + +# Transfer cdist binaries - FIXME: should transfer all (needed?) of them! +scp "$(which cdist-explorer-coordinator)" "$(which cdist-config)" \ + "root@${__cdist_target_host}:${__cdist_remote_cache_bin}" + +# Execute explorer coordinator, which will save results on target +ssh root@${__cdist_target_host} \ + "PATH=\"${__cdist_remote_cache_bin}:\$PATH\" + \"${__cdist_remote_cache_bin}/cdist-explorer-coordinator\" \ + \"${__cdist_remote_explorer_dir}\" \"${__cdist_remote_cache_explorer}\"" + +# Ensure local destination directory exists +mkdir -p "$__cdist_output_dir" + +# FIXME: enable -q as soon as the code is cleaned up +# Transfer back all results - FIXME: Add 2 level cache, so old version is kept until success +scp -r "root@${__cdist_target_host}:${__cdist_remote_cache_explorer}/*" \ + "$__cdist_output_dir" + + +exit 0 + +# -------------------------------------------------------------------------------- +# old idea with shell scripts (also sexy) +# Keep until above version successfully works + + +cd "${__cdist_explorer_dir}" +ls > "${__cdist_tmp_file}" + +# first load all functions +while read funcfull; do + cat "${funcfull}" +done < "${__cdist_tmp_file}" + +# then execute functions +while read funcfull; do + sh="${funcfull##*/}" + func="${sh%.sh}" + var="__$func" + + echo "$var=\"\$($func)\"" + echo "echo $var=\\\"\$$var\\\"" +done < "${CDIST_TMP}" From 255124b8c99433c84677bcb1928dde9dc9a6c79c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 15:11:41 +0100 Subject: [PATCH 0237/6109] Create, finish and integrate bin/cdist-exec-transfer Signed-off-by: Nico Schottelius --- HACKERS_README | 3 ++ bin/cdist-config | 1 + bin/cdist-deploy-to | 4 ++- bin/cdist-exec-transfer | 71 ++++++----------------------------------- 4 files changed, 16 insertions(+), 63 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index a5b1d23a..7d6aafdf 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -52,3 +52,6 @@ cdist-object-codegen-all localhost "$object_tmp" "$exec_tmp" # Display result find "$exec_tmp" + +# Transfer generated code +cdist-exec-transfer localhost "$exec_tmp" diff --git a/bin/cdist-config b/bin/cdist-config index 68df3d4b..8542d23f 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -77,6 +77,7 @@ export __cdist_remote_explorer_dir : ${__cdist_remote_cache_explorer:=$__cdist_remote_cache_dir/$__cdist_name_explorer} export __cdist_remote_cache_explorer : ${__cdist_remote_cache_bin:=$__cdist_remote_base_dir/$__cdist_name_bin} +: ${__cdist_remote_cache_exec:=$__cdist_remote_base_dir/$__cdist_name_exec} # Tempfiles need to be recreated for each individual script, unshared! __cdist_tmp_dir=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX") diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 1e9bd85c..4fa31bfe 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -38,10 +38,12 @@ cdist-explorer-run "$__cdist_target_host" "$tmp_exp" cdist-manifest-init "$__cdist_target_host" "$tmp_obj" cdist-manifest-run-all "$__cdist_target_host" "$tmp_obj" cdist-object-codegen-all "$__cdist_target_host" "$tmp_obj" "$tmp_exec" +cdist-object-codegen-all "$__cdist_target_host" "$tmp_obj" "$tmp_exec" exit 1 -cdist-target-exec "$__cdist_target_host" "$tmp_code" +cdist-exec-transfer "$__cdist_target_host" "$tmp_exec" +cdist-exec-run "$__cdist_target_host" "$tmp_exec" # Create new cache - put into seperate script? # cdist-cache migrate? diff --git a/bin/cdist-exec-transfer b/bin/cdist-exec-transfer index bf738355..d1ba128d 100755 --- a/bin/cdist-exec-transfer +++ b/bin/cdist-exec-transfer @@ -18,74 +18,21 @@ # along with cdist. If not, see . # # -# FIXME: This script is ugly, should be either seperated into smaller ones, -# but definitely be cleaned up - PROOF OF CONCEPT CODE +# Transfer executables # . cdist-config -if [ $# -ne 2 ]; then - __cdist_usage " " -fi - -export __cdist_target_host="$1"; shift -export __cdist_output_dir="$1"; shift - +[ $# -eq 2 ] || __cdist_usage " " set -e -# create basedir -ssh root@${__cdist_target_host} "mkdir -p \"${__cdist_remote_base_dir}\" \ - \"${__cdist_remote_cache_dir}\" \"${__cdist_remote_cache_bin}\" \ - \"${__cdist_remote_cache_explorer}\"" +export __cdist_target_host="$1"; shift +export __cdist_exec_dir="$1"; shift -# Transfer all explorers to the target dir - must be one level above, so -# coyping it multiple times works: a -> remote:/base/ = remote:/base/a vs. -# a -> remote:/base/a = remote:/base/a/a (second copy) + +# re-create basedir so it's clean +ssh "root@${__cdist_target_host}" "rm -rf \"${__cdist_remote_cache_exec}\" && mkdir -p \"${__cdist_remote_cache_exec}\"" # FIXME: enable -q as soon as the code is cleaned up -scp -r "${__cdist_explorer_dir}" \ - "root@${__cdist_target_host}:${__cdist_remote_base_dir}" - -# Transfer cdist binaries - FIXME: should transfer all (needed?) of them! -scp "$(which cdist-explorer-coordinator)" "$(which cdist-config)" \ - "root@${__cdist_target_host}:${__cdist_remote_cache_bin}" - -# Execute explorer coordinator, which will save results on target -ssh root@${__cdist_target_host} \ - "PATH=\"${__cdist_remote_cache_bin}:\$PATH\" - \"${__cdist_remote_cache_bin}/cdist-explorer-coordinator\" \ - \"${__cdist_remote_explorer_dir}\" \"${__cdist_remote_cache_explorer}\"" - -# Ensure local destination directory exists -mkdir -p "$__cdist_output_dir" - -# FIXME: enable -q as soon as the code is cleaned up -# Transfer back all results - FIXME: Add 2 level cache, so old version is kept until success -scp -r "root@${__cdist_target_host}:${__cdist_remote_cache_explorer}/*" \ - "$__cdist_output_dir" - - -exit 0 - -# -------------------------------------------------------------------------------- -# old idea with shell scripts (also sexy) -# Keep until above version successfully works - - -cd "${__cdist_explorer_dir}" -ls > "${__cdist_tmp_file}" - -# first load all functions -while read funcfull; do - cat "${funcfull}" -done < "${__cdist_tmp_file}" - -# then execute functions -while read funcfull; do - sh="${funcfull##*/}" - func="${sh%.sh}" - var="__$func" - - echo "$var=\"\$($func)\"" - echo "echo $var=\\\"\$$var\\\"" -done < "${CDIST_TMP}" +scp -r "${__cdist_exec_dir}"/* \ + "root@${__cdist_target_host}:${__cdist_remote_cache_exec}" From aee427ee541e25827306b5c41038ef60e78174d3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 15:12:50 +0100 Subject: [PATCH 0238/6109] add template for cdist-exec-run Signed-off-by: Nico Schottelius --- bin/cdist-exec-run | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 bin/cdist-exec-run diff --git a/bin/cdist-exec-run b/bin/cdist-exec-run new file mode 100755 index 00000000..d1ba128d --- /dev/null +++ b/bin/cdist-exec-run @@ -0,0 +1,38 @@ +#!/bin/sh +# +# 2010-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 . +# +# +# Transfer executables +# + +. cdist-config + +[ $# -eq 2 ] || __cdist_usage " " +set -e + +export __cdist_target_host="$1"; shift +export __cdist_exec_dir="$1"; shift + + +# re-create basedir so it's clean +ssh "root@${__cdist_target_host}" "rm -rf \"${__cdist_remote_cache_exec}\" && mkdir -p \"${__cdist_remote_cache_exec}\"" + +# FIXME: enable -q as soon as the code is cleaned up +scp -r "${__cdist_exec_dir}"/* \ + "root@${__cdist_target_host}:${__cdist_remote_cache_exec}" From 2220054b4d61feeba4e0b9e6641b608565ad5ee9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 15:32:11 +0100 Subject: [PATCH 0239/6109] manifest must exit non-zero Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 4bdbde79..6789b9ec 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -46,4 +46,11 @@ if [ ! -x "${__cdist_manifest}" ]; then fi mkdir -p "${__cdist_output_dir}" -"${__cdist_manifest}" + +set +e + +"${__cdist_manifest}"; ret=$? + +if [ "$ret" -ne 0 ]; then + __cdist_exit_err "Error: ${__cdist_manifest} exited non-zero." +fi From 8ef43abf25138059e2189bba501dd090496b404a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 15:33:54 +0100 Subject: [PATCH 0240/6109] abort if codegen fails Signed-off-by: Nico Schottelius --- bin/cdist-object-codegen | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/cdist-object-codegen b/bin/cdist-object-codegen index 07f2604d..5ac49f0a 100755 --- a/bin/cdist-object-codegen +++ b/bin/cdist-object-codegen @@ -25,7 +25,7 @@ [ $# -eq 3 ] || __cdist_usage "" "" "" -set -ue +set -u export __cdist_target_host="$1"; shift export __cdist_object_base_dir="$1"; shift @@ -47,6 +47,7 @@ cd "$__cdist_object_dir" # Call gencode of type with __cdist_object if [ -x "$gencode" ]; then + # Prepend header to each script cat << eof # # Code imported from $gencode @@ -54,5 +55,12 @@ if [ -x "$gencode" ]; then eof - "$gencode" + "$gencode"; ret=$? + +else + ret=0 +fi + +if [ "$ret" -ne 0 ]; then + __cdist_exit_err "Error: $gencode exited non-zero" fi From 92dd32559a90efe1ea4464549df991811538ae16 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 15:35:12 +0100 Subject: [PATCH 0241/6109] finish cdist-deploy-to Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 4fa31bfe..d2d97c3e 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -22,9 +22,7 @@ # . cdist-config - [ $# -eq 1 ] || __cdist_usage "" - set -eu __cdist_target_host="$1" @@ -39,19 +37,12 @@ cdist-manifest-init "$__cdist_target_host" "$tmp_obj" cdist-manifest-run-all "$__cdist_target_host" "$tmp_obj" cdist-object-codegen-all "$__cdist_target_host" "$tmp_obj" "$tmp_exec" cdist-object-codegen-all "$__cdist_target_host" "$tmp_obj" "$tmp_exec" - -exit 1 - cdist-exec-transfer "$__cdist_target_host" "$tmp_exec" -cdist-exec-run "$__cdist_target_host" "$tmp_exec" - -# Create new cache - put into seperate script? -# cdist-cache migrate? +cdist-exec-run "$__cdist_target_host" +# FIXME: Create new cache from results # echo rm -rf "$(__cdist_cache_host)" # mkdir -p "$(__cdist_cache_host)" # mv "$tmp_exp" "$tmp_obj" "$(__cdist_cache_host)" - - # Also save last code fragment -mv "$tmp_code" "$(__cdist_cache_host)" +# mv "$tmp_code" "$(__cdist_cache_host)" From 7ad15d67332ca37d2e77bfd1c5a7ada0bb224d56 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 15:35:56 +0100 Subject: [PATCH 0242/6109] update hackers readme Signed-off-by: Nico Schottelius --- HACKERS_README | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index 7d6aafdf..6f27335a 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -18,7 +18,8 @@ The following code will get executed if you run this README: eof # Tell the user what we do, so this script makes sense during execution -set -x +# And abort on any error +set -ex # prepare use (only from top level directory) export PATH="$PATH:$(pwd -P)/bin" @@ -50,8 +51,11 @@ find "$explorer_tmp" # Generate code for all objects in object dir cdist-object-codegen-all localhost "$object_tmp" "$exec_tmp" -# Display result -find "$exec_tmp" +# Display result, including permissions +ls -lR "$exec_tmp" # Transfer generated code cdist-exec-transfer localhost "$exec_tmp" + +# Execute generated code +cdist-exec-run localhost From bb00bc93efff7988d04a10d59874d484751c46e7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 15:36:27 +0100 Subject: [PATCH 0243/6109] Finish bin/cdist-exec-run Signed-off-by: Nico Schottelius --- bin/cdist-exec-run | 15 +++++---------- bin/cdist-manifest-run | 2 +- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/bin/cdist-exec-run b/bin/cdist-exec-run index d1ba128d..598b3c5d 100755 --- a/bin/cdist-exec-run +++ b/bin/cdist-exec-run @@ -18,21 +18,16 @@ # along with cdist. If not, see . # # -# Transfer executables +# Exec executables on the remote side # . cdist-config - -[ $# -eq 2 ] || __cdist_usage " " +[ $# -eq 1 ] || __cdist_usage "" set -e export __cdist_target_host="$1"; shift -export __cdist_exec_dir="$1"; shift -# re-create basedir so it's clean -ssh "root@${__cdist_target_host}" "rm -rf \"${__cdist_remote_cache_exec}\" && mkdir -p \"${__cdist_remote_cache_exec}\"" - -# FIXME: enable -q as soon as the code is cleaned up -scp -r "${__cdist_exec_dir}"/* \ - "root@${__cdist_target_host}:${__cdist_remote_cache_exec}" +# Run executables - no order, no dependencies yet +ssh "root@${__cdist_target_host}" \ + "find \"${__cdist_remote_cache_exec}\" -type f -name \"${__cdist_name_exec}\" -exec {} \\;" diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 6789b9ec..98385ca8 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -47,10 +47,10 @@ fi mkdir -p "${__cdist_output_dir}" +# Catch errors ourselves now set +e "${__cdist_manifest}"; ret=$? - if [ "$ret" -ne 0 ]; then __cdist_exit_err "Error: ${__cdist_manifest} exited non-zero." fi From b1c5012f3c79f717ad24f54287eddc8757a21b9b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 16:07:07 +0100 Subject: [PATCH 0244/6109] Make __cdist_exit_err write on stderr :-) Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 +- bin/cdist-object-codegen | 3 +-- conf/types/__file/gencode | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 8542d23f..9e0894f7 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -111,7 +111,7 @@ __cdist_debug_echo() __cdist_exit_err() { - echo "$@" + echo "$@" >&2 exit 1 } diff --git a/bin/cdist-object-codegen b/bin/cdist-object-codegen index 5ac49f0a..86bdb7c3 100755 --- a/bin/cdist-object-codegen +++ b/bin/cdist-object-codegen @@ -19,12 +19,11 @@ # # # Generate code from one object (object must be relative path!) +# WARNING: OUTPUT ON STDOUT, ERRORS NEED TO BE ON STDERR! # . cdist-config - [ $# -eq 3 ] || __cdist_usage "" "" "" - set -u export __cdist_target_host="$1"; shift diff --git a/conf/types/__file/gencode b/conf/types/__file/gencode index 904a871f..0137064f 100755 --- a/conf/types/__file/gencode +++ b/conf/types/__file/gencode @@ -23,6 +23,7 @@ # . cdist-config +set -e type="$(cat type)" mode="$(cat mode)" From cae8f31923215919bbcffa4ef41b8c9d55e0382a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 16:13:35 +0100 Subject: [PATCH 0245/6109] cleanups Signed-off-by: Nico Schottelius --- HACKERS_README | 5 ++++- bin/cdist-object-codegen | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index 6f27335a..7685ac35 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -13,7 +13,10 @@ Do not believe anything written in cdist, besides what's written in this file What you can do so far: (executed from top level directory) -The following code will get executed if you run this README: +The following code will get executed if you run this README, +I usually do it like this: + + % rm -rf /tmp/localhost && ./HACKERS_README eof diff --git a/bin/cdist-object-codegen b/bin/cdist-object-codegen index 86bdb7c3..81357524 100755 --- a/bin/cdist-object-codegen +++ b/bin/cdist-object-codegen @@ -24,7 +24,7 @@ . cdist-config [ $# -eq 3 ] || __cdist_usage "" "" "" -set -u +set -eu export __cdist_target_host="$1"; shift export __cdist_object_base_dir="$1"; shift @@ -54,6 +54,8 @@ if [ -x "$gencode" ]; then eof + # Catch errors ourself now + set +e "$gencode"; ret=$? else From 1b2ed7ab8abc8fe5e3e355ccaae8adf4852edcce Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 16:13:55 +0100 Subject: [PATCH 0246/6109] parameter type is required for __file Signed-off-by: Nico Schottelius --- conf/types/__file/parameters/required | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/types/__file/parameters/required b/conf/types/__file/parameters/required index 9239646e..14592dcb 100644 --- a/conf/types/__file/parameters/required +++ b/conf/types/__file/parameters/required @@ -1,2 +1,3 @@ source destination +type From f392543d43f9f9653364b122492c20c9129feabe Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 16:17:41 +0100 Subject: [PATCH 0247/6109] add id in error string Signed-off-by: Nico Schottelius --- bin/cdist_tree_wrapper | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/cdist_tree_wrapper b/bin/cdist_tree_wrapper index 238ef6b4..64229efe 100755 --- a/bin/cdist_tree_wrapper +++ b/bin/cdist_tree_wrapper @@ -39,6 +39,9 @@ echo "$__cdist_object_id" | grep -q "^${__cdist_sane_regexp}\$" || \ __cdist_object="${__cdist_type}/${__cdist_object_id}" __cdist_ddir="$__cdist_output_dir/${__cdist_object}" +# Append id for error messages +__cdist_myname="$__cdist_myname ($__cdist_object_id)" + if [ -e "${__cdist_ddir}" ]; then source="$(__cdist_object_source "${__cdist_ddir}")" __cdist_exit_err "${__cdist_object} already exists (source: $source)" @@ -46,8 +49,6 @@ fi mkdir -p "${__cdist_ddir}" -echo "I am $__cdist_myname and have been called with $@" - # Record (correct ;-) source echo "${__cdist_manifest}" > "${__cdist_ddir}/${__cdist_name_object_source}" From ff41ce0318d645044afa1dbdf04c71f423ca5188 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 16:26:48 +0100 Subject: [PATCH 0248/6109] ensure failing if manifest or gencode break Signed-off-by: Nico Schottelius --- HACKERS_README | 6 ++++-- bin/cdist-manifest-init | 6 ++---- bin/cdist-manifest-run | 17 +++++++++-------- bin/cdist-object-codegen | 7 ++++++- conf/types/__file/gencode | 5 ++++- 5 files changed, 25 insertions(+), 16 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index 7685ac35..aa3d937d 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -21,8 +21,10 @@ I usually do it like this: eof # Tell the user what we do, so this script makes sense during execution -# And abort on any error -set -ex +set -x + +# Abort on any error +set -e # prepare use (only from top level directory) export PATH="$PATH:$(pwd -P)/bin" diff --git a/bin/cdist-manifest-init b/bin/cdist-manifest-init index 7e3c0f2b..6a29ea9e 100755 --- a/bin/cdist-manifest-init +++ b/bin/cdist-manifest-init @@ -23,10 +23,8 @@ # . cdist-config - -if [ $# -ne 2 ]; then - __cdist_usage " " -fi +[ $# -eq 2 ] || __cdist_usage " " +set -e export __cdist_target_host="$1"; shift export __cdist_output_dir="$1"; shift diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 98385ca8..72f01532 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -23,19 +23,15 @@ # . cdist-config - -if [ $# -ne 3 ]; then - __cdist_usage " " -fi - -set -aeu +[ $# -eq 3 ] || __cdist_usage " " +set -u export __cdist_target_host="$1"; shift export __cdist_manifest="$1"; shift export __cdist_output_dir="$1"; shift # Ensure binaries exist and are up-to-date -cdist-build-bin +cdist-build-bin || __cdist_exit_err "Failed to build support binaries" # prepend our path, so all cdist tools come before other tools PATH="${__cdist_cache_bin}:$PATH" @@ -50,7 +46,12 @@ mkdir -p "${__cdist_output_dir}" # Catch errors ourselves now set +e -"${__cdist_manifest}"; ret=$? +# Ensure manifest fails if any error exists - FIXME: redundant, cdist-object-codegen +( + set -e + . "${__cdist_manifest}" +); ret=$? + if [ "$ret" -ne 0 ]; then __cdist_exit_err "Error: ${__cdist_manifest} exited non-zero." fi diff --git a/bin/cdist-object-codegen b/bin/cdist-object-codegen index 81357524..d2bdd550 100755 --- a/bin/cdist-object-codegen +++ b/bin/cdist-object-codegen @@ -56,7 +56,12 @@ eof # Catch errors ourself now set +e - "$gencode"; ret=$? + ( + # Ensure manifest fails if something within manifest fails + # And not all manifests need to include set -e themselves + set -e + . "$gencode" + ); ret=$? else ret=0 diff --git a/conf/types/__file/gencode b/conf/types/__file/gencode index 0137064f..6fbafbe6 100755 --- a/conf/types/__file/gencode +++ b/conf/types/__file/gencode @@ -25,12 +25,15 @@ . cdist-config set -e +pwd -P >&2 +ls >&2 + type="$(cat type)" mode="$(cat mode)" path="$(cat path)" -case "$type" in +case "$type" in directory) echo mkdir \"$path\" ;; From de43f4d5d87a0919273d2b9972d875234ce41eae Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 16:33:16 +0100 Subject: [PATCH 0249/6109] fix initial manifest and reorder HACKERS_README Signed-off-by: Nico Schottelius --- HACKERS_README | 12 ++++++------ conf/manifests/init | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index aa3d937d..3ddbd0b8 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -35,6 +35,12 @@ explorer_tmp=/tmp/localhost/explorers exec_tmp=/tmp/localhost/exec +# Run explorer on a "remote" host +cdist-explorer-run localhost "$explorer_tmp" + +# Display result +find "$explorer_tmp" + # Test first level manifest execution cdist-manifest-init localhost "$object_tmp" @@ -47,12 +53,6 @@ cdist-manifest-run-all localhost "$object_tmp" # See what it generated find "$object_tmp" -# Run explorer on a "remote" host -cdist-explorer-run localhost "$explorer_tmp" - -# Display result -find "$explorer_tmp" - # Generate code for all objects in object dir cdist-object-codegen-all localhost "$object_tmp" "$exec_tmp" diff --git a/conf/manifests/init b/conf/manifests/init index 2923ba88..edc380fa 100755 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -5,7 +5,9 @@ # All ikqs get a sample file case "$__cdist_target_host" in ikq*|localhost) - __file cdist-config --source /home/users/nico/p/cdist/bin/cdist-config --destination /usr/bin/cdist-config + __file cdist-config --source /home/users/nico/p/cdist/bin/cdist-config \ + --destination /usr/bin/cdist-config \ + --type file __issue iddoesnotmatterhere ;; esac From bd026bad189476159f5cf23f9d54a03fce9f7e9f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 16:42:59 +0100 Subject: [PATCH 0250/6109] define variables to be exported to types Signed-off-by: Nico Schottelius --- HACKERS_README | 24 ++++++++++++------------ TODO-1.0 | 5 +++++ bin/cdist-deploy-to | 21 ++++++++++----------- conf/types/__issue/manifest | 8 +++----- 4 files changed, 30 insertions(+), 28 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index 3ddbd0b8..8efed967 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -30,37 +30,37 @@ set -e export PATH="$PATH:$(pwd -P)/bin" export __cdist_config="$(pwd -P)/conf" -object_tmp=/tmp/localhost/objects -explorer_tmp=/tmp/localhost/explorers -exec_tmp=/tmp/localhost/exec +__cdist_out_objects=/tmp/localhost/objects +__cdist_out_explorers=/tmp/localhost/explorers +__cdist_out_execs=/tmp/localhost/exec # Run explorer on a "remote" host -cdist-explorer-run localhost "$explorer_tmp" +cdist-explorer-run localhost "$__cdist_out_explorers" # Display result -find "$explorer_tmp" +find "$__cdist_out_explorers" # Test first level manifest execution -cdist-manifest-init localhost "$object_tmp" +cdist-manifest-init localhost "$__cdist_out_objects" # See what it generated -find "$object_tmp" +find "$__cdist_out_objects" # Generate all objects, including from types that generate objects as well -cdist-manifest-run-all localhost "$object_tmp" +cdist-manifest-run-all localhost "$__cdist_out_objects" # See what it generated -find "$object_tmp" +find "$__cdist_out_objects" # Generate code for all objects in object dir -cdist-object-codegen-all localhost "$object_tmp" "$exec_tmp" +cdist-object-codegen-all localhost "$__cdist_out_objects" "$__cdist_out_execs" # Display result, including permissions -ls -lR "$exec_tmp" +ls -lR "$__cdist_out_execs" # Transfer generated code -cdist-exec-transfer localhost "$exec_tmp" +cdist-exec-transfer localhost "$__cdist_out_execs" # Execute generated code cdist-exec-run localhost diff --git a/TODO-1.0 b/TODO-1.0 index e1721e7a..1c739474 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -24,6 +24,11 @@ x run initial manifest (stage 2) x find $object_id in recursive runner (before merge) - DOC document "cd $__object_dir, before running manifest" in doc/man/cdist-types.text - DOC document that $type/manifest is executed for every object/instance + - DOC: types can always access + __cdist_out_objects, __cdist_out_explorers, + __cdist_out_execs + + --> create cdist-variables document? x generate code to be executed on clients (stage 4) x for one object diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index d2d97c3e..d7917b87 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -23,26 +23,25 @@ . cdist-config [ $# -eq 1 ] || __cdist_usage "" -set -eu +set -e __cdist_target_host="$1" -tmp_exp="$__cdist_tmp_dir/$__cdist_name_explorer" -tmp_obj="$__cdist_tmp_dir/$__cdist_name_object" -tmp_exec="$__cdist_tmp_dir/$__cdist_name_exec" +export __cdist_out_explorers="$__cdist_tmp_dir/$__cdist_name_explorer" +export __cdist_out_objects="$__cdist_tmp_dir/$__cdist_name_object" +export __cdist_out_execs="$__cdist_tmp_dir/$__cdist_name_exec" # See cdist-stages(7) -cdist-explorer-run "$__cdist_target_host" "$tmp_exp" -cdist-manifest-init "$__cdist_target_host" "$tmp_obj" -cdist-manifest-run-all "$__cdist_target_host" "$tmp_obj" -cdist-object-codegen-all "$__cdist_target_host" "$tmp_obj" "$tmp_exec" -cdist-object-codegen-all "$__cdist_target_host" "$tmp_obj" "$tmp_exec" -cdist-exec-transfer "$__cdist_target_host" "$tmp_exec" +cdist-explorer-run "$__cdist_target_host" "$__cdist_out_explorers" +cdist-manifest-init "$__cdist_target_host" "$__cdist_out_objects" +cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_objects" +cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_objects" "$__cdist_out_execs" +cdist-exec-transfer "$__cdist_target_host" "$__cdist_out_execs" cdist-exec-run "$__cdist_target_host" # FIXME: Create new cache from results # echo rm -rf "$(__cdist_cache_host)" # mkdir -p "$(__cdist_cache_host)" -# mv "$tmp_exp" "$tmp_obj" "$(__cdist_cache_host)" +# mv "$__cdist_out_explorers" "$__cdist_out_objects" "$(__cdist_cache_host)" # Also save last code fragment # mv "$tmp_code" "$(__cdist_cache_host)" diff --git a/conf/types/__issue/manifest b/conf/types/__issue/manifest index f525c2df..735c04c8 100755 --- a/conf/types/__issue/manifest +++ b/conf/types/__issue/manifest @@ -19,16 +19,14 @@ # # -. cdist-config - destination=/etc/issue -case "$__cdist_explorer_os" in +case "$(cat "$__cdist_out_explorers/os")" in archlinux) - source="$(__cdist_type_mydir)/files/archlinux" + source="$(pwd -P)/files/archlinux" ;; *) - source="$(__cdist_type_mydir)/files/default" + source="$(pwd -P)/files/default" ;; esac From 6d38ae5f11d61897461ad0c590c20bd24dd5e084 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 16:50:44 +0100 Subject: [PATCH 0251/6109] shrink hackers readme, allow cdist-deploy-to to be hacked Signed-off-by: Nico Schottelius --- HACKERS_README | 42 +++++++----------------------------------- bin/cdist-deploy-to | 11 ++++++++--- 2 files changed, 15 insertions(+), 38 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index 8efed967..62f55b94 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -23,44 +23,16 @@ eof # Tell the user what we do, so this script makes sense during execution set -x -# Abort on any error -set -e - # prepare use (only from top level directory) export PATH="$PATH:$(pwd -P)/bin" export __cdist_config="$(pwd -P)/conf" -__cdist_out_objects=/tmp/localhost/objects -__cdist_out_explorers=/tmp/localhost/explorers -__cdist_out_execs=/tmp/localhost/exec +# Change paths so we can debug stuff :-) +base=/tmp/localhost +export __cdist_out_objects=${base}/objects +export __cdist_out_explorers=${base}/explorers +export __cdist_out_execs=${base}/exec +cdist-deploy-to localhost -# Run explorer on a "remote" host -cdist-explorer-run localhost "$__cdist_out_explorers" - -# Display result -find "$__cdist_out_explorers" - -# Test first level manifest execution -cdist-manifest-init localhost "$__cdist_out_objects" - -# See what it generated -find "$__cdist_out_objects" - -# Generate all objects, including from types that generate objects as well -cdist-manifest-run-all localhost "$__cdist_out_objects" - -# See what it generated -find "$__cdist_out_objects" - -# Generate code for all objects in object dir -cdist-object-codegen-all localhost "$__cdist_out_objects" "$__cdist_out_execs" - -# Display result, including permissions -ls -lR "$__cdist_out_execs" - -# Transfer generated code -cdist-exec-transfer localhost "$__cdist_out_execs" - -# Execute generated code -cdist-exec-run localhost +find "${base}" diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index d7917b87..6146d961 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -23,13 +23,18 @@ . cdist-config [ $# -eq 1 ] || __cdist_usage "" + set -e __cdist_target_host="$1" -export __cdist_out_explorers="$__cdist_tmp_dir/$__cdist_name_explorer" -export __cdist_out_objects="$__cdist_tmp_dir/$__cdist_name_object" -export __cdist_out_execs="$__cdist_tmp_dir/$__cdist_name_exec" +: ${__cdist_out_explorers:="$__cdist_tmp_dir/$__cdist_name_explorer"} +: ${__cdist_out_objects:="$__cdist_tmp_dir/$__cdist_name_object"} +: ${__cdist_out_execs:="$__cdist_tmp_dir/$__cdist_name_exec"} + +export __cdist_out_explorers +export __cdist_out_objects +export __cdist_out_execs # See cdist-stages(7) cdist-explorer-run "$__cdist_target_host" "$__cdist_out_explorers" From 8d8d7da03638b34cf59efeeb780aff897b99ed43 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 16:54:14 +0100 Subject: [PATCH 0252/6109] cleanup file and issue type Signed-off-by: Nico Schottelius --- conf/types/__file/gencode | 8 +++----- conf/types/__issue/manifest | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/conf/types/__file/gencode b/conf/types/__file/gencode index 6fbafbe6..b95e52a5 100755 --- a/conf/types/__file/gencode +++ b/conf/types/__file/gencode @@ -23,15 +23,12 @@ # . cdist-config -set -e pwd -P >&2 ls >&2 type="$(cat type)" -mode="$(cat mode)" -path="$(cat path)" - +path="$(cat destination)" case "$type" in directory) @@ -49,6 +46,7 @@ case "$type" in esac -if [ "$mode" ]; then +if [ -f mode ]; then + mode="$(cat mode)" echo chmod \"$mode\" \"$path\" fi diff --git a/conf/types/__issue/manifest b/conf/types/__issue/manifest index 735c04c8..5236d447 100755 --- a/conf/types/__issue/manifest +++ b/conf/types/__issue/manifest @@ -31,4 +31,4 @@ case "$(cat "$__cdist_out_explorers/os")" in esac # FIXME: replace id with $destination post-1.0 -__file etc-issue --source "$source" --destination "$destination" +__file etc-issue --source "$source" --destination "$destination" --type file From 145daf87e6123f368accea7407877c6f89237bce Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 17:44:54 +0100 Subject: [PATCH 0253/6109] exit on unset variables Signed-off-by: Nico Schottelius --- bin/cdist-explorer-run | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index bf738355..fcbe2518 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -23,16 +23,12 @@ # . cdist-config - -if [ $# -ne 2 ]; then - __cdist_usage " " -fi +[ $# -eq 2 ] || __cdist_usage " " +set -ue export __cdist_target_host="$1"; shift export __cdist_output_dir="$1"; shift -set -e - # create basedir ssh root@${__cdist_target_host} "mkdir -p \"${__cdist_remote_base_dir}\" \ \"${__cdist_remote_cache_dir}\" \"${__cdist_remote_cache_bin}\" \ From aec77a05ae062ec1ca45653a0564788bdafaf003 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 17:46:18 +0100 Subject: [PATCH 0254/6109] cdist-config broken Signed-off-by: Nico Schottelius --- bin/cdist-config | 11 +++++++++-- bin/cdist-deploy-to | 3 +-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 9e0894f7..49ffd354 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -1,6 +1,6 @@ #!/bin/sh # -# 2010 Nico Schottelius (nico-cdist at schottelius.org) +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -21,6 +21,10 @@ # Print configuration directories - helper for all other scripts # +echo teeeeeeeeeeeeeeeeeees + +# Fail if something bogus is going on +set -u # Values can be overriden from outside, so you can # customise paths as you like (for distributors, geeks and hackers) @@ -55,7 +59,6 @@ # Marks an object finished : ${__cdist_name_object_finished:=.done} - # Base : ${__cdist_config:=/etc/cdist} : ${__cdist_explorer_dir:=$__cdist_config/$__cdist_name_explorer} @@ -71,13 +74,17 @@ # Remote : ${__cdist_remote_base_dir:=/var/lib/cdist} +export __cdist_remote_base_dir : ${__cdist_remote_explorer_dir:=$__cdist_remote_base_dir/$__cdist_name_explorer} export __cdist_remote_explorer_dir : ${__cdist_remote_cache_dir:=$__cdist_remote_base_dir/$__cdist_name_cache} +export __cdist_remote_cache_dir : ${__cdist_remote_cache_explorer:=$__cdist_remote_cache_dir/$__cdist_name_explorer} export __cdist_remote_cache_explorer : ${__cdist_remote_cache_bin:=$__cdist_remote_base_dir/$__cdist_name_bin} +export __cdist_remote_cache_bin : ${__cdist_remote_cache_exec:=$__cdist_remote_base_dir/$__cdist_name_exec} +export __cdist_remote_cache_exec # Tempfiles need to be recreated for each individual script, unshared! __cdist_tmp_dir=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX") diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 6146d961..dab3684b 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -23,8 +23,7 @@ . cdist-config [ $# -eq 1 ] || __cdist_usage "" - -set -e +set -eu __cdist_target_host="$1" From 7a287775557f55c6a2eb9a4118981d8dc879e892 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 18:19:05 +0100 Subject: [PATCH 0255/6109] DO NOT CREATE /usr/bin/cdist-config Signed-off-by: Nico Schottelius --- conf/manifests/init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/manifests/init b/conf/manifests/init index edc380fa..748b5dc2 100755 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -6,7 +6,7 @@ case "$__cdist_target_host" in ikq*|localhost) __file cdist-config --source /home/users/nico/p/cdist/bin/cdist-config \ - --destination /usr/bin/cdist-config \ + --destination /usr/bin/NOT-cdist-config \ --type file __issue iddoesnotmatterhere ;; From 4330f34626d6aeca32e15e7b650c79ddd78d4b91 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Feb 2011 18:22:21 +0100 Subject: [PATCH 0256/6109] HINT Signed-off-by: Nico Schottelius --- doc/internal.REMOVE_PRE_1.0/DO_NOT_DO_AGAIN | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 doc/internal.REMOVE_PRE_1.0/DO_NOT_DO_AGAIN diff --git a/doc/internal.REMOVE_PRE_1.0/DO_NOT_DO_AGAIN b/doc/internal.REMOVE_PRE_1.0/DO_NOT_DO_AGAIN new file mode 100644 index 00000000..23e7173e --- /dev/null +++ b/doc/internal.REMOVE_PRE_1.0/DO_NOT_DO_AGAIN @@ -0,0 +1,2 @@ +DO NOT CREATE cdist-config in a path before path of cdist, +because this renders cdist-config unusable!!!!!!!! From d549b93a48b5d6be69f676b9a2198b623cf99703 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Feb 2011 08:41:24 +0100 Subject: [PATCH 0257/6109] cleanup real readme Signed-off-by: Nico Schottelius --- REAL_README | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/REAL_README b/REAL_README index 5e6de430..2cda9f63 100644 --- a/REAL_README +++ b/REAL_README @@ -1,25 +1,30 @@ +[[!meta title="cdist - configuration management]] + ## Introduction -cdist configures your system. It is similar to -[cfengine](http://www.cfengine.org/) and [puppet](http://www.puppetlabs.com/). -It is inspired by both of those tools: +cdist configures your system and is similar to +other configuration management systems like +[cfengine](http://www.cfengine.org/), +[bcfg2](http://trac.mcs.anl.gov/projects/bcfg2), +[chef](http://wiki.opscode.com/display/chef/) +and [puppet](http://www.puppetlabs.com/), but +it ticks differently: - * Try to redo the great power you get - * But leave out the bugs you also got - -And cdist is UNIX: - -It's designed to -reuse existing tools, -it does not require high level scripting language interpreters -and it is equipped with manpages. + * cdist sticks completly to the KISS (keep it simple and stupid) paradigma + * cdist's core is very small (currently around 400 lines of code) + * There is only one type to extend cdist called ***type***. + * + * cdist is UNIX + * It reuses existing tools like cat, find, mv, ... + * cdist's documentation is bundled as manpages + * cdist is written in POSIX shell + * No special requirements like high level interpreters needed on server or target ### Architecture - * KISS (keep it simple and stupid) - * Allow very easy extension of cdist (creating own types for instance) - * Push (server pushes configuration) and Pull (client retrieves config) supported - * User defines configuration in shell scripts + * Push mode (server pushes configuration) + * Pull mode (client triggers configuration) + * User defines configuration in shell scripts (called ***manifests***) * Cdist generates internal configuration (cconfig style) and afterwards applies configuration ## Requirements From 391c0ab455af884026754b67517b16cbaebe4258 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Feb 2011 08:49:28 +0100 Subject: [PATCH 0258/6109] +" Signed-off-by: Nico Schottelius --- REAL_README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/REAL_README b/REAL_README index 2cda9f63..af35e810 100644 --- a/REAL_README +++ b/REAL_README @@ -1,4 +1,4 @@ -[[!meta title="cdist - configuration management]] +[[!meta title="cdist - configuration management"]] ## Introduction From 0da3483223e24edfbbba1e434c50aa79055dd3a3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Feb 2011 00:01:39 +0100 Subject: [PATCH 0259/6109] begin to cleanup stages document Signed-off-by: Nico Schottelius --- conf/manifests/init | 8 ++++++++ conf/types/__file/cdist_dir.sh | 28 --------------------------- conf/types/__file/parameters/optional | 2 ++ conf/types/__file/parameters/required | 2 -- doc/man/cdist-stages.text | 8 ++++---- 5 files changed, 14 insertions(+), 34 deletions(-) delete mode 100644 conf/types/__file/cdist_dir.sh diff --git a/conf/manifests/init b/conf/manifests/init index 748b5dc2..8c090547 100755 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -10,4 +10,12 @@ case "$__cdist_target_host" in --type file __issue iddoesnotmatterhere ;; + + tee.schottelius.org) + __package qemu-kvm --wtf installed + ;; + + katze*) + __package qemu-kvm --wtf installed + ;; esac diff --git a/conf/types/__file/cdist_dir.sh b/conf/types/__file/cdist_dir.sh deleted file mode 100644 index aa4c4c49..00000000 --- a/conf/types/__file/cdist_dir.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# -# 2010 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 . -# -# - -cdist_dir() -{ - dst="$1"; shift - - # FIXME later: ownership, permissions, recursive - mkdir "${dst}" -} diff --git a/conf/types/__file/parameters/optional b/conf/types/__file/parameters/optional index 17ab372f..de17ffff 100644 --- a/conf/types/__file/parameters/optional +++ b/conf/types/__file/parameters/optional @@ -1 +1,3 @@ mode +source +destination diff --git a/conf/types/__file/parameters/required b/conf/types/__file/parameters/required index 14592dcb..aa80e646 100644 --- a/conf/types/__file/parameters/required +++ b/conf/types/__file/parameters/required @@ -1,3 +1 @@ -source -destination type diff --git a/doc/man/cdist-stages.text b/doc/man/cdist-stages.text index bf7ac1ec..b48fcb44 100644 --- a/doc/man/cdist-stages.text +++ b/doc/man/cdist-stages.text @@ -14,10 +14,10 @@ Starting the execution of deployment with cdist-deploy-to(1), cdist passes through different stages: - First stage: Get information about target - Every existing explorer (see cdist-explorers(7) is run on - the target and the results are copied back into the local - cache (see cdist-cache(7)). These values can be used by - manifests and types. + Every existing explorer is run on the target and the results + are copied back into the local cache. + The results can be used by manifests and types. + See cdist-explorers(7) and see cdist-cache(7). - Second stage: Initial manifest run The initial manifest (see cdist-manifests(7) is run, From 3ebd52fbc79bd9bda14bbaf2f1288bea70ff19b4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Feb 2011 00:07:55 +0100 Subject: [PATCH 0260/6109] more todo post 1.0 Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.0 | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index 32d99614..25867498 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -1,4 +1,20 @@ -Types: +Core: + - Support singletons (see types/issue for a good reason) + - extend cdist_tree_wrapper to look for optional/mandority parameters for types + - gives "good" database, which contains only valid objects + +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 + + +Types to be written: - ssh-keys (host/user) - services - user management @@ -6,8 +22,3 @@ Types: - add_line_to_file_if_not_existing - delete_line_from_file - regexp replace (can probably cover all?) - -Core: - - Support singletons (see types/issue for a good reason) - - extend cdist_tree_wrapper to look for optional/mandority parameters for types - - gives "good" database, which contains only valid objects From 42bcf1c3f8902f081fa438a460791067a74c8b13 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Feb 2011 00:10:07 +0100 Subject: [PATCH 0261/6109] todo: finished 5 stages, go to doc now Signed-off-by: Nico Schottelius --- TODO-1.0 | 4 +--- doc/dev/todo/niconext | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 doc/dev/todo/niconext diff --git a/TODO-1.0 b/TODO-1.0 index 1c739474..175d2f28 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -34,9 +34,7 @@ x generate code to be executed on clients (stage 4) x for one object x for all objects -- execute code on client (stage 5) - - check return codes - - abort on first error? +x execute code on client (stage 5) - Other stuff pre 1.0: - Write some basic types diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext new file mode 100644 index 00000000..473a92cd --- /dev/null +++ b/doc/dev/todo/niconext @@ -0,0 +1,2 @@ +cleanup doc/ and generate manpages +cleanup website From ad127791cded5d9bf3a5c4bce8c9ec7e09414866 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Sat, 19 Feb 2011 01:44:24 +0100 Subject: [PATCH 0262/6109] let HACKERS_README accept target host as argument Signed-off-by: Steven Armstrong --- HACKERS_README | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/HACKERS_README b/HACKERS_README index 62f55b94..48df9258 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -33,6 +33,7 @@ export __cdist_out_objects=${base}/objects export __cdist_out_explorers=${base}/explorers export __cdist_out_execs=${base}/exec -cdist-deploy-to localhost +target="${1:-localhost}" +cdist-deploy-to "$target" find "${base}" From 21ddd6a2a404657583fb82f6907cb612496d0da0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Feb 2011 01:47:10 +0100 Subject: [PATCH 0263/6109] begin to integrate manpage generation in Makefile Signed-off-by: Nico Schottelius --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Makefile b/Makefile index 81d59325..63d35407 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,15 @@ BINDIR=$(PREFIX}/bin WEBDIR=$$HOME/niconetz WEBPAGE=software/cdist.mdwn +MANSRC=doc/man/cdist-config-layout.text doc/man/cdist-config.text \ + doc/man/cdist-deploy-to.text doc/man/cdist-design.text \ + doc/man/cdist-environment.text doc/man/cdist-explorers.text \ + doc/man/cdist-language.text doc/man/cdist-manifests.text \ + doc/man/cdist-quickstart.text doc/man/cdist-stages.text \ + doc/man/cdist-terms.text doc/man/cdist.text \ + doc/man/cdist-types.text + + # FIXME: some distro nerd, can you make this more beautiful? # I'm just a hacker, I don't really care... install: @@ -23,3 +32,6 @@ web: pub: git push --mirror + +man: + echo $(MANSRC) From c3245348b4fd16ccb8fa28d98f36bc169fa87c44 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Feb 2011 01:48:43 +0100 Subject: [PATCH 0264/6109] -todo in cdist-stages Signed-off-by: Nico Schottelius --- doc/man/cdist-stages.text | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/man/cdist-stages.text b/doc/man/cdist-stages.text index b48fcb44..29db1d9b 100644 --- a/doc/man/cdist-stages.text +++ b/doc/man/cdist-stages.text @@ -34,7 +34,7 @@ cdist passes through different stages: You can trigger the first stage part using cdist-manifest-init(1). -- Third stage: Execution of types [TODO] +- Third stage: Execution of types Every object is checked whether its type has an init script (see cdist-types(7)). If the type of the object has an init script, it is run. This init script may @@ -50,7 +50,7 @@ cdist passes through different stages: objects try to create the same object, which indicates a broken configuration. -- Fourth stage: Code generation [TODO] +- Fourth stage: Code generation The "gencode" binary of the types for every existing object is called to generate code that will be executed on the target host. @@ -62,7 +62,7 @@ cdist passes through different stages: A description of what the generated code may/must/should do can be found in cdist-types-gencode(7). -- Fifth stage: [TODO] +- Fifth stage: The resulting code is transferred to the target host and executed, the run of cdist-deploy-to(1) ends. From 6fb75395bc668580ad8b4720b8106f29b53f44ff Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Feb 2011 01:52:32 +0100 Subject: [PATCH 0265/6109] ignore generated manpages Signed-off-by: Nico Schottelius --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a01ee289..b4ec3d44 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .*.swp +doc/man/*.[1-9] From f3600bc5ddb584882d9cce07d2f1a7a4af263d52 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Feb 2011 01:52:46 +0100 Subject: [PATCH 0266/6109] generate first manpage Signed-off-by: Nico Schottelius --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 63d35407..341f2eb5 100644 --- a/Makefile +++ b/Makefile @@ -35,3 +35,4 @@ pub: man: echo $(MANSRC) + a2x -f manpage --no-xmllint doc/man/cdist-stages.text From 0e71028b4bd06d095cf51cc966cd20effdb834bd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Feb 2011 01:53:06 +0100 Subject: [PATCH 0267/6109] begin to create sections in cdist-stages manpage Signed-off-by: Nico Schottelius --- doc/man/cdist-stages.text | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/man/cdist-stages.text b/doc/man/cdist-stages.text index 29db1d9b..7fda6b7e 100644 --- a/doc/man/cdist-stages.text +++ b/doc/man/cdist-stages.text @@ -11,13 +11,17 @@ cdist-stages - How the configuration is built DESCRIPTION ----------- Starting the execution of deployment with cdist-deploy-to(1), -cdist passes through different stages: +cdist passes through different stages, each can be triggered +and debugged on its own. -- First stage: Get information about target - Every existing explorer is run on the target and the results - are copied back into the local cache. - The results can be used by manifests and types. - See cdist-explorers(7) and see cdist-cache(7). +STAGE 1: TARGET INFORMATION RETRIEVAL +-------------------------------------- +In this stage information is collected about target using +so called explorers. +Every existing explorer is run on the target and the output +of all explorers are copied back into the local cache. +The results can be used by manifests and types. +See cdist-explorers(7) and see cdist-cache(7). - Second stage: Initial manifest run The initial manifest (see cdist-manifests(7) is run, From fa1764598e5b57512eb8b7525e070712dee8195f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Feb 2011 02:00:32 +0100 Subject: [PATCH 0268/6109] +sections Signed-off-by: Nico Schottelius --- doc/man/cdist-stages.text | 42 ++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/doc/man/cdist-stages.text b/doc/man/cdist-stages.text index 7fda6b7e..98e42ece 100644 --- a/doc/man/cdist-stages.text +++ b/doc/man/cdist-stages.text @@ -12,7 +12,9 @@ DESCRIPTION ----------- Starting the execution of deployment with cdist-deploy-to(1), cdist passes through different stages, each can be triggered -and debugged on its own. +and debugged on its own. Reading the source of the +cdist-deploy-to script shous the binaries being responsible +for each stage. STAGE 1: TARGET INFORMATION RETRIEVAL -------------------------------------- @@ -21,24 +23,26 @@ so called explorers. Every existing explorer is run on the target and the output of all explorers are copied back into the local cache. The results can be used by manifests and types. -See cdist-explorers(7) and see cdist-cache(7). -- Second stage: Initial manifest run - The initial manifest (see cdist-manifests(7) is run, - which is done by cdist-manifest-init(1). - - This run creates an internal database in cconfig - format (see cdist-config-layout(7), that contains all - objects configured for the specific host. +Related manpages are cdist-explorers(7) and cdist-cache(7). - In this stage, no conflicts may occur, i.e. no - object of the same type with the same id may - be created. - - You can trigger the first stage part using - cdist-manifest-init(1). -- Third stage: Execution of types +STAGE 2: RUN THE INITIAL MANIFEST +--------------------------------- +The initial manifest, which should be used for mappings +of hosts to types, is executed. + +This stage creates objects in a cconfig database that +contains as defined in the manifest for the specific host. + +In this stage, no conflicts may occur, i.e. no object of +the same type with the same id may be created. + +Related manpages are cdist-manifest-init(1), cdist-manifests(7) and +cdist-config-layout(7). + +STAGE 3: EXECUTION OF TYPES +--------------------------- Every object is checked whether its type has an init script (see cdist-types(7)). If the type of the object has an init script, it is run. This init script may @@ -54,7 +58,8 @@ See cdist-explorers(7) and see cdist-cache(7). objects try to create the same object, which indicates a broken configuration. -- Fourth stage: Code generation +STAGE 4: CODE GENERATION +------------------------ The "gencode" binary of the types for every existing object is called to generate code that will be executed on the target host. @@ -66,7 +71,8 @@ See cdist-explorers(7) and see cdist-cache(7). A description of what the generated code may/must/should do can be found in cdist-types-gencode(7). -- Fifth stage: +STAGE 5: CODE EXECUTION +----------------------- The resulting code is transferred to the target host and executed, the run of cdist-deploy-to(1) ends. From 711fea9e7ed2709b9e9b56a69058cb9a753e4b87 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Feb 2011 02:02:21 +0100 Subject: [PATCH 0269/6109] [DOC] cleanups Signed-off-by: Nico Schottelius --- Makefile | 1 + doc/man/cdist-stages.text | 43 ++++++++++++++++++++------------------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 341f2eb5..e56f62c8 100644 --- a/Makefile +++ b/Makefile @@ -36,3 +36,4 @@ pub: man: echo $(MANSRC) a2x -f manpage --no-xmllint doc/man/cdist-stages.text + echo man ./doc/man/cdist-stages.7 diff --git a/doc/man/cdist-stages.text b/doc/man/cdist-stages.text index 98e42ece..960813f6 100644 --- a/doc/man/cdist-stages.text +++ b/doc/man/cdist-stages.text @@ -43,38 +43,39 @@ cdist-config-layout(7). STAGE 3: EXECUTION OF TYPES --------------------------- - Every object is checked whether its type has an init - script (see cdist-types(7)). If the type of the object - has an init script, it is run. This init script may - generate additional objects. +Every object is checked whether its type has an init +script (see cdist-types(7)). If the type of the object +has an init script, it is run. This init script may +generate additional objects. - For instance the object __apache/www.test.ch is of - type __apache, which may contain an init script, which - creates new objects of type __file. +For instance the object __apache/www.test.ch is of +type __apache, which may contain an init script, which +creates new objects of type __file. - The newly created objects are merged back into - the existing tree. No conflicts may occur during - the merge. A conflict would mean that two different - objects try to create the same object, which indicates a - broken configuration. +The newly created objects are merged back into +the existing tree. No conflicts may occur during +the merge. A conflict would mean that two different +objects try to create the same object, which indicates a +broken configuration. STAGE 4: CODE GENERATION ------------------------ - The "gencode" binary of the types for every existing object is - called to generate code that will be executed on the target host. +The "gencode" binary of the types for every existing object is +called to generate code that will be executed on the target host. - This binary should create code to be executed on the target on stdout. +This binary should create code to be executed on the target on stdout. - If the gencode binary fails, it must print diagnostic messages on stderr - and exit non-zero. +If the gencode binary fails, it must print diagnostic messages on stderr +and exit non-zero. - A description of what the generated code may/must/should - do can be found in cdist-types-gencode(7). +A description of what the generated code may/must/should +do can be found in cdist-types-gencode(7). STAGE 5: CODE EXECUTION ----------------------- - The resulting code is transferred to the target host and executed, - the run of cdist-deploy-to(1) ends. + +The resulting code is transferred to the target host and executed, +the run of cdist-deploy-to(1) ends. SEE ALSO From 40e670615c8a4aa6239f3db62de3a5e04dc44b7d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Feb 2011 12:48:26 +0100 Subject: [PATCH 0270/6109] completly finish cdist-stages Signed-off-by: Nico Schottelius --- doc/man/cdist-stages.text | 87 +++++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 41 deletions(-) diff --git a/doc/man/cdist-stages.text b/doc/man/cdist-stages.text index 960813f6..f82f9046 100644 --- a/doc/man/cdist-stages.text +++ b/doc/man/cdist-stages.text @@ -5,77 +5,82 @@ Nico Schottelius NAME ---- -cdist-stages - How the configuration is built +cdist-stages - Stages used during configuration deployment DESCRIPTION ----------- -Starting the execution of deployment with cdist-deploy-to(1), -cdist passes through different stages, each can be triggered -and debugged on its own. Reading the source of the -cdist-deploy-to script shous the binaries being responsible -for each stage. +Starting the execution of deployment with cdist-deploy-to(1), cdist passes +through different stages, each can be triggered and debugged on its own. +Reading the source of the cdist-deploy-to executable shous the scripts +responsible for each stage. + STAGE 1: TARGET INFORMATION RETRIEVAL -------------------------------------- -In this stage information is collected about target using -so called explorers. -Every existing explorer is run on the target and the output -of all explorers are copied back into the local cache. -The results can be used by manifests and types. +In this stage information is collected about target using so called explorers. +Every existing explorer is run on the target and the output of all explorers +are copied back into the local cache. The results can be used by manifests and +types. Related manpages are cdist-explorers(7) and cdist-cache(7). STAGE 2: RUN THE INITIAL MANIFEST --------------------------------- -The initial manifest, which should be used for mappings -of hosts to types, is executed. - -This stage creates objects in a cconfig database that -contains as defined in the manifest for the specific host. - -In this stage, no conflicts may occur, i.e. no object of -the same type with the same id may be created. +The initial manifest, which should be used for mappings of hosts to types, +is executed. This stage creates objects in a cconfig database that contains +the objects as defined in the manifest for the specific host. In this stage, +no conflicts may occur, i.e. no object of the same type with the same id may +be created. Related manpages are cdist-manifest-init(1), cdist-manifests(7) and cdist-config-layout(7). + STAGE 3: EXECUTION OF TYPES --------------------------- -Every object is checked whether its type has an init -script (see cdist-types(7)). If the type of the object -has an init script, it is run. This init script may -generate additional objects. +Every object is checked whether its type has a manifest file. If the type has +a manifest file and it is executable, it will be executed. The manifest script +may generate and change the created objects. In other words, one type can reuse +other types. -For instance the object __apache/www.test.ch is of -type __apache, which may contain an init script, which -creates new objects of type __file. +For instance the object __apache/www.test.ch is of type __apache, which may +contain an manifest script, which creates new objects of type __file. + +The newly created objects are merged back into the existing tree. No conflicts +may occur during the merge. A conflict would mean that two different objects +try to create the same object, which indicates a broken configuration. + +Related manpage are cdist-types(7) and cdist-manifest-run-all(1). -The newly created objects are merged back into -the existing tree. No conflicts may occur during -the merge. A conflict would mean that two different -objects try to create the same object, which indicates a -broken configuration. STAGE 4: CODE GENERATION ------------------------ -The "gencode" binary of the types for every existing object is -called to generate code that will be executed on the target host. +In this stage for every created objects its type is checked whether it has a +gencode script. If the type has a gencode script and it is executable it will +be executed. This executable should create code to be executed on the target +on stdout. If the gencode executable fails, it must print diagnostic messages +on stderr and exit non-zero. -This binary should create code to be executed on the target on stdout. +Related manpages are cdist-types-gencode(7), cdist-gencode(1) and +cdist-gencode-all(1). -If the gencode binary fails, it must print diagnostic messages on stderr -and exit non-zero. - -A description of what the generated code may/must/should -do can be found in cdist-types-gencode(7). STAGE 5: CODE EXECUTION ----------------------- +The resulting code from the previous stage is transferred to the target host +and executed there to apply the configuration changes, -The resulting code is transferred to the target host and executed, -the run of cdist-deploy-to(1) ends. +Related manpages are cdist-exec-transfer(1) and cdist-exec-run(1). + + +SUMMARY +------- +If, and only if, all the stages complete without an errors, the configuration +will be applied to the target. Each stage can also be run individually, though +dependencies for each stage must be fulfilled and thus the stages must be run +in correct order. SEE ALSO From 4dfc7a28cc288cbed04c10637298e2037d13bf6c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Feb 2011 12:50:54 +0100 Subject: [PATCH 0271/6109] +todo/doc Signed-off-by: Nico Schottelius --- TODO-1.0 | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/TODO-1.0 b/TODO-1.0 index 175d2f28..ad94185b 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -11,7 +11,7 @@ x run initial manifest (stage 2) x Create configuration tree from manifest x write binaries, which create the tree when called from manifest (cdist_tree_wrapper) -- be able to run manifest of types (stage 3) +x be able to run manifest of types (stage 3) x Parse configuration tree/objects recursively x can/may types modify tree? -> yes, of everything a type created itself! @@ -22,13 +22,6 @@ x run initial manifest (stage 2) x rename $__object_dir to $__object_base_dir x use $type/manifest instead of $type/init x find $object_id in recursive runner (before merge) - - DOC document "cd $__object_dir, before running manifest" in doc/man/cdist-types.text - - DOC document that $type/manifest is executed for every object/instance - - DOC: types can always access - __cdist_out_objects, __cdist_out_explorers, - __cdist_out_execs - - --> create cdist-variables document? x generate code to be executed on clients (stage 4) x for one object @@ -41,6 +34,7 @@ x execute code on client (stage 5) - file (with directory) - package - doc cleanup for 1.0: + - ensure every file in bin/ has a correspondent manpage - cdist manpage (main manpage) - cleanup following man + their tree: - cdist-language [CLEANUP AND REMOVE] @@ -72,3 +66,10 @@ x execute code on client (stage 5) - create doc/dev/HACKERS_README - Add install target to Makefile - create cdist-config-init to create basic tree + - DOC document "cd $__object_dir, before running manifest" in doc/man/cdist-types.text + - DOC document that $type/manifest is executed for every object/instance + - DOC: types can always access __cdist_out_objects, __cdist_out_explorers, __cdist_out_execs + --> create cdist-variables document? + + - include generation in makefile + From 15fa6f76e6799ca5c3c94cace5904622319e8ef6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Feb 2011 12:58:32 +0100 Subject: [PATCH 0272/6109] -debug from cdist-config Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 -- 1 file changed, 2 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 49ffd354..3d80262e 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -21,8 +21,6 @@ # Print configuration directories - helper for all other scripts # -echo teeeeeeeeeeeeeeeeeees - # Fail if something bogus is going on set -u From e084272f76226a4495087f362ffd7911187d389a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Feb 2011 13:01:28 +0100 Subject: [PATCH 0273/6109] ideas for cdist-quickstart Signed-off-by: Nico Schottelius --- doc/man/cdist-quickstart.text | 39 ++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/doc/man/cdist-quickstart.text b/doc/man/cdist-quickstart.text index 0d447a59..7bc79f52 100644 --- a/doc/man/cdist-quickstart.text +++ b/doc/man/cdist-quickstart.text @@ -1,5 +1,42 @@ -## How to use cdist? +cdist-quickstart(7) +=================== +Nico Schottelius +MAKE cdist-quickstart(1) an put into a script! + +NAME +---- +cdist-quickstart - Make use of cinit in 5 minutes + + +DESCRIPTION +----------- +This document helps you to take the first steps with cdist. +We'll begin to configure the host "localhost" to have two files +in place, /etc/DO-NOT-CHANGE and /root/CDIST-ENABLED-HOST, which +both are used to warn other sysadmins that this system is managed +by configuration management and manual changes may get overwritten. + +Firstly, we create the basic directory structure to hold the +configuration for cdist: + +mkdir -p /etc/cdist/manifests + +# Create + +Cdist uses +kgives you an impression of 0. Create a host specification (/etc/cdist/hosts/**hostname**) 0. Add functionalilty to add 0. Run ***cdist-apply*** + +SEE ALSO +-------- +cdist-config-layout(7) + + +COPYING +------- +Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). +## How to use cdist? From ea128862740331589b7ca5d0ae72011d11fbd2b7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Feb 2011 02:05:53 +0100 Subject: [PATCH 0274/6109] todo change Signed-off-by: Nico Schottelius --- TODO-1.0 | 1 + 1 file changed, 1 insertion(+) diff --git a/TODO-1.0 b/TODO-1.0 index ad94185b..c742e346 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -66,6 +66,7 @@ x execute code on client (stage 5) - create doc/dev/HACKERS_README - Add install target to Makefile - create cdist-config-init to create basic tree + - cdist-type integration! - DOC document "cd $__object_dir, before running manifest" in doc/man/cdist-types.text - DOC document that $type/manifest is executed for every object/instance - DOC: types can always access __cdist_out_objects, __cdist_out_explorers, __cdist_out_execs From 4664643f135949f8f1e00b37e0c562686a8b0e94 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Feb 2011 02:07:56 +0100 Subject: [PATCH 0275/6109] begin to use cdist-quickstart(1) Signed-off-by: Nico Schottelius --- bin/cdist-quickstart | 40 +++++++++++++++++++++++++++++++++++ doc/man/cdist-quickstart.text | 10 ++++----- 2 files changed, 45 insertions(+), 5 deletions(-) create mode 100755 bin/cdist-quickstart diff --git a/bin/cdist-quickstart b/bin/cdist-quickstart new file mode 100755 index 00000000..08868582 --- /dev/null +++ b/bin/cdist-quickstart @@ -0,0 +1,40 @@ +#!/bin/sh +# +# 2010-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 . +# +# +# Give the user an introduction into cdist +# + +. cdist-config +set -eu + +__prompt() +{ + echo "Press enter to continue or ctrl-c to abort" + echo "[Enter]" + read answer +} + +cat << eof + +Welcome to cdist-quickstart, the interactive guide to cdist! + +After you press enter, I'll create the basic directories for you. + +eof diff --git a/doc/man/cdist-quickstart.text b/doc/man/cdist-quickstart.text index 7bc79f52..570aa310 100644 --- a/doc/man/cdist-quickstart.text +++ b/doc/man/cdist-quickstart.text @@ -1,9 +1,7 @@ -cdist-quickstart(7) +cdist-quickstart(1) =================== Nico Schottelius -MAKE cdist-quickstart(1) an put into a script! - NAME ---- cdist-quickstart - Make use of cinit in 5 minutes @@ -17,8 +15,10 @@ in place, /etc/DO-NOT-CHANGE and /root/CDIST-ENABLED-HOST, which both are used to warn other sysadmins that this system is managed by configuration management and manual changes may get overwritten. -Firstly, we create the basic directory structure to hold the -configuration for cdist: +Begin to execute cdist-quickstart, it will show you the steps it +takes and explains what it does: + +% cdist-quickstart mkdir -p /etc/cdist/manifests From ae91df7d0bb89d2b6426bdec2d853e2d38600f32 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Feb 2011 02:10:48 +0100 Subject: [PATCH 0276/6109] re-integrate log directory Signed-off-by: Nico Schottelius --- doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2010-09-25 | 0 doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2010-11-02.steven | 0 doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2010-11-09 | 0 doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2010-11-21 | 0 doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2010-11-29 | 0 doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2010-12-01 | 0 doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2011-01-17 | 0 .../logs/2011-01-18.type-creation | 0 doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2011-01-24 | 0 doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2011-02-03 | 0 doc/dev/logs/README | 1 + doc/{internal.REMOVE_PRE_1.0 => dev}/logs/stevens_ideas | 0 12 files changed, 1 insertion(+) rename doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2010-09-25 (100%) rename doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2010-11-02.steven (100%) rename doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2010-11-09 (100%) rename doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2010-11-21 (100%) rename doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2010-11-29 (100%) rename doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2010-12-01 (100%) rename doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2011-01-17 (100%) rename doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2011-01-18.type-creation (100%) rename doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2011-01-24 (100%) rename doc/{internal.REMOVE_PRE_1.0 => dev}/logs/2011-02-03 (100%) create mode 100644 doc/dev/logs/README rename doc/{internal.REMOVE_PRE_1.0 => dev}/logs/stevens_ideas (100%) diff --git a/doc/internal.REMOVE_PRE_1.0/logs/2010-09-25 b/doc/dev/logs/2010-09-25 similarity index 100% rename from doc/internal.REMOVE_PRE_1.0/logs/2010-09-25 rename to doc/dev/logs/2010-09-25 diff --git a/doc/internal.REMOVE_PRE_1.0/logs/2010-11-02.steven b/doc/dev/logs/2010-11-02.steven similarity index 100% rename from doc/internal.REMOVE_PRE_1.0/logs/2010-11-02.steven rename to doc/dev/logs/2010-11-02.steven diff --git a/doc/internal.REMOVE_PRE_1.0/logs/2010-11-09 b/doc/dev/logs/2010-11-09 similarity index 100% rename from doc/internal.REMOVE_PRE_1.0/logs/2010-11-09 rename to doc/dev/logs/2010-11-09 diff --git a/doc/internal.REMOVE_PRE_1.0/logs/2010-11-21 b/doc/dev/logs/2010-11-21 similarity index 100% rename from doc/internal.REMOVE_PRE_1.0/logs/2010-11-21 rename to doc/dev/logs/2010-11-21 diff --git a/doc/internal.REMOVE_PRE_1.0/logs/2010-11-29 b/doc/dev/logs/2010-11-29 similarity index 100% rename from doc/internal.REMOVE_PRE_1.0/logs/2010-11-29 rename to doc/dev/logs/2010-11-29 diff --git a/doc/internal.REMOVE_PRE_1.0/logs/2010-12-01 b/doc/dev/logs/2010-12-01 similarity index 100% rename from doc/internal.REMOVE_PRE_1.0/logs/2010-12-01 rename to doc/dev/logs/2010-12-01 diff --git a/doc/internal.REMOVE_PRE_1.0/logs/2011-01-17 b/doc/dev/logs/2011-01-17 similarity index 100% rename from doc/internal.REMOVE_PRE_1.0/logs/2011-01-17 rename to doc/dev/logs/2011-01-17 diff --git a/doc/internal.REMOVE_PRE_1.0/logs/2011-01-18.type-creation b/doc/dev/logs/2011-01-18.type-creation similarity index 100% rename from doc/internal.REMOVE_PRE_1.0/logs/2011-01-18.type-creation rename to doc/dev/logs/2011-01-18.type-creation diff --git a/doc/internal.REMOVE_PRE_1.0/logs/2011-01-24 b/doc/dev/logs/2011-01-24 similarity index 100% rename from doc/internal.REMOVE_PRE_1.0/logs/2011-01-24 rename to doc/dev/logs/2011-01-24 diff --git a/doc/internal.REMOVE_PRE_1.0/logs/2011-02-03 b/doc/dev/logs/2011-02-03 similarity index 100% rename from doc/internal.REMOVE_PRE_1.0/logs/2011-02-03 rename to doc/dev/logs/2011-02-03 diff --git a/doc/dev/logs/README b/doc/dev/logs/README new file mode 100644 index 00000000..15c6bf9f --- /dev/null +++ b/doc/dev/logs/README @@ -0,0 +1 @@ +Logfiles of discussions diff --git a/doc/internal.REMOVE_PRE_1.0/logs/stevens_ideas b/doc/dev/logs/stevens_ideas similarity index 100% rename from doc/internal.REMOVE_PRE_1.0/logs/stevens_ideas rename to doc/dev/logs/stevens_ideas From fab863086b2c89a35917ac624dee0e54d1afe724 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Feb 2011 13:14:45 +0100 Subject: [PATCH 0277/6109] -* Signed-off-by: Nico Schottelius --- REAL_README | 1 - 1 file changed, 1 deletion(-) diff --git a/REAL_README b/REAL_README index af35e810..15ec6507 100644 --- a/REAL_README +++ b/REAL_README @@ -13,7 +13,6 @@ it ticks differently: * cdist sticks completly to the KISS (keep it simple and stupid) paradigma * cdist's core is very small (currently around 400 lines of code) * There is only one type to extend cdist called ***type***. - * * cdist is UNIX * It reuses existing tools like cat, find, mv, ... * cdist's documentation is bundled as manpages From 35387cbc6112fb5c28742ad75e11ef165396107a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 11:31:37 +0100 Subject: [PATCH 0278/6109] add __cdist_exec_fail_on_error Signed-off-by: Nico Schottelius --- bin/cdist-config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/cdist-config b/bin/cdist-config index 3d80262e..e0a40505 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -179,6 +179,12 @@ __cdist_object_source() cat "${object_dir}/$__cdist_name_object_source" } +__cdist_exec_fail_on_error() +{ + sh -e -c "$1" +} + + __cdist_tmp_removal() { rm -rf "${__cdist_tmp_dir}" From da8abcb770bbec48812f6e5173b0796cb58f3f0b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 11:33:34 +0100 Subject: [PATCH 0279/6109] -c 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 e0a40505..445c5b32 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -181,7 +181,7 @@ __cdist_object_source() __cdist_exec_fail_on_error() { - sh -e -c "$1" + sh -e "$1" } From 5dcb719844fefbd2881f0482584e51f6720dcdd5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 11:39:23 +0100 Subject: [PATCH 0280/6109] introduce and use __cdist_exec_fail_on_error Signed-off-by: Nico Schottelius --- bin/cdist-config | 3 ++- bin/cdist-manifest-run | 15 ++------------- bin/cdist-object-codegen | 16 +--------------- 3 files changed, 5 insertions(+), 29 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 445c5b32..3a57e56e 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -181,7 +181,8 @@ __cdist_object_source() __cdist_exec_fail_on_error() { - sh -e "$1" + sh -e "$@" + [ "$?" -eq 0 ] || __cdist_exit_err "Error: $1 exited non-zero." } diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 72f01532..38cf9f1b 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -41,17 +41,6 @@ if [ ! -x "${__cdist_manifest}" ]; then __cdist_exit_err "${__cdist_manifest} needs to be executable." fi -mkdir -p "${__cdist_output_dir}" +mkdir -p "${__cdist_output_dir}" || __cdist_exit_err "Cannot create output dir ${__cdist_output_dir}" -# Catch errors ourselves now -set +e - -# Ensure manifest fails if any error exists - FIXME: redundant, cdist-object-codegen -( - set -e - . "${__cdist_manifest}" -); ret=$? - -if [ "$ret" -ne 0 ]; then - __cdist_exit_err "Error: ${__cdist_manifest} exited non-zero." -fi +__cdist_exec_fail_on_error "${__cdist_manifest}" diff --git a/bin/cdist-object-codegen b/bin/cdist-object-codegen index d2bdd550..52006255 100755 --- a/bin/cdist-object-codegen +++ b/bin/cdist-object-codegen @@ -54,19 +54,5 @@ if [ -x "$gencode" ]; then eof - # Catch errors ourself now - set +e - ( - # Ensure manifest fails if something within manifest fails - # And not all manifests need to include set -e themselves - set -e - . "$gencode" - ); ret=$? - -else - ret=0 -fi - -if [ "$ret" -ne 0 ]; then - __cdist_exit_err "Error: $gencode exited non-zero" + __cdist_exec_fail_on_error "$gencode" fi From 8c5a64cd92e73b1bb73f91eb698e76f8e6df0b7f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 11:47:43 +0100 Subject: [PATCH 0281/6109] support manifest args in cdist-manifest-run Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 38cf9f1b..5d617444 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -23,7 +23,7 @@ # . cdist-config -[ $# -eq 3 ] || __cdist_usage " " +[ $# -ge 3 ] || __cdist_usage " [manifest arguments]" set -u export __cdist_target_host="$1"; shift @@ -43,4 +43,4 @@ fi mkdir -p "${__cdist_output_dir}" || __cdist_exit_err "Cannot create output dir ${__cdist_output_dir}" -__cdist_exec_fail_on_error "${__cdist_manifest}" +__cdist_exec_fail_on_error "${__cdist_manifest}" "$@" From 2e0cdf73d98a80476d1559aa35e1abfcb327be57 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 11:54:50 +0100 Subject: [PATCH 0282/6109] add cd to cdist-manifest-run-all Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 35b54e4d..0fbc1791 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -50,7 +50,10 @@ while [ "$__cdist_new_objects_created" = "y" ]; do # Check every object, if we need to run it while read __cdist_object; do + # Full path to current object __cdist_cur_object_dir="$__cdist_object_base_dir/$__cdist_object" + # Only the id + __cdist_object_id="${__cdist_object#*/}" if [ ! -f "${__cdist_cur_object_dir}/$__cdist_name_object_finished" ]; then echo "Working on object ${__cdist_object} ..." @@ -61,7 +64,14 @@ while [ "$__cdist_new_objects_created" = "y" ]; do if [ -x "${__cdist_manifest}" ]; then echo "Executing manifest ${__cdist_manifest} ..." - cdist-manifest-run "$__cdist_target_host" "${__cdist_manifest}" "${__cdist_new_objects_dir}" + + # Safely change directory, convienent for type-writers + ( + cd "$__cdist_cur_object_dir" + cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" \ + "$__cdist_new_objects_dir" "$__cdist_object_id" + ) + __cdist_object_list "${__cdist_new_objects_dir}" > "$__cdist_new_objects_list" # Verify no conflicting objects have been created From f7e18d94ecd9ba27cd8b39954b961d3ac30bcde5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 11:55:11 +0100 Subject: [PATCH 0283/6109] submit object_id in gencode Signed-off-by: Nico Schottelius --- bin/cdist-object-codegen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-object-codegen b/bin/cdist-object-codegen index 52006255..59d73674 100755 --- a/bin/cdist-object-codegen +++ b/bin/cdist-object-codegen @@ -54,5 +54,5 @@ if [ -x "$gencode" ]; then eof - __cdist_exec_fail_on_error "$gencode" + __cdist_exec_fail_on_error "$gencode" "$__cdist_object_id" fi From 568ff05ce5a3b9193cbf67f2641e92cdc1f6d10c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 12:06:38 +0100 Subject: [PATCH 0284/6109] todo: ssh master connection Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.0 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index 25867498..6764c4b0 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -2,6 +2,8 @@ Core: - Support singletons (see types/issue for a good reason) - extend cdist_tree_wrapper to look for optional/mandority parameters for types - gives "good" database, which contains only valid objects + - use ssh with master socket? + - saves connection delay for new connections: -M Type handler: - add dependency parameters to core available for every type @@ -22,3 +24,4 @@ Types to be written: - add_line_to_file_if_not_existing - delete_line_from_file - regexp replace (can probably cover all?) + From f8c8bc94e22327a00fef04aa965ce1aed47912dc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 12:07:31 +0100 Subject: [PATCH 0285/6109] todo: master/doc Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.0 | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index 6764c4b0..b61ccde1 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -4,6 +4,7 @@ Core: - gives "good" database, which contains only valid objects - use ssh with master socket? - saves connection delay for new connections: -M + - hint: http://protempore.net/~calvins/howto/ssh-connection-sharing/ Type handler: - add dependency parameters to core available for every type From 3f94a5c8b505075cdfc51d287b8155a7eac774fd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 12:49:55 +0100 Subject: [PATCH 0286/6109] export / subshell solutions Signed-off-by: Nico Schottelius --- doc/dev/logs/2011-02-22 | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/dev/logs/2011-02-22 diff --git a/doc/dev/logs/2011-02-22 b/doc/dev/logs/2011-02-22 new file mode 100644 index 00000000..186b26c4 --- /dev/null +++ b/doc/dev/logs/2011-02-22 @@ -0,0 +1,7 @@ +Inherit / subshell: + +# + +Shell parameters that are set by variable assignment (see the set special built-in) or from the System Interfaces volume of IEEE Std 1003.1-2001 environment inherited by the shell when it begins (see the export special built-in) + +http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_12 From 78f2431b0302fcaff04a1b8c126ecd4d75f15bf8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 12:57:35 +0100 Subject: [PATCH 0287/6109] remove unecessary manifest in __file Signed-off-by: Nico Schottelius --- conf/types/__file/manifest | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100755 conf/types/__file/manifest diff --git a/conf/types/__file/manifest b/conf/types/__file/manifest deleted file mode 100755 index 1e465edc..00000000 --- a/conf/types/__file/manifest +++ /dev/null @@ -1,24 +0,0 @@ -#!/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 . -# -# - -# Nothing to do, no dependencies on other types - -exit 0 From 63f702ceaed5f8ab1b5faf2ba4c1ae1d1600ab91 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 13:04:41 +0100 Subject: [PATCH 0288/6109] remove slash before marker Signed-off-by: Nico Schottelius --- bin/cdist-config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cdist-config b/bin/cdist-config index 3a57e56e..c4139642 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -158,6 +158,7 @@ __cdist_object_arg() cat "${__cdist_object_base_dir}/${object}/${arg}" } +# Find objects, remove ./ and /MARKER __cdist_object_list() { local basedir="$1"; shift @@ -167,7 +168,7 @@ __cdist_object_list() cd "${basedir}" find . -name "$__cdist_name_object_source" | \ - sed -e "s;$__cdist_name_object_source\$;;" -e 's;^./;;' + sed -e 's;^./;;' -e "s;/$__cdist_name_object_source\$;;" ) } From 68b6f46a91b9ce6d777ca1328d37ad79c83bc209 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 13:07:24 +0100 Subject: [PATCH 0289/6109] cleanup gencode Signed-off-by: Nico Schottelius --- conf/types/__file/gencode | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/conf/types/__file/gencode b/conf/types/__file/gencode index b95e52a5..9d585533 100755 --- a/conf/types/__file/gencode +++ b/conf/types/__file/gencode @@ -22,13 +22,14 @@ # example for typewrites later # -. cdist-config - -pwd -P >&2 -ls >&2 - type="$(cat type)" -path="$(cat destination)" + +# If destination was specified, do not use the id +if [ -f destination ]; then + destination="$(cat destination)" +else + destination="$1" +fi case "$type" in directory) @@ -43,7 +44,6 @@ case "$type" in echo "Unsupported type: \"$type\"" >&2 exit 1 ;; - esac if [ -f mode ]; then From 1f5fee5bad60bb51a8011b822eb867dc25eab48e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 13:09:58 +0100 Subject: [PATCH 0290/6109] always prepend header in gencode Signed-off-by: Nico Schottelius --- bin/cdist-object-codegen | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/bin/cdist-object-codegen b/bin/cdist-object-codegen index 59d73674..6a8549f3 100755 --- a/bin/cdist-object-codegen +++ b/bin/cdist-object-codegen @@ -44,15 +44,11 @@ gencode="$(__cdist_type_gencode "$__cdist_type")" cd "$__cdist_object_dir" -# Call gencode of type with __cdist_object -if [ -x "$gencode" ]; then - # Prepend header to each script - cat << eof +cat << eof # -# Code imported from $gencode +# The following code is imported from output of $gencode # eof - __cdist_exec_fail_on_error "$gencode" "$__cdist_object_id" -fi +[ -x "$gencode" ] || __cdist_exec_fail_on_error "$gencode" "$__cdist_object_id" From 40068d68de6a2b7a734963693e63f45a05a11fa2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 13:18:42 +0100 Subject: [PATCH 0291/6109] s/||/&&/ Signed-off-by: Nico Schottelius --- bin/cdist-object-codegen | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-object-codegen b/bin/cdist-object-codegen index 6a8549f3..ba704693 100755 --- a/bin/cdist-object-codegen +++ b/bin/cdist-object-codegen @@ -51,4 +51,4 @@ cat << eof eof -[ -x "$gencode" ] || __cdist_exec_fail_on_error "$gencode" "$__cdist_object_id" +[ -x "$gencode" ] && __cdist_exec_fail_on_error "$gencode" "$__cdist_object_id" From 824cad532cfe7c7d9a8203a7b761e30b60289c47 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 15:27:06 +0100 Subject: [PATCH 0292/6109] +todo 1.0 Signed-off-by: Nico Schottelius --- TODO-1.0 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TODO-1.0 b/TODO-1.0 index c742e346..8ebdecc0 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -22,6 +22,8 @@ x be able to run manifest of types (stage 3) x rename $__object_dir to $__object_base_dir x use $type/manifest instead of $type/init x find $object_id in recursive runner (before merge) + - move attributes of object to subdir attributes + - run explorers for every object x generate code to be executed on clients (stage 4) x for one object From a69cb997ee436a369ab0f6aa4c683e7bb72c9f5d Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 22 Feb 2011 16:11:07 +0100 Subject: [PATCH 0293/6109] +icarus Signed-off-by: Steven Armstrong --- conf/manifests/init | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/conf/manifests/init b/conf/manifests/init index 8c090547..092c832e 100755 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -18,4 +18,9 @@ case "$__cdist_target_host" in katze*) __package qemu-kvm --wtf installed ;; + + icarus) + __package tree --ensure installed + ;; + esac From e5366650cec777a36b92066ea9773496a9486fa0 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 22 Feb 2011 16:15:50 +0100 Subject: [PATCH 0294/6109] +type:__package Signed-off-by: Steven Armstrong --- conf/types/__package/hints | 5 +++ conf/types/__package/manifest | 46 ++++++++++++++++++++++++ conf/types/__package/parameters/optional | 2 ++ conf/types/__package/parameters/required | 1 + 4 files changed, 54 insertions(+) create mode 100755 conf/types/__package/manifest create mode 100644 conf/types/__package/parameters/optional create mode 100644 conf/types/__package/parameters/required diff --git a/conf/types/__package/hints b/conf/types/__package/hints index 76fbcae6..86282e3b 100644 --- a/conf/types/__package/hints +++ b/conf/types/__package/hints @@ -1,2 +1,7 @@ install/pacman: pacman --noconfirm --noprogressbar -S +-------------------------------------------------------------------------------- + +ensure: What state the package should be in: present | absent | latest | versionstring (1.0.3) +name: The package name as used by the packaging system + diff --git a/conf/types/__package/manifest b/conf/types/__package/manifest new file mode 100755 index 00000000..5ac1ae7b --- /dev/null +++ b/conf/types/__package/manifest @@ -0,0 +1,46 @@ +#!/bin/sh +# +# 2011 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 . +# +# +# __package is an abstract type which dispatches to the lower level +# __package_$name types which do the actual interaction with the packaging +# system. +# + +. cdist-config + +object_id="$1"; shift + +if [ -f type ]; then + type="$(cat type)" +else + # Default to value taken from explorer + type="$(cat $__cdist_out_explorers/pkg_system)" +fi + +set -- "$@" "$object_id" +for property in $(ls .); do + if [ "$property" != "type" ]; then + set -- "$@" "--$property" "$(cat $property)" + fi +done + +__package_$type "$@" + +exit 0 diff --git a/conf/types/__package/parameters/optional b/conf/types/__package/parameters/optional new file mode 100644 index 00000000..d3598a51 --- /dev/null +++ b/conf/types/__package/parameters/optional @@ -0,0 +1,2 @@ +name +type diff --git a/conf/types/__package/parameters/required b/conf/types/__package/parameters/required new file mode 100644 index 00000000..5f0c1c12 --- /dev/null +++ b/conf/types/__package/parameters/required @@ -0,0 +1 @@ +ensure From 81823131b0e2943c6251d8a4b55faf84dec0a10b Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 22 Feb 2011 16:19:02 +0100 Subject: [PATCH 0295/6109] +type:__package_emerge Signed-off-by: Steven Armstrong --- conf/types/__package_emerge/gencode | 38 +++++++++++++++++++ conf/types/__package_emerge/hints | 7 ++++ .../__package_emerge/parameters/optional | 1 + .../__package_emerge/parameters/required | 1 + 4 files changed, 47 insertions(+) create mode 100755 conf/types/__package_emerge/gencode create mode 100644 conf/types/__package_emerge/hints create mode 100644 conf/types/__package_emerge/parameters/optional create mode 100644 conf/types/__package_emerge/parameters/required diff --git a/conf/types/__package_emerge/gencode b/conf/types/__package_emerge/gencode new file mode 100755 index 00000000..e4313c5c --- /dev/null +++ b/conf/types/__package_emerge/gencode @@ -0,0 +1,38 @@ +#!/bin/sh +# +# 2011 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 . +# +# +# Manage packages on gentoo. +# + +. cdist-config + +object_id="$1"; shift + +if [ -f name ]; then + name="$(cat name)" +else + name="$object_id" +fi + + +# FIXME: super simple proof of concept +echo "emerge -q \"$name\"" + +exit 0 diff --git a/conf/types/__package_emerge/hints b/conf/types/__package_emerge/hints new file mode 100644 index 00000000..86282e3b --- /dev/null +++ b/conf/types/__package_emerge/hints @@ -0,0 +1,7 @@ +install/pacman: +pacman --noconfirm --noprogressbar -S +-------------------------------------------------------------------------------- + +ensure: What state the package should be in: present | absent | latest | versionstring (1.0.3) +name: The package name as used by the packaging system + diff --git a/conf/types/__package_emerge/parameters/optional b/conf/types/__package_emerge/parameters/optional new file mode 100644 index 00000000..f121bdbf --- /dev/null +++ b/conf/types/__package_emerge/parameters/optional @@ -0,0 +1 @@ +name diff --git a/conf/types/__package_emerge/parameters/required b/conf/types/__package_emerge/parameters/required new file mode 100644 index 00000000..5f0c1c12 --- /dev/null +++ b/conf/types/__package_emerge/parameters/required @@ -0,0 +1 @@ +ensure From a00490e86cc3dfc875e55769719ed4e615055f4c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 17:13:59 +0100 Subject: [PATCH 0296/6109] nicos next stuff todo Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 473a92cd..099464f1 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,2 +1 @@ -cleanup doc/ and generate manpages -cleanup website +add explorers per type/object From 00220332a585acfa5e4c18d54d24be6d85caccdf Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 17:25:31 +0100 Subject: [PATCH 0297/6109] simplify manifests/init Signed-off-by: Nico Schottelius --- conf/manifests/init | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/conf/manifests/init b/conf/manifests/init index 8c090547..a64be309 100755 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -2,20 +2,15 @@ # This is a sample manifest, but used in real world # +# All systems get a file /etc/cdist-managed, so the sysadmin knows +# who manages the configuration. +__file /etc/cdist-managed --type file + # All ikqs get a sample file case "$__cdist_target_host" in - ikq*|localhost) - __file cdist-config --source /home/users/nico/p/cdist/bin/cdist-config \ - --destination /usr/bin/NOT-cdist-config \ - --type file + localhost) __issue iddoesnotmatterhere - ;; - - tee.schottelius.org) - __package qemu-kvm --wtf installed - ;; - - katze*) __package qemu-kvm --wtf installed + __package tftpd-hpa --fancyoption installed ;; esac From 2d7f155d1d86e6d847a3ba955ae5d7fdb4487a44 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 20:22:58 +0100 Subject: [PATCH 0298/6109] add template for bin/cdist-explorer-run-global Signed-off-by: Nico Schottelius --- bin/cdist-explorer-run-global | 86 +++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100755 bin/cdist-explorer-run-global diff --git a/bin/cdist-explorer-run-global b/bin/cdist-explorer-run-global new file mode 100755 index 00000000..e2bb7f41 --- /dev/null +++ b/bin/cdist-explorer-run-global @@ -0,0 +1,86 @@ +#!/bin/sh +# +# 2010-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 . +# +# +# Run the global explorers, i.e. not bound to types +# + +. cdist-config +[ $# -eq 2 ] || __cdist_usage " " +set -ue + +export __cdist_target_host="$1"; shift +export __cdist_output_dir="$1"; shift + +# create basedir +ssh root@${__cdist_target_host} "mkdir -p \"${__cdist_remote_base_dir}\" \ + \"${__cdist_remote_cache_dir}\" \"${__cdist_remote_cache_bin}\" \ + \"${__cdist_remote_cache_explorer}\"" + +# Transfer all explorers to the target dir - must be one level above, so +# coyping it multiple times works: a -> remote:/base/ = remote:/base/a vs. +# a -> remote:/base/a = remote:/base/a/a (second copy) + +# FIXME: enable -q as soon as the code is cleaned up +scp -r "${__cdist_explorer_dir}" \ + "root@${__cdist_target_host}:${__cdist_remote_base_dir}" + +# Transfer cdist binaries - FIXME: should transfer all (needed?) of them! +scp "$(which cdist-explorer-coordinator)" "$(which cdist-config)" \ + "root@${__cdist_target_host}:${__cdist_remote_cache_bin}" + +# Execute explorer coordinator, which will save results on target +ssh root@${__cdist_target_host} \ + "PATH=\"${__cdist_remote_cache_bin}:\$PATH\" + \"${__cdist_remote_cache_bin}/cdist-explorer-coordinator\" \ + \"${__cdist_remote_explorer_dir}\" \"${__cdist_remote_cache_explorer}\"" + +# Ensure local destination directory exists +mkdir -p "$__cdist_output_dir" + +# FIXME: enable -q as soon as the code is cleaned up +# Transfer back all results - FIXME: Add 2 level cache, so old version is kept until success +scp -r "root@${__cdist_target_host}:${__cdist_remote_cache_explorer}/*" \ + "$__cdist_output_dir" + + +exit 0 + +# -------------------------------------------------------------------------------- +# old idea with shell scripts (also sexy) +# Keep until above version successfully works + + +cd "${__cdist_explorer_dir}" +ls > "${__cdist_tmp_file}" + +# first load all functions +while read funcfull; do + cat "${funcfull}" +done < "${__cdist_tmp_file}" + +# then execute functions +while read funcfull; do + sh="${funcfull##*/}" + func="${sh%.sh}" + var="__$func" + + echo "$var=\"\$($func)\"" + echo "echo $var=\\\"\$$var\\\"" +done < "${CDIST_TMP}" From b6a143143df0b5bfc163fe3fe0bee00d4e5a44ab Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 20:40:54 +0100 Subject: [PATCH 0299/6109] cleanup + introduce __cdist_remote_user Signed-off-by: Nico Schottelius --- bin/cdist-config | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index c4139642..dc0d423d 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -27,7 +27,7 @@ set -u # Values can be overriden from outside, so you can # customise paths as you like (for distributors, geeks and hackers) -# Names +# Names / Constants : ${__cdist_name_bin:=bin} : ${__cdist_name_cache:=cache} : ${__cdist_name_code:=code} @@ -69,8 +69,14 @@ set -u : ${__cdist_cache_hosts:=$__cdist_cache_dir/$__cdist_name_host} : ${__cdist_cache_bin:=$__cdist_cache_dir/$__cdist_name_bin} +# Used for IDs +__cdist_sane_regexp='[A-Za-z0-9]*[-A-Za-z0-9_]*' # Remote + +# Default remote user +: ${__cdist_remote_user:=root} + : ${__cdist_remote_base_dir:=/var/lib/cdist} export __cdist_remote_base_dir : ${__cdist_remote_explorer_dir:=$__cdist_remote_base_dir/$__cdist_name_explorer} @@ -98,12 +104,6 @@ __cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" __cdist_myname=${0##*/}; __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" - -################################################################################ -# Other constants - -# Used for IDs -__cdist_sane_regexp='[A-Za-z0-9]*[-A-Za-z0-9_]*' ################################################################################ # Function list # From dfca442267ff3ef39ab7c1a745519b1ce76990ca Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 21:11:18 +0100 Subject: [PATCH 0300/6109] begin to create a general cdist-explorer-run Signed-off-by: Nico Schottelius --- bin/cdist-explorer-run | 45 +++++++++++++++++++++++++---------- bin/cdist-explorer-run-global | 1 + 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index fcbe2518..494c8c42 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -23,25 +23,44 @@ # . cdist-config -[ $# -eq 2 ] || __cdist_usage " " +if [ $# -ne 5 ]; then + __cdist_usage " " +fi set -ue export __cdist_target_host="$1"; shift -export __cdist_output_dir="$1"; shift +export __cdist_local_src_dir="$1"; shift +export __cdist_local_dst_dir="$1"; shift +export __cdist_remote_src_dir="$1"; shift +export __cdist_remote_dst_dir="$1"; shift + +################################################################################ +# New code +# + +# Create remote source and destination directory +ssh "${__cdist_remote_user}@${__cdist_target_host}" \ + "mkdir -p \"${__cdist_remote_src_dir}\" \ + \"${__cdist_remote_dst_dir}\"" + +# Copy explorers to remote source directory +# FIXME: enable -q as soon as the code is cleaned up +scp "${__cdist_src_dir}"/* \ + "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" + +# Execute explorers and save results in remote destination directory + +# Copy results back to us + +################################################################################ +# Old code +# # create basedir -ssh root@${__cdist_target_host} "mkdir -p \"${__cdist_remote_base_dir}\" \ - \"${__cdist_remote_cache_dir}\" \"${__cdist_remote_cache_bin}\" \ - \"${__cdist_remote_cache_explorer}\"" - # Transfer all explorers to the target dir - must be one level above, so # coyping it multiple times works: a -> remote:/base/ = remote:/base/a vs. # a -> remote:/base/a = remote:/base/a/a (second copy) -# FIXME: enable -q as soon as the code is cleaned up -scp -r "${__cdist_explorer_dir}" \ - "root@${__cdist_target_host}:${__cdist_remote_base_dir}" - # Transfer cdist binaries - FIXME: should transfer all (needed?) of them! scp "$(which cdist-explorer-coordinator)" "$(which cdist-config)" \ "root@${__cdist_target_host}:${__cdist_remote_cache_bin}" @@ -53,12 +72,12 @@ ssh root@${__cdist_target_host} \ \"${__cdist_remote_explorer_dir}\" \"${__cdist_remote_cache_explorer}\"" # Ensure local destination directory exists -mkdir -p "$__cdist_output_dir" +mkdir -p "$__cdist_local_dst_dir" # FIXME: enable -q as soon as the code is cleaned up # Transfer back all results - FIXME: Add 2 level cache, so old version is kept until success scp -r "root@${__cdist_target_host}:${__cdist_remote_cache_explorer}/*" \ - "$__cdist_output_dir" + "$__cdist_local_dst_dir" exit 0 @@ -68,7 +87,7 @@ exit 0 # Keep until above version successfully works -cd "${__cdist_explorer_dir}" +cd "${__cdist_src_dir}" ls > "${__cdist_tmp_file}" # first load all functions diff --git a/bin/cdist-explorer-run-global b/bin/cdist-explorer-run-global index e2bb7f41..e4dc8cd1 100755 --- a/bin/cdist-explorer-run-global +++ b/bin/cdist-explorer-run-global @@ -28,6 +28,7 @@ set -ue export __cdist_target_host="$1"; shift export __cdist_output_dir="$1"; shift + # create basedir ssh root@${__cdist_target_host} "mkdir -p \"${__cdist_remote_base_dir}\" \ \"${__cdist_remote_cache_dir}\" \"${__cdist_remote_cache_bin}\" \ From 3a015dc39af698577aa11f6a3c8919cb3be5a0e5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 21:18:43 +0100 Subject: [PATCH 0301/6109] integrate bin/cdist-explorer-coordinator into cdist-explorer-run Signed-off-by: Nico Schottelius --- bin/cdist-explorer-coordinator | 36 ---------------------------------- bin/cdist-explorer-run | 6 ++++++ 2 files changed, 6 insertions(+), 36 deletions(-) delete mode 100755 bin/cdist-explorer-coordinator diff --git a/bin/cdist-explorer-coordinator b/bin/cdist-explorer-coordinator deleted file mode 100755 index 8556dbd9..00000000 --- a/bin/cdist-explorer-coordinator +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# 2010-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 . -# -# -# Coordinate run of explorers on target (this script runs on the target) -# - -. cdist-config - -[ $# -eq 2 ] || __cdist_usage " " - -set -e - -explorer_dir="$1"; shift -result_dir="$1"; shift - -cd "${explorer_dir}" -for explorer in *; do - "./$explorer" > "${result_dir}/${explorer}" -done diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index 494c8c42..2329c9c7 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -46,6 +46,12 @@ ssh "${__cdist_remote_user}@${__cdist_target_host}" \ # Copy explorers to remote source directory # FIXME: enable -q as soon as the code is cleaned up + +cd "${explorer_dir}" +for explorer in *; do + "./$explorer" > "${result_dir}/${explorer}" +done + scp "${__cdist_src_dir}"/* \ "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" From 2a8b20b11ac4db8323087b9dc2a672b9729a1508 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 21:34:05 +0100 Subject: [PATCH 0302/6109] finish generic cdist-explorer-run Signed-off-by: Nico Schottelius --- bin/cdist-explorer-run | 73 ++++++++---------------------------------- 1 file changed, 13 insertions(+), 60 deletions(-) diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index 2329c9c7..e695424b 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -44,69 +44,22 @@ ssh "${__cdist_remote_user}@${__cdist_target_host}" \ "mkdir -p \"${__cdist_remote_src_dir}\" \ \"${__cdist_remote_dst_dir}\"" -# Copy explorers to remote source directory -# FIXME: enable -q as soon as the code is cleaned up - -cd "${explorer_dir}" -for explorer in *; do - "./$explorer" > "${result_dir}/${explorer}" -done - -scp "${__cdist_src_dir}"/* \ - "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" - -# Execute explorers and save results in remote destination directory - -# Copy results back to us - -################################################################################ -# Old code -# -# create basedir -# Transfer all explorers to the target dir - must be one level above, so -# coyping it multiple times works: a -> remote:/base/ = remote:/base/a vs. -# a -> remote:/base/a = remote:/base/a/a (second copy) - -# Transfer cdist binaries - FIXME: should transfer all (needed?) of them! -scp "$(which cdist-explorer-coordinator)" "$(which cdist-config)" \ - "root@${__cdist_target_host}:${__cdist_remote_cache_bin}" - -# Execute explorer coordinator, which will save results on target -ssh root@${__cdist_target_host} \ - "PATH=\"${__cdist_remote_cache_bin}:\$PATH\" - \"${__cdist_remote_cache_bin}/cdist-explorer-coordinator\" \ - \"${__cdist_remote_explorer_dir}\" \"${__cdist_remote_cache_explorer}\"" - # Ensure local destination directory exists mkdir -p "$__cdist_local_dst_dir" # FIXME: enable -q as soon as the code is cleaned up -# Transfer back all results - FIXME: Add 2 level cache, so old version is kept until success -scp -r "root@${__cdist_target_host}:${__cdist_remote_cache_explorer}/*" \ - "$__cdist_local_dst_dir" +cd "${__cdist_local_src_dir}" +for explorer in *; do + # Copy explorers to remote source directory + scp "${explorer}" \ + "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" + # Execute explorers and save results in remote destination directory + ssh "${__cdist_remote_user}@${__cdist_target_host}" \ + "\"${__cdist_remote_src_dir}/$explorer\" > \ + \"${__cdist_remote_dst_dir}/${explorer}\"" -exit 0 - -# -------------------------------------------------------------------------------- -# old idea with shell scripts (also sexy) -# Keep until above version successfully works - - -cd "${__cdist_src_dir}" -ls > "${__cdist_tmp_file}" - -# first load all functions -while read funcfull; do - cat "${funcfull}" -done < "${__cdist_tmp_file}" - -# then execute functions -while read funcfull; do - sh="${funcfull##*/}" - func="${sh%.sh}" - var="__$func" - - echo "$var=\"\$($func)\"" - echo "echo $var=\\\"\$$var\\\"" -done < "${CDIST_TMP}" + # Copy results back to us + scp "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_dst_dir}/${explorer}" \ + "$__cdist_local_dst_dir/$explorer" +done From b556ab557d3447a1f413de568ed6e31bc51d8415 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 21:34:41 +0100 Subject: [PATCH 0303/6109] rename cdist-explorer-run-global -> cdist-explorer-run-init Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 2 +- bin/{cdist-explorer-run-global => cdist-explorer-run-init} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename bin/{cdist-explorer-run-global => cdist-explorer-run-init} (100%) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index dab3684b..2744c7c5 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -36,7 +36,7 @@ export __cdist_out_objects export __cdist_out_execs # See cdist-stages(7) -cdist-explorer-run "$__cdist_target_host" "$__cdist_out_explorers" +cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorers" cdist-manifest-init "$__cdist_target_host" "$__cdist_out_objects" cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_objects" cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_objects" "$__cdist_out_execs" diff --git a/bin/cdist-explorer-run-global b/bin/cdist-explorer-run-init similarity index 100% rename from bin/cdist-explorer-run-global rename to bin/cdist-explorer-run-init From 5a0f7d6a0ec7c142e00ff4d2af119475338de8b3 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 22 Feb 2011 22:16:01 +0100 Subject: [PATCH 0304/6109] need non-error exit code in cdist-object-codegen or it stops the whole execution chain Signed-off-by: Steven Armstrong --- bin/cdist-object-codegen | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/cdist-object-codegen b/bin/cdist-object-codegen index ba704693..28886f20 100755 --- a/bin/cdist-object-codegen +++ b/bin/cdist-object-codegen @@ -52,3 +52,7 @@ cat << eof eof [ -x "$gencode" ] && __cdist_exec_fail_on_error "$gencode" "$__cdist_object_id" + +# Ensure non-error exit status +exit 0 + From 30919f126bf90f47ce69a591f22d0d7d4e64ac5a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 22:40:34 +0100 Subject: [PATCH 0305/6109] exit 0, but warn if gencode is not executable Signed-off-by: Nico Schottelius --- bin/cdist-object-codegen | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/cdist-object-codegen b/bin/cdist-object-codegen index 28886f20..ce0c1073 100755 --- a/bin/cdist-object-codegen +++ b/bin/cdist-object-codegen @@ -51,8 +51,13 @@ cat << eof eof -[ -x "$gencode" ] && __cdist_exec_fail_on_error "$gencode" "$__cdist_object_id" - -# Ensure non-error exit status -exit 0 +if [ -x "$gencode" ]; then + __cdist_exec_fail_on_error "$gencode" "$__cdist_object_id" +else + if [ -f "$gencode" ]; then + echo "$gencode" exists, but is not executable >&2 + fi + # No gencode? also fine! Ensure we exit 0 + exit 0 +fi From 0658ad06c38e23ee6e7ec41a3fcca5fc334aa7ac Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 23:07:01 +0100 Subject: [PATCH 0306/6109] Revert "rename cdist-explorer-run-global -> cdist-explorer-run-init" Do not begin new features that break in master branch. This reverts commit b556ab557d3447a1f413de568ed6e31bc51d8415. --- bin/cdist-deploy-to | 2 +- bin/{cdist-explorer-run-init => cdist-explorer-run-global} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename bin/{cdist-explorer-run-init => cdist-explorer-run-global} (100%) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 2744c7c5..dab3684b 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -36,7 +36,7 @@ export __cdist_out_objects export __cdist_out_execs # See cdist-stages(7) -cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorers" +cdist-explorer-run "$__cdist_target_host" "$__cdist_out_explorers" cdist-manifest-init "$__cdist_target_host" "$__cdist_out_objects" cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_objects" cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_objects" "$__cdist_out_execs" diff --git a/bin/cdist-explorer-run-init b/bin/cdist-explorer-run-global similarity index 100% rename from bin/cdist-explorer-run-init rename to bin/cdist-explorer-run-global From c429177db46854d85c3dda5924bf1be50a150dde Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 23:07:54 +0100 Subject: [PATCH 0307/6109] Revert "finish generic cdist-explorer-run" Do not begin new features in master branch. This reverts commit 2a8b20b11ac4db8323087b9dc2a672b9729a1508. --- bin/cdist-explorer-run | 73 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 60 insertions(+), 13 deletions(-) diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index e695424b..2329c9c7 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -44,22 +44,69 @@ ssh "${__cdist_remote_user}@${__cdist_target_host}" \ "mkdir -p \"${__cdist_remote_src_dir}\" \ \"${__cdist_remote_dst_dir}\"" +# Copy explorers to remote source directory +# FIXME: enable -q as soon as the code is cleaned up + +cd "${explorer_dir}" +for explorer in *; do + "./$explorer" > "${result_dir}/${explorer}" +done + +scp "${__cdist_src_dir}"/* \ + "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" + +# Execute explorers and save results in remote destination directory + +# Copy results back to us + +################################################################################ +# Old code +# +# create basedir +# Transfer all explorers to the target dir - must be one level above, so +# coyping it multiple times works: a -> remote:/base/ = remote:/base/a vs. +# a -> remote:/base/a = remote:/base/a/a (second copy) + +# Transfer cdist binaries - FIXME: should transfer all (needed?) of them! +scp "$(which cdist-explorer-coordinator)" "$(which cdist-config)" \ + "root@${__cdist_target_host}:${__cdist_remote_cache_bin}" + +# Execute explorer coordinator, which will save results on target +ssh root@${__cdist_target_host} \ + "PATH=\"${__cdist_remote_cache_bin}:\$PATH\" + \"${__cdist_remote_cache_bin}/cdist-explorer-coordinator\" \ + \"${__cdist_remote_explorer_dir}\" \"${__cdist_remote_cache_explorer}\"" + # Ensure local destination directory exists mkdir -p "$__cdist_local_dst_dir" # FIXME: enable -q as soon as the code is cleaned up -cd "${__cdist_local_src_dir}" -for explorer in *; do - # Copy explorers to remote source directory - scp "${explorer}" \ - "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" +# Transfer back all results - FIXME: Add 2 level cache, so old version is kept until success +scp -r "root@${__cdist_target_host}:${__cdist_remote_cache_explorer}/*" \ + "$__cdist_local_dst_dir" - # Execute explorers and save results in remote destination directory - ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "\"${__cdist_remote_src_dir}/$explorer\" > \ - \"${__cdist_remote_dst_dir}/${explorer}\"" - # Copy results back to us - scp "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_dst_dir}/${explorer}" \ - "$__cdist_local_dst_dir/$explorer" -done +exit 0 + +# -------------------------------------------------------------------------------- +# old idea with shell scripts (also sexy) +# Keep until above version successfully works + + +cd "${__cdist_src_dir}" +ls > "${__cdist_tmp_file}" + +# first load all functions +while read funcfull; do + cat "${funcfull}" +done < "${__cdist_tmp_file}" + +# then execute functions +while read funcfull; do + sh="${funcfull##*/}" + func="${sh%.sh}" + var="__$func" + + echo "$var=\"\$($func)\"" + echo "echo $var=\\\"\$$var\\\"" +done < "${CDIST_TMP}" From 6ba577b3fd9889faf9da15913191663f1212ee53 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 23:08:13 +0100 Subject: [PATCH 0308/6109] Revert "integrate bin/cdist-explorer-coordinator into cdist-explorer-run" Do not begin new features in master branch. This reverts commit 3a015dc39af698577aa11f6a3c8919cb3be5a0e5. --- bin/cdist-explorer-coordinator | 36 ++++++++++++++++++++++++++++++++++ bin/cdist-explorer-run | 6 ------ 2 files changed, 36 insertions(+), 6 deletions(-) create mode 100755 bin/cdist-explorer-coordinator diff --git a/bin/cdist-explorer-coordinator b/bin/cdist-explorer-coordinator new file mode 100755 index 00000000..8556dbd9 --- /dev/null +++ b/bin/cdist-explorer-coordinator @@ -0,0 +1,36 @@ +#!/bin/sh +# +# 2010-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 . +# +# +# Coordinate run of explorers on target (this script runs on the target) +# + +. cdist-config + +[ $# -eq 2 ] || __cdist_usage " " + +set -e + +explorer_dir="$1"; shift +result_dir="$1"; shift + +cd "${explorer_dir}" +for explorer in *; do + "./$explorer" > "${result_dir}/${explorer}" +done diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index 2329c9c7..494c8c42 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -46,12 +46,6 @@ ssh "${__cdist_remote_user}@${__cdist_target_host}" \ # Copy explorers to remote source directory # FIXME: enable -q as soon as the code is cleaned up - -cd "${explorer_dir}" -for explorer in *; do - "./$explorer" > "${result_dir}/${explorer}" -done - scp "${__cdist_src_dir}"/* \ "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" From c14df05fbe4e56a3e4ebb5612009c96bc00e4c53 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 23:08:19 +0100 Subject: [PATCH 0309/6109] Revert "begin to create a general cdist-explorer-run" Do not begin new features in master branch. This reverts commit dfca442267ff3ef39ab7c1a745519b1ce76990ca. --- bin/cdist-explorer-run | 45 ++++++++++------------------------- bin/cdist-explorer-run-global | 1 - 2 files changed, 13 insertions(+), 33 deletions(-) diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index 494c8c42..fcbe2518 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -23,44 +23,25 @@ # . cdist-config -if [ $# -ne 5 ]; then - __cdist_usage " " -fi +[ $# -eq 2 ] || __cdist_usage " " set -ue export __cdist_target_host="$1"; shift +export __cdist_output_dir="$1"; shift -export __cdist_local_src_dir="$1"; shift -export __cdist_local_dst_dir="$1"; shift -export __cdist_remote_src_dir="$1"; shift -export __cdist_remote_dst_dir="$1"; shift - -################################################################################ -# New code -# - -# Create remote source and destination directory -ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "mkdir -p \"${__cdist_remote_src_dir}\" \ - \"${__cdist_remote_dst_dir}\"" - -# Copy explorers to remote source directory -# FIXME: enable -q as soon as the code is cleaned up -scp "${__cdist_src_dir}"/* \ - "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" - -# Execute explorers and save results in remote destination directory - -# Copy results back to us - -################################################################################ -# Old code -# # create basedir +ssh root@${__cdist_target_host} "mkdir -p \"${__cdist_remote_base_dir}\" \ + \"${__cdist_remote_cache_dir}\" \"${__cdist_remote_cache_bin}\" \ + \"${__cdist_remote_cache_explorer}\"" + # Transfer all explorers to the target dir - must be one level above, so # coyping it multiple times works: a -> remote:/base/ = remote:/base/a vs. # a -> remote:/base/a = remote:/base/a/a (second copy) +# FIXME: enable -q as soon as the code is cleaned up +scp -r "${__cdist_explorer_dir}" \ + "root@${__cdist_target_host}:${__cdist_remote_base_dir}" + # Transfer cdist binaries - FIXME: should transfer all (needed?) of them! scp "$(which cdist-explorer-coordinator)" "$(which cdist-config)" \ "root@${__cdist_target_host}:${__cdist_remote_cache_bin}" @@ -72,12 +53,12 @@ ssh root@${__cdist_target_host} \ \"${__cdist_remote_explorer_dir}\" \"${__cdist_remote_cache_explorer}\"" # Ensure local destination directory exists -mkdir -p "$__cdist_local_dst_dir" +mkdir -p "$__cdist_output_dir" # FIXME: enable -q as soon as the code is cleaned up # Transfer back all results - FIXME: Add 2 level cache, so old version is kept until success scp -r "root@${__cdist_target_host}:${__cdist_remote_cache_explorer}/*" \ - "$__cdist_local_dst_dir" + "$__cdist_output_dir" exit 0 @@ -87,7 +68,7 @@ exit 0 # Keep until above version successfully works -cd "${__cdist_src_dir}" +cd "${__cdist_explorer_dir}" ls > "${__cdist_tmp_file}" # first load all functions diff --git a/bin/cdist-explorer-run-global b/bin/cdist-explorer-run-global index e4dc8cd1..e2bb7f41 100755 --- a/bin/cdist-explorer-run-global +++ b/bin/cdist-explorer-run-global @@ -28,7 +28,6 @@ set -ue export __cdist_target_host="$1"; shift export __cdist_output_dir="$1"; shift - # create basedir ssh root@${__cdist_target_host} "mkdir -p \"${__cdist_remote_base_dir}\" \ \"${__cdist_remote_cache_dir}\" \"${__cdist_remote_cache_bin}\" \ From 2aa4487038bbcaa389d11f42dd861448df22def3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 23:08:23 +0100 Subject: [PATCH 0310/6109] Revert "add template for bin/cdist-explorer-run-global" Do not begin new features in master branch. This reverts commit 2d7f155d1d86e6d847a3ba955ae5d7fdb4487a44. --- bin/cdist-explorer-run-global | 86 ----------------------------------- 1 file changed, 86 deletions(-) delete mode 100755 bin/cdist-explorer-run-global diff --git a/bin/cdist-explorer-run-global b/bin/cdist-explorer-run-global deleted file mode 100755 index e2bb7f41..00000000 --- a/bin/cdist-explorer-run-global +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/sh -# -# 2010-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 . -# -# -# Run the global explorers, i.e. not bound to types -# - -. cdist-config -[ $# -eq 2 ] || __cdist_usage " " -set -ue - -export __cdist_target_host="$1"; shift -export __cdist_output_dir="$1"; shift - -# create basedir -ssh root@${__cdist_target_host} "mkdir -p \"${__cdist_remote_base_dir}\" \ - \"${__cdist_remote_cache_dir}\" \"${__cdist_remote_cache_bin}\" \ - \"${__cdist_remote_cache_explorer}\"" - -# Transfer all explorers to the target dir - must be one level above, so -# coyping it multiple times works: a -> remote:/base/ = remote:/base/a vs. -# a -> remote:/base/a = remote:/base/a/a (second copy) - -# FIXME: enable -q as soon as the code is cleaned up -scp -r "${__cdist_explorer_dir}" \ - "root@${__cdist_target_host}:${__cdist_remote_base_dir}" - -# Transfer cdist binaries - FIXME: should transfer all (needed?) of them! -scp "$(which cdist-explorer-coordinator)" "$(which cdist-config)" \ - "root@${__cdist_target_host}:${__cdist_remote_cache_bin}" - -# Execute explorer coordinator, which will save results on target -ssh root@${__cdist_target_host} \ - "PATH=\"${__cdist_remote_cache_bin}:\$PATH\" - \"${__cdist_remote_cache_bin}/cdist-explorer-coordinator\" \ - \"${__cdist_remote_explorer_dir}\" \"${__cdist_remote_cache_explorer}\"" - -# Ensure local destination directory exists -mkdir -p "$__cdist_output_dir" - -# FIXME: enable -q as soon as the code is cleaned up -# Transfer back all results - FIXME: Add 2 level cache, so old version is kept until success -scp -r "root@${__cdist_target_host}:${__cdist_remote_cache_explorer}/*" \ - "$__cdist_output_dir" - - -exit 0 - -# -------------------------------------------------------------------------------- -# old idea with shell scripts (also sexy) -# Keep until above version successfully works - - -cd "${__cdist_explorer_dir}" -ls > "${__cdist_tmp_file}" - -# first load all functions -while read funcfull; do - cat "${funcfull}" -done < "${__cdist_tmp_file}" - -# then execute functions -while read funcfull; do - sh="${funcfull##*/}" - func="${sh%.sh}" - var="__$func" - - echo "$var=\"\$($func)\"" - echo "echo $var=\\\"\$$var\\\"" -done < "${CDIST_TMP}" From dca64bd4ac3c6c0dbc05aff30f32b138fd2ac6fd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 23:08:26 +0100 Subject: [PATCH 0311/6109] Revert "nicos next stuff todo" Do not begin new features in master branch. This reverts commit a00490e86cc3dfc875e55769719ed4e615055f4c. --- doc/dev/todo/niconext | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 099464f1..473a92cd 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1 +1,2 @@ -add explorers per type/object +cleanup doc/ and generate manpages +cleanup website From fe2d4cf7e40ebcb50da41e52b354562d9448bb5f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 23:10:13 +0100 Subject: [PATCH 0312/6109] Revert "Revert "nicos next stuff todo"" Revert the reverts - now we're in the feature branch. This reverts commit dca64bd4ac3c6c0dbc05aff30f32b138fd2ac6fd. --- doc/dev/todo/niconext | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 473a92cd..099464f1 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,2 +1 @@ -cleanup doc/ and generate manpages -cleanup website +add explorers per type/object From d72c5e1f69269e3f46f344b81aed320ec4a40a68 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 23:10:35 +0100 Subject: [PATCH 0313/6109] Revert "Revert "add template for bin/cdist-explorer-run-global"" Revert the reverts - now we're in the feature branch. This reverts commit 2aa4487038bbcaa389d11f42dd861448df22def3. --- bin/cdist-explorer-run-global | 86 +++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100755 bin/cdist-explorer-run-global diff --git a/bin/cdist-explorer-run-global b/bin/cdist-explorer-run-global new file mode 100755 index 00000000..e2bb7f41 --- /dev/null +++ b/bin/cdist-explorer-run-global @@ -0,0 +1,86 @@ +#!/bin/sh +# +# 2010-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 . +# +# +# Run the global explorers, i.e. not bound to types +# + +. cdist-config +[ $# -eq 2 ] || __cdist_usage " " +set -ue + +export __cdist_target_host="$1"; shift +export __cdist_output_dir="$1"; shift + +# create basedir +ssh root@${__cdist_target_host} "mkdir -p \"${__cdist_remote_base_dir}\" \ + \"${__cdist_remote_cache_dir}\" \"${__cdist_remote_cache_bin}\" \ + \"${__cdist_remote_cache_explorer}\"" + +# Transfer all explorers to the target dir - must be one level above, so +# coyping it multiple times works: a -> remote:/base/ = remote:/base/a vs. +# a -> remote:/base/a = remote:/base/a/a (second copy) + +# FIXME: enable -q as soon as the code is cleaned up +scp -r "${__cdist_explorer_dir}" \ + "root@${__cdist_target_host}:${__cdist_remote_base_dir}" + +# Transfer cdist binaries - FIXME: should transfer all (needed?) of them! +scp "$(which cdist-explorer-coordinator)" "$(which cdist-config)" \ + "root@${__cdist_target_host}:${__cdist_remote_cache_bin}" + +# Execute explorer coordinator, which will save results on target +ssh root@${__cdist_target_host} \ + "PATH=\"${__cdist_remote_cache_bin}:\$PATH\" + \"${__cdist_remote_cache_bin}/cdist-explorer-coordinator\" \ + \"${__cdist_remote_explorer_dir}\" \"${__cdist_remote_cache_explorer}\"" + +# Ensure local destination directory exists +mkdir -p "$__cdist_output_dir" + +# FIXME: enable -q as soon as the code is cleaned up +# Transfer back all results - FIXME: Add 2 level cache, so old version is kept until success +scp -r "root@${__cdist_target_host}:${__cdist_remote_cache_explorer}/*" \ + "$__cdist_output_dir" + + +exit 0 + +# -------------------------------------------------------------------------------- +# old idea with shell scripts (also sexy) +# Keep until above version successfully works + + +cd "${__cdist_explorer_dir}" +ls > "${__cdist_tmp_file}" + +# first load all functions +while read funcfull; do + cat "${funcfull}" +done < "${__cdist_tmp_file}" + +# then execute functions +while read funcfull; do + sh="${funcfull##*/}" + func="${sh%.sh}" + var="__$func" + + echo "$var=\"\$($func)\"" + echo "echo $var=\\\"\$$var\\\"" +done < "${CDIST_TMP}" From a0fd43d0a8a352a8ebd38a098322aa2c03f604fe Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 23:10:38 +0100 Subject: [PATCH 0314/6109] Revert "Revert "begin to create a general cdist-explorer-run"" Revert the reverts - now we're in the feature branch. This reverts commit c14df05fbe4e56a3e4ebb5612009c96bc00e4c53. --- bin/cdist-explorer-run | 45 +++++++++++++++++++++++++---------- bin/cdist-explorer-run-global | 1 + 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index fcbe2518..494c8c42 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -23,25 +23,44 @@ # . cdist-config -[ $# -eq 2 ] || __cdist_usage " " +if [ $# -ne 5 ]; then + __cdist_usage " " +fi set -ue export __cdist_target_host="$1"; shift -export __cdist_output_dir="$1"; shift +export __cdist_local_src_dir="$1"; shift +export __cdist_local_dst_dir="$1"; shift +export __cdist_remote_src_dir="$1"; shift +export __cdist_remote_dst_dir="$1"; shift + +################################################################################ +# New code +# + +# Create remote source and destination directory +ssh "${__cdist_remote_user}@${__cdist_target_host}" \ + "mkdir -p \"${__cdist_remote_src_dir}\" \ + \"${__cdist_remote_dst_dir}\"" + +# Copy explorers to remote source directory +# FIXME: enable -q as soon as the code is cleaned up +scp "${__cdist_src_dir}"/* \ + "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" + +# Execute explorers and save results in remote destination directory + +# Copy results back to us + +################################################################################ +# Old code +# # create basedir -ssh root@${__cdist_target_host} "mkdir -p \"${__cdist_remote_base_dir}\" \ - \"${__cdist_remote_cache_dir}\" \"${__cdist_remote_cache_bin}\" \ - \"${__cdist_remote_cache_explorer}\"" - # Transfer all explorers to the target dir - must be one level above, so # coyping it multiple times works: a -> remote:/base/ = remote:/base/a vs. # a -> remote:/base/a = remote:/base/a/a (second copy) -# FIXME: enable -q as soon as the code is cleaned up -scp -r "${__cdist_explorer_dir}" \ - "root@${__cdist_target_host}:${__cdist_remote_base_dir}" - # Transfer cdist binaries - FIXME: should transfer all (needed?) of them! scp "$(which cdist-explorer-coordinator)" "$(which cdist-config)" \ "root@${__cdist_target_host}:${__cdist_remote_cache_bin}" @@ -53,12 +72,12 @@ ssh root@${__cdist_target_host} \ \"${__cdist_remote_explorer_dir}\" \"${__cdist_remote_cache_explorer}\"" # Ensure local destination directory exists -mkdir -p "$__cdist_output_dir" +mkdir -p "$__cdist_local_dst_dir" # FIXME: enable -q as soon as the code is cleaned up # Transfer back all results - FIXME: Add 2 level cache, so old version is kept until success scp -r "root@${__cdist_target_host}:${__cdist_remote_cache_explorer}/*" \ - "$__cdist_output_dir" + "$__cdist_local_dst_dir" exit 0 @@ -68,7 +87,7 @@ exit 0 # Keep until above version successfully works -cd "${__cdist_explorer_dir}" +cd "${__cdist_src_dir}" ls > "${__cdist_tmp_file}" # first load all functions diff --git a/bin/cdist-explorer-run-global b/bin/cdist-explorer-run-global index e2bb7f41..e4dc8cd1 100755 --- a/bin/cdist-explorer-run-global +++ b/bin/cdist-explorer-run-global @@ -28,6 +28,7 @@ set -ue export __cdist_target_host="$1"; shift export __cdist_output_dir="$1"; shift + # create basedir ssh root@${__cdist_target_host} "mkdir -p \"${__cdist_remote_base_dir}\" \ \"${__cdist_remote_cache_dir}\" \"${__cdist_remote_cache_bin}\" \ From 10b7a7ab8a48e6970ec22752d25668fb91059cd4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 23:10:43 +0100 Subject: [PATCH 0315/6109] Revert "Revert "integrate bin/cdist-explorer-coordinator into cdist-explorer-run"" Revert the reverts - now we're in the feature branch. This reverts commit 6ba577b3fd9889faf9da15913191663f1212ee53. --- bin/cdist-explorer-coordinator | 36 ---------------------------------- bin/cdist-explorer-run | 6 ++++++ 2 files changed, 6 insertions(+), 36 deletions(-) delete mode 100755 bin/cdist-explorer-coordinator diff --git a/bin/cdist-explorer-coordinator b/bin/cdist-explorer-coordinator deleted file mode 100755 index 8556dbd9..00000000 --- a/bin/cdist-explorer-coordinator +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# 2010-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 . -# -# -# Coordinate run of explorers on target (this script runs on the target) -# - -. cdist-config - -[ $# -eq 2 ] || __cdist_usage " " - -set -e - -explorer_dir="$1"; shift -result_dir="$1"; shift - -cd "${explorer_dir}" -for explorer in *; do - "./$explorer" > "${result_dir}/${explorer}" -done diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index 494c8c42..2329c9c7 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -46,6 +46,12 @@ ssh "${__cdist_remote_user}@${__cdist_target_host}" \ # Copy explorers to remote source directory # FIXME: enable -q as soon as the code is cleaned up + +cd "${explorer_dir}" +for explorer in *; do + "./$explorer" > "${result_dir}/${explorer}" +done + scp "${__cdist_src_dir}"/* \ "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" From e168454d1b5c45113e39eb551df738e0889406a0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 23:10:47 +0100 Subject: [PATCH 0316/6109] Revert "Revert "finish generic cdist-explorer-run"" Revert the reverts - now we're in the feature branch. This reverts commit c429177db46854d85c3dda5924bf1be50a150dde. --- bin/cdist-explorer-run | 73 ++++++++---------------------------------- 1 file changed, 13 insertions(+), 60 deletions(-) diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index 2329c9c7..e695424b 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -44,69 +44,22 @@ ssh "${__cdist_remote_user}@${__cdist_target_host}" \ "mkdir -p \"${__cdist_remote_src_dir}\" \ \"${__cdist_remote_dst_dir}\"" -# Copy explorers to remote source directory -# FIXME: enable -q as soon as the code is cleaned up - -cd "${explorer_dir}" -for explorer in *; do - "./$explorer" > "${result_dir}/${explorer}" -done - -scp "${__cdist_src_dir}"/* \ - "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" - -# Execute explorers and save results in remote destination directory - -# Copy results back to us - -################################################################################ -# Old code -# -# create basedir -# Transfer all explorers to the target dir - must be one level above, so -# coyping it multiple times works: a -> remote:/base/ = remote:/base/a vs. -# a -> remote:/base/a = remote:/base/a/a (second copy) - -# Transfer cdist binaries - FIXME: should transfer all (needed?) of them! -scp "$(which cdist-explorer-coordinator)" "$(which cdist-config)" \ - "root@${__cdist_target_host}:${__cdist_remote_cache_bin}" - -# Execute explorer coordinator, which will save results on target -ssh root@${__cdist_target_host} \ - "PATH=\"${__cdist_remote_cache_bin}:\$PATH\" - \"${__cdist_remote_cache_bin}/cdist-explorer-coordinator\" \ - \"${__cdist_remote_explorer_dir}\" \"${__cdist_remote_cache_explorer}\"" - # Ensure local destination directory exists mkdir -p "$__cdist_local_dst_dir" # FIXME: enable -q as soon as the code is cleaned up -# Transfer back all results - FIXME: Add 2 level cache, so old version is kept until success -scp -r "root@${__cdist_target_host}:${__cdist_remote_cache_explorer}/*" \ - "$__cdist_local_dst_dir" +cd "${__cdist_local_src_dir}" +for explorer in *; do + # Copy explorers to remote source directory + scp "${explorer}" \ + "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" + # Execute explorers and save results in remote destination directory + ssh "${__cdist_remote_user}@${__cdist_target_host}" \ + "\"${__cdist_remote_src_dir}/$explorer\" > \ + \"${__cdist_remote_dst_dir}/${explorer}\"" -exit 0 - -# -------------------------------------------------------------------------------- -# old idea with shell scripts (also sexy) -# Keep until above version successfully works - - -cd "${__cdist_src_dir}" -ls > "${__cdist_tmp_file}" - -# first load all functions -while read funcfull; do - cat "${funcfull}" -done < "${__cdist_tmp_file}" - -# then execute functions -while read funcfull; do - sh="${funcfull##*/}" - func="${sh%.sh}" - var="__$func" - - echo "$var=\"\$($func)\"" - echo "echo $var=\\\"\$$var\\\"" -done < "${CDIST_TMP}" + # Copy results back to us + scp "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_dst_dir}/${explorer}" \ + "$__cdist_local_dst_dir/$explorer" +done From 10bdef0edd35594f15ca442de6d122414f47cb5e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 23:21:25 +0100 Subject: [PATCH 0317/6109] HUGE CLEANUP Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 2 +- bin/cdist-explorer-run-global | 87 ----------------------------------- bin/cdist-explorer-run-init | 33 +++++++++++++ 3 files changed, 34 insertions(+), 88 deletions(-) delete mode 100755 bin/cdist-explorer-run-global create mode 100755 bin/cdist-explorer-run-init diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index dab3684b..2744c7c5 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -36,7 +36,7 @@ export __cdist_out_objects export __cdist_out_execs # See cdist-stages(7) -cdist-explorer-run "$__cdist_target_host" "$__cdist_out_explorers" +cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorers" cdist-manifest-init "$__cdist_target_host" "$__cdist_out_objects" cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_objects" cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_objects" "$__cdist_out_execs" diff --git a/bin/cdist-explorer-run-global b/bin/cdist-explorer-run-global deleted file mode 100755 index e4dc8cd1..00000000 --- a/bin/cdist-explorer-run-global +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/sh -# -# 2010-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 . -# -# -# Run the global explorers, i.e. not bound to types -# - -. cdist-config -[ $# -eq 2 ] || __cdist_usage " " -set -ue - -export __cdist_target_host="$1"; shift -export __cdist_output_dir="$1"; shift - - -# create basedir -ssh root@${__cdist_target_host} "mkdir -p \"${__cdist_remote_base_dir}\" \ - \"${__cdist_remote_cache_dir}\" \"${__cdist_remote_cache_bin}\" \ - \"${__cdist_remote_cache_explorer}\"" - -# Transfer all explorers to the target dir - must be one level above, so -# coyping it multiple times works: a -> remote:/base/ = remote:/base/a vs. -# a -> remote:/base/a = remote:/base/a/a (second copy) - -# FIXME: enable -q as soon as the code is cleaned up -scp -r "${__cdist_explorer_dir}" \ - "root@${__cdist_target_host}:${__cdist_remote_base_dir}" - -# Transfer cdist binaries - FIXME: should transfer all (needed?) of them! -scp "$(which cdist-explorer-coordinator)" "$(which cdist-config)" \ - "root@${__cdist_target_host}:${__cdist_remote_cache_bin}" - -# Execute explorer coordinator, which will save results on target -ssh root@${__cdist_target_host} \ - "PATH=\"${__cdist_remote_cache_bin}:\$PATH\" - \"${__cdist_remote_cache_bin}/cdist-explorer-coordinator\" \ - \"${__cdist_remote_explorer_dir}\" \"${__cdist_remote_cache_explorer}\"" - -# Ensure local destination directory exists -mkdir -p "$__cdist_output_dir" - -# FIXME: enable -q as soon as the code is cleaned up -# Transfer back all results - FIXME: Add 2 level cache, so old version is kept until success -scp -r "root@${__cdist_target_host}:${__cdist_remote_cache_explorer}/*" \ - "$__cdist_output_dir" - - -exit 0 - -# -------------------------------------------------------------------------------- -# old idea with shell scripts (also sexy) -# Keep until above version successfully works - - -cd "${__cdist_explorer_dir}" -ls > "${__cdist_tmp_file}" - -# first load all functions -while read funcfull; do - cat "${funcfull}" -done < "${__cdist_tmp_file}" - -# then execute functions -while read funcfull; do - sh="${funcfull##*/}" - func="${sh%.sh}" - var="__$func" - - echo "$var=\"\$($func)\"" - echo "echo $var=\\\"\$$var\\\"" -done < "${CDIST_TMP}" diff --git a/bin/cdist-explorer-run-init b/bin/cdist-explorer-run-init new file mode 100755 index 00000000..e1ed2382 --- /dev/null +++ b/bin/cdist-explorer-run-init @@ -0,0 +1,33 @@ +#!/bin/sh +# +# 2010-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 . +# +# +# Run the global explorers, i.e. not bound to types +# + +. cdist-config +[ $# -eq 2 ] || __cdist_usage " " +set -ue + +__cdist_target_host="$1"; shift +__cdist_output_dir="$1"; shift + +cdist-explorer-run "$__cdist_target_host" \ + "$__cdist_explorer_dir" "$__cdist_output_dir" \ + "$__cdist_remote_explorer_dir" "$__cdist_remote_cache_explorer" From 0c47a70d6e457ccf6ebc1ccad1afcb119df7e204 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 22 Feb 2011 23:22:27 +0100 Subject: [PATCH 0318/6109] commented out the future Signed-off-by: Steven Armstrong --- conf/manifests/init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/manifests/init b/conf/manifests/init index 376c675d..fff86664 100755 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -4,7 +4,7 @@ # All systems get a file /etc/cdist-managed, so the sysadmin knows # who manages the configuration. -__file /etc/cdist-managed --type file +#__file /etc/cdist-managed --type file # All ikqs get a sample file case "$__cdist_target_host" in From ff1fae26703e4e2e15014dddb20b1b3a9b2efa90 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 23:25:02 +0100 Subject: [PATCH 0319/6109] remove manpage of bogus cdist-explorer-coordinator Signed-off-by: Nico Schottelius --- ...ist-explorer-coordinator-may-be-bogus.text | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 doc/man/cdist-explorer-coordinator-may-be-bogus.text diff --git a/doc/man/cdist-explorer-coordinator-may-be-bogus.text b/doc/man/cdist-explorer-coordinator-may-be-bogus.text deleted file mode 100644 index e30f26c2..00000000 --- a/doc/man/cdist-explorer-coordinator-may-be-bogus.text +++ /dev/null @@ -1,34 +0,0 @@ -cdist-explorer-coordinator(1) -============================= -Nico Schottelius - - -NAME ----- -cdist-explorer-coordinator - Coordinate explorer on target systems - -DESCRIPTION ------------ - -The cdist-explorer-coordinator is responsible for getting information -about the target system. Its job is to find locally the available -explorers and prepare them for execution on the remote host. - -Each and every explorer may return the information from the target system, -which is assigned to a local variable of the name __explorer_EXPLORERNAME. - -NOTES ------ -The first version of the cdist-explorer-coordinator (named cdist-build-explorer) -used to create strings remote, taken literally. saves ssh, insecure. - -SEE ALSO --------- -cdist(7) - - -COPYING -------- -Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). - From f87472e65db7824e7affa7f06bd76c6a5e765174 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 23:57:30 +0100 Subject: [PATCH 0320/6109] cleanup config layout, add type specific explorers Signed-off-by: Nico Schottelius --- doc/man/cdist-config-layout.text | 40 ++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/doc/man/cdist-config-layout.text b/doc/man/cdist-config-layout.text index aec2694a..2ce1c897 100644 --- a/doc/man/cdist-config-layout.text +++ b/doc/man/cdist-config-layout.text @@ -51,37 +51,47 @@ variables, see cdist-environment(7)). Parameters optionally accepted by type, \n seperated list. See cdist-types(7). -- cache/ - The cache contains results from previous runs, which may also - be used in types to gather information about other hosts - (like ssh-keys). +- types//explorers: + Location of the type specific explorers. + See cdist-explorers(7). -- cache/hosts/: - Contains cache of every known host. +- /output-tree/ + This directory contains output of cdist and is mirrored into the + cache after a successful run. This directory may be placed below + the tmpdir or at any other location. -- cache/hosts/: +- /output-tree/hosts/: + Contains output of hosts. + +- /output-tree/hosts/: Contains cache of the specific host. -- cache/hosts//explorers: - Output of explorers from last run for the host. +- /output-tree/hosts//explorers: + Output of general explorers. -- cache/hosts//objects: +- /output-tree/hosts//objects: Objects created during last run for the host. +- /output-tree/hosts//objects//explorers: + Output of type specific explorers, per object. + - tmpdir: Temporary storage A tempdir and a tempfile is provided by cdist-config(1), which will be removed when the scripts ends automatically. +FUTURE +------ +The following functionality may be implemented in the next release (or so). + - tmpdir/cache/: New cache This directory contains elements for the new cache of the host. If all stages are completed successfully, the new cache is used to replace the previous one. -- tmpdir/explorers/: Output of explorers - If the run was successful, the results are copied into the new cache. - -- tmpdir/objects/: Objects created during run - If the run was successful, the results are copied into the new cache. +- cache/ + The cache contains the cconfig output tree from previous runs, which + may also be used in types to gather information about other hosts + (like ssh-keys). AUTHOR From d3e2c4a3e8f379640221a9272d66b114ca401499 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Feb 2011 23:58:04 +0100 Subject: [PATCH 0321/6109] rephrase and cleanup cdist-explorers.text Signed-off-by: Nico Schottelius --- doc/man/cdist-explorers.text | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/man/cdist-explorers.text b/doc/man/cdist-explorers.text index 99c7c609..659a01e1 100644 --- a/doc/man/cdist-explorers.text +++ b/doc/man/cdist-explorers.text @@ -7,37 +7,37 @@ NAME ---- cdist-explorer - Explore the target systems + DESCRIPTION ----------- Cdist explorer are small shell scripts, which will be executed on the target host. The aim of the explorer is to give hints to types on how to act on the target system. +The explorer output the result of its investigation +to stdout and should be a one-liner. The output may be empty, +though. -Explorer are located below $config_dir/explorer. Their name -must be usable as a environment variable. +Cdist knows about general explorers, which are run in an early +stage and type specific explorers. Both work exactly the same way, +with the difference that the values of the general explorers +are stored in a general location and the type specific below +the types. -The shell script must output the result of its investigation -to stdout. The output may be empty. +Explorers can reuse other explorers on the target system +by calling ./ (i.e. explorers are run +from their location). In case of significant errors, the shell script may exit non-zero and return an error message on stderr, which will cause the cdist run to abort. -Explorers can reuse other explorers on the target system -by calling $__cdist_explorer_path/. - -REQUIREMENTS ------------- -The directory $__cdist_remote_base_dir must be creatable -on the target host (i.e. requires read/write permission). SEE ALSO -------- -cdist(7) +cdist(7), cdist-config-layout(7), cdist-stages(7) COPYING ------- Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is granted under the terms of the GNU General Public License version 3 (GPLv3). - From 5cfaad9d7ac9b023b19d00f7a3a25fba7343640c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 00:04:36 +0100 Subject: [PATCH 0322/6109] copy all explorers, so they can reference themselves Signed-off-by: Nico Schottelius --- bin/cdist-explorer-run | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index e695424b..0c733e99 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -18,10 +18,11 @@ # along with cdist. If not, see . # # -# FIXME: This script is ugly, should be either seperated into smaller ones, -# but definitely be cleaned up - PROOF OF CONCEPT CODE +# FIXME: Replace * references: * breaks if there is no explorer +# or FIXME: check that there is at least one explorer? # + . cdist-config if [ $# -ne 5 ]; then __cdist_usage " " @@ -49,17 +50,23 @@ mkdir -p "$__cdist_local_dst_dir" # FIXME: enable -q as soon as the code is cleaned up cd "${__cdist_local_src_dir}" -for explorer in *; do - # Copy explorers to remote source directory - scp "${explorer}" \ - "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" +# Ensure there is at least one explorer +num="$(ls -1 | wc -l)" +if [ "$num" -lt 1 ]; then + __cdist_exit_err "${__cdist_local_src_dir}: Contains no explorers" +fi + +# Copy all explorers to remote source directory +scp * "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" + +for explorer in *; do # Execute explorers and save results in remote destination directory ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "\"${__cdist_remote_src_dir}/$explorer\" > \ + "cd \"${__cdist_remote_src_dir}\" && \"./$explorer\" > \ \"${__cdist_remote_dst_dir}/${explorer}\"" - - # Copy results back to us - scp "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_dst_dir}/${explorer}" \ - "$__cdist_local_dst_dir/$explorer" done + +# Copy results back to us +scp "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_dst_dir}/*" \ + "$__cdist_local_dst_dir" From 6ff47f59a8f2553bf4bbf353d384055a539f6ef9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 00:05:35 +0100 Subject: [PATCH 0323/6109] use ./ for other explorer Signed-off-by: Nico Schottelius --- conf/explorers/pkg_system | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/explorers/pkg_system b/conf/explorers/pkg_system index 585f107d..dc1bd129 100755 --- a/conf/explorers/pkg_system +++ b/conf/explorers/pkg_system @@ -19,7 +19,7 @@ # # -case "$("${__cdist_remote_explorer_dir}/os")" in +case "$(./os)" in archlinux) echo pacman ;; debian|ubuntu) echo apt ;; gentoo) echo emerge ;; From 616fd954e8729e05e45bb314ad7c61d65f9e4bc8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 00:08:45 +0100 Subject: [PATCH 0324/6109] no export needed, so remove it Signed-off-by: Nico Schottelius --- bin/cdist-explorer-run | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index 0c733e99..23f8a6eb 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -29,12 +29,12 @@ if [ $# -ne 5 ]; then fi set -ue -export __cdist_target_host="$1"; shift +__cdist_target_host="$1"; shift -export __cdist_local_src_dir="$1"; shift -export __cdist_local_dst_dir="$1"; shift -export __cdist_remote_src_dir="$1"; shift -export __cdist_remote_dst_dir="$1"; shift +__cdist_local_src_dir="$1"; shift +__cdist_local_dst_dir="$1"; shift +__cdist_remote_src_dir="$1"; shift +__cdist_remote_dst_dir="$1"; shift ################################################################################ # New code @@ -60,6 +60,7 @@ fi # Copy all explorers to remote source directory scp * "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" +# Execute all explorers for explorer in *; do # Execute explorers and save results in remote destination directory ssh "${__cdist_remote_user}@${__cdist_target_host}" \ From 2fc8c2c4ce6464f0ef6be5afe38af22b02dd2956 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 00:12:34 +0100 Subject: [PATCH 0325/6109] add template for cdist-object-explorer-all Signed-off-by: Nico Schottelius --- bin/cdist-object-explorer-all | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 bin/cdist-object-explorer-all diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all new file mode 100755 index 00000000..2e7a5bab --- /dev/null +++ b/bin/cdist-object-explorer-all @@ -0,0 +1,50 @@ +#!/bin/sh +# +# 2010 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 . +# +# +# For each created object create the code to be executed on the +# target. +# + +. cdist-config + +if [ $# -ne 3 ]; then + __cdist_usage " " +fi + +set -eu + +__cdist_target_host="$1"; shift +__cdist_object_base_dir="$1"; shift +__cdist_exec_dir="$1"; shift + +__cdist_object_list "$__cdist_object_base_dir" > "$__cdist_tmp_file" + +while read object; do + outdir="$__cdist_exec_dir/${object}" + outfile="${outdir}/${__cdist_name_exec}" + + mkdir -p "${outdir}" + + cdist-object-codegen "$__cdist_target_host" \ + "$__cdist_object_base_dir" \ + "$object" > "${outfile}" + + chmod u+x "${outfile}" +done < "$__cdist_tmp_file" From 2c5356ba9ccfc55cef2cabac123b97b5b59c99c5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 00:17:55 +0100 Subject: [PATCH 0326/6109] introduce __cdist_type_from_object Signed-off-by: Nico Schottelius --- bin/cdist-config | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/cdist-config b/bin/cdist-config index dc0d423d..65372dd9 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -150,6 +150,11 @@ __cdist_type_param_file() echo "${__cdist_type_dir}/$type/$__cdist_name_type_params/$paramtype" } +__cdist_type_from_object() +{ + echo "${1%%/*}" +} + __cdist_object_arg() { local arg="$1"; shift From 391b5d7dc07b007d251ef1225b8f43298ce08bd3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 00:19:16 +0100 Subject: [PATCH 0327/6109] begin cdist-object-explorer-all Signed-off-by: Nico Schottelius --- bin/cdist-object-explorer-all | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all index 2e7a5bab..000930c6 100755 --- a/bin/cdist-object-explorer-all +++ b/bin/cdist-object-explorer-all @@ -1,6 +1,6 @@ #!/bin/sh # -# 2010 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -18,26 +18,33 @@ # along with cdist. If not, see . # # -# For each created object create the code to be executed on the -# target. +# For each created object check the explorers and run them if needed. # . cdist-config - -if [ $# -ne 3 ]; then - __cdist_usage " " -fi - +[ $# -eq 2 ] || __cdist_usage " " set -eu __cdist_target_host="$1"; shift __cdist_object_base_dir="$1"; shift -__cdist_exec_dir="$1"; shift __cdist_object_list "$__cdist_object_base_dir" > "$__cdist_tmp_file" +# need to create pseudo array, as ssh will destroy while-read loops while read object; do - outdir="$__cdist_exec_dir/${object}" + set -- "$@" "$object" +done < "$__cdist_tmp_file" + +while [ $# -gt 0 ]; do + object="$1"; shift + type=$(__cdist_type_from_object "$object") + + local_src_dir="$__cdist_object_base_dir/${object}/${__cdist_name_explorer}" + local_dst_dir="$__cdist_object_base_dir/${object}/${__cdist_name_explorer}" + # FIXME: stopped here + + cdist-explorer-run "$__cdist_target_host" + outfile="${outdir}/${__cdist_name_exec}" mkdir -p "${outdir}" From db40e6c1a1536df65803c1d06682dd3b06f76ef9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 00:21:11 +0100 Subject: [PATCH 0328/6109] add __cdist_type_explorers Signed-off-by: Nico Schottelius --- bin/cdist-config | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/cdist-config b/bin/cdist-config index 65372dd9..ee0eb919 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -135,6 +135,11 @@ __cdist_type_mydir() echo "${__cdist_type_dir}/${__cdist_type_current}" } +__cdist_type_explorers() +{ + echo "${__cdist_type_dir}/$1/$__cdist_name_explorer" +} + __cdist_type_gencode() { local type="$1" From 76057615b3f42de6f4cddac98750dffb15e90d8c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 00:21:32 +0100 Subject: [PATCH 0329/6109] and rename to __cdist_type_explorer_dir 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 ee0eb919..77b98b84 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -135,7 +135,7 @@ __cdist_type_mydir() echo "${__cdist_type_dir}/${__cdist_type_current}" } -__cdist_type_explorers() +__cdist_type_explorer_dir() { echo "${__cdist_type_dir}/$1/$__cdist_name_explorer" } From b782f56594e3d2cd43824ef44194edf722b92fb7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 00:25:28 +0100 Subject: [PATCH 0330/6109] todo++ Signed-off-by: Nico Schottelius --- TODO-1.0 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TODO-1.0 b/TODO-1.0 index 8ebdecc0..8c6c92fd 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -2,6 +2,8 @@ This document defines how to continue work on cdist: x general stuff x Define configuration paths (doc/internal/config-layout) + - check whether remote and local view of objects can be the same, + i.e. local:/outdir == remote:/var/lib/cdist x get information from target (stage 1) x Define how to get information from targets From 9761239f6c2d893a34b7b507e44f78f7b4d7b011 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 09:02:57 +0100 Subject: [PATCH 0331/6109] in theory finish bin/cdist-object-explorer-all Signed-off-by: Nico Schottelius --- bin/cdist-object-explorer-all | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all index 000930c6..375b50d5 100755 --- a/bin/cdist-object-explorer-all +++ b/bin/cdist-object-explorer-all @@ -30,7 +30,7 @@ __cdist_object_base_dir="$1"; shift __cdist_object_list "$__cdist_object_base_dir" > "$__cdist_tmp_file" -# need to create pseudo array, as ssh will destroy while-read loops +# need to create pseudo array, as ssh in cdist-explorer-run will destroy while-read loops while read object; do set -- "$@" "$object" done < "$__cdist_tmp_file" @@ -39,19 +39,21 @@ while [ $# -gt 0 ]; do object="$1"; shift type=$(__cdist_type_from_object "$object") - local_src_dir="$__cdist_object_base_dir/${object}/${__cdist_name_explorer}" + local_src_dir="$(__cdist_type_explorer_dir "$type")" local_dst_dir="$__cdist_object_base_dir/${object}/${__cdist_name_explorer}" - # FIXME: stopped here - cdist-explorer-run "$__cdist_target_host" + remote_src_dir="$__cdist_remote_cache_dir/$__cdist_name_type/$type/$__cdist_name_explorer" + remote_dst_dir="$__cdist_remote_cache_dir/$__cdist_name_object/$object/$__cdist_name_explorer" - outfile="${outdir}/${__cdist_name_exec}" + if [ -d "$local_src_dir" ]; then + num="$(ls -1 "$local_src_dir" | wc -l)" - mkdir -p "${outdir}" + # Skip if there is not at least one explorer + if [ "$num" -lt 1 ]; then + continue + fi - cdist-object-codegen "$__cdist_target_host" \ - "$__cdist_object_base_dir" \ - "$object" > "${outfile}" - - chmod u+x "${outfile}" -done < "$__cdist_tmp_file" + cdist-explorer-run "$__cdist_target_host" \ + "$local_src_dir" "$local_dst_dir" "$remote_src_dir" "$remote_dst_dir" + fi +done From adbd147857a5f60cf55d8aef3f5fc569559299ea Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 09:10:17 +0100 Subject: [PATCH 0332/6109] remove failing objects from initial manifest Signed-off-by: Nico Schottelius --- conf/manifests/init | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conf/manifests/init b/conf/manifests/init index fff86664..20714bad 100755 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -10,8 +10,7 @@ case "$__cdist_target_host" in localhost) __issue iddoesnotmatterhere - __package qemu-kvm --wtf installed - __package tftpd-hpa --fancyoption installed + __file test --type file --destination /tmp/cdist-testfile ;; icarus) From 9bdfeb6198eb3e17422bd300a26f799d896f1cf2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 09:14:14 +0100 Subject: [PATCH 0333/6109] exit after object explorer run Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 2744c7c5..c4e89712 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -39,11 +39,16 @@ export __cdist_out_execs cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorers" cdist-manifest-init "$__cdist_target_host" "$__cdist_out_objects" cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_objects" +cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_objects" +exit 0 cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_objects" "$__cdist_out_execs" cdist-exec-transfer "$__cdist_target_host" "$__cdist_out_execs" cdist-exec-run "$__cdist_target_host" -# FIXME: Create new cache from results +# FIXME: Create new cache from results: +# cdist-cache-copy "$__cdist_target_host" __cdist_out_explorers __cdist_out_objects __cdist_out_execs +# or similar, better with one directory +# # echo rm -rf "$(__cdist_cache_host)" # mkdir -p "$(__cdist_cache_host)" # mv "$__cdist_out_explorers" "$__cdist_out_objects" "$(__cdist_cache_host)" From 756a12c4f0c2bcc5fab1aa7d3323a5c9fbb83e49 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 09:10:17 +0100 Subject: [PATCH 0334/6109] remove failing objects from initial manifest Signed-off-by: Nico Schottelius --- conf/manifests/init | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conf/manifests/init b/conf/manifests/init index fff86664..20714bad 100755 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -10,8 +10,7 @@ case "$__cdist_target_host" in localhost) __issue iddoesnotmatterhere - __package qemu-kvm --wtf installed - __package tftpd-hpa --fancyoption installed + __file test --type file --destination /tmp/cdist-testfile ;; icarus) From 9a3d3bf48957d1aa0ef8948dc6e0ce2e1a31237f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 09:17:33 +0100 Subject: [PATCH 0335/6109] s/opt_file/optional/ Signed-off-by: Nico Schottelius --- bin/cdist_tree_wrapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist_tree_wrapper b/bin/cdist_tree_wrapper index 64229efe..80ec3809 100755 --- a/bin/cdist_tree_wrapper +++ b/bin/cdist_tree_wrapper @@ -82,7 +82,7 @@ done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_type_params_req # Allow optional parameters while read optional; do - if [ -f "${tempparams}/${opt_file}" ]; then + if [ -f "${tempparams}/${optional}" ]; then mv "${tempparams}/${optional}" "${__cdist_ddir}" fi done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_type_params_optional")" From bf94bd1aabb9ba7d49f5537c2cff59f4c81409de Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 09:20:34 +0100 Subject: [PATCH 0336/6109] no need to export variables Signed-off-by: Nico Schottelius --- bin/cdist_tree_wrapper | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/cdist_tree_wrapper b/bin/cdist_tree_wrapper index 80ec3809..c33934e9 100755 --- a/bin/cdist_tree_wrapper +++ b/bin/cdist_tree_wrapper @@ -25,13 +25,11 @@ # . cdist-config - [ $# -ge 1 ] || __cdist_usage " " - set -eu -export __cdist_object_id="$1"; shift -export __cdist_type="$__cdist_myname" +__cdist_object_id="$1"; shift +__cdist_type="$__cdist_myname" echo "$__cdist_object_id" | grep -q "^${__cdist_sane_regexp}\$" || \ __cdist_usage "Insane object id, ${__cdist_object_id}." From a2992f0c6efb9f5f5d530bb721badfc828fd1da7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 09:22:38 +0100 Subject: [PATCH 0337/6109] be consistent and use __cdist_name_type_params as temp subdir Signed-off-by: Nico Schottelius --- bin/cdist_tree_wrapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist_tree_wrapper b/bin/cdist_tree_wrapper index c33934e9..c5a179f3 100755 --- a/bin/cdist_tree_wrapper +++ b/bin/cdist_tree_wrapper @@ -51,7 +51,7 @@ mkdir -p "${__cdist_ddir}" echo "${__cdist_manifest}" > "${__cdist_ddir}/${__cdist_name_object_source}" # Record parameters to subdir -tempparams="${__cdist_tmp_dir}/params" +tempparams="${__cdist_tmp_dir}/${__cdist_name_type_params}" mkdir -p "$tempparams" while [ $# -gt 0 ]; do From cea051a105436f6a984d571cc257a47a6ab03da2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 09:23:59 +0100 Subject: [PATCH 0338/6109] fix __file/gencode: use destination, not path Signed-off-by: Nico Schottelius --- conf/types/__file/gencode | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/types/__file/gencode b/conf/types/__file/gencode index 9d585533..1040875c 100755 --- a/conf/types/__file/gencode +++ b/conf/types/__file/gencode @@ -33,11 +33,11 @@ fi case "$type" in directory) - echo mkdir \"$path\" + echo mkdir \"$destination\" ;; file) - echo touch \"$path\" + echo touch \"$destination\" ;; *) @@ -48,5 +48,5 @@ esac if [ -f mode ]; then mode="$(cat mode)" - echo chmod \"$mode\" \"$path\" + echo chmod \"$mode\" \"$destination\" fi From 5cc342fd68a4dab35a3418bffa83671241d9eb65 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 09:28:05 +0100 Subject: [PATCH 0339/6109] add template for md5sum explorer of __file Signed-off-by: Nico Schottelius --- conf/types/__file/explorers/md5sum | 61 ++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100755 conf/types/__file/explorers/md5sum diff --git a/conf/types/__file/explorers/md5sum b/conf/types/__file/explorers/md5sum new file mode 100755 index 00000000..8f20c6d8 --- /dev/null +++ b/conf/types/__file/explorers/md5sum @@ -0,0 +1,61 @@ +#!/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 . +# +# +# __file is a very basic type and should be able to be used as an +# example for typewrites later +# + +################################################################################ +# New code +# + +exit 1 +################################################################################ +# Old code +# + +type="$(cat type)" + +# If destination was specified, do not use the id +if [ -f destination ]; then + destination="$(cat destination)" +else + destination="$1" +fi + +case "$type" in + directory) + echo mkdir \"$destination\" + ;; + + file) + echo touch \"$destination\" + ;; + + *) + echo "Unsupported type: \"$type\"" >&2 + exit 1 + ;; +esac + +if [ -f mode ]; then + mode="$(cat mode)" + echo chmod \"$mode\" \"$destination\" +fi From 0c0209e83b4585e4ca466c77c9085a0b552e6d36 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 09:29:57 +0100 Subject: [PATCH 0340/6109] update __file/gencode to include parameters/ prefix Signed-off-by: Nico Schottelius --- conf/types/__file/gencode | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/types/__file/gencode b/conf/types/__file/gencode index 1040875c..ed1fae90 100755 --- a/conf/types/__file/gencode +++ b/conf/types/__file/gencode @@ -22,11 +22,11 @@ # example for typewrites later # -type="$(cat type)" +type="$(cat parameters/type)" # If destination was specified, do not use the id -if [ -f destination ]; then - destination="$(cat destination)" +if [ -f parameters/destination ]; then + destination="$(cat parameters/destination)" else destination="$1" fi @@ -46,7 +46,7 @@ case "$type" in ;; esac -if [ -f mode ]; then - mode="$(cat mode)" +if [ -f parameters/mode ]; then + mode="$(cat parameters/mode)" echo chmod \"$mode\" \"$destination\" fi From 2e266cfe3a064ef8bba9958f60d8bed16663776d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 09:32:35 +0100 Subject: [PATCH 0341/6109] finish conf/types/__file/explorers/md5sum Signed-off-by: Nico Schottelius --- conf/types/__file/explorers/md5sum | 36 +++++------------------------- 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/conf/types/__file/explorers/md5sum b/conf/types/__file/explorers/md5sum index 8f20c6d8..a4e7c335 100755 --- a/conf/types/__file/explorers/md5sum +++ b/conf/types/__file/explorers/md5sum @@ -18,44 +18,20 @@ # along with cdist. If not, see . # # -# __file is a very basic type and should be able to be used as an -# example for typewrites later +# Retrieve the md5sum of a file to be created, if it is already existing. # ################################################################################ # New code # -exit 1 -################################################################################ -# Old code -# - -type="$(cat type)" - -# If destination was specified, do not use the id -if [ -f destination ]; then - destination="$(cat destination)" +if [ -f parameters/destination ]; then + destination="$(cat parameters/destination)" else destination="$1" fi -case "$type" in - directory) - echo mkdir \"$destination\" - ;; - - file) - echo touch \"$destination\" - ;; - - *) - echo "Unsupported type: \"$type\"" >&2 - exit 1 - ;; -esac - -if [ -f mode ]; then - mode="$(cat mode)" - echo chmod \"$mode\" \"$destination\" +# No output if file does not exist - does definitely not match the md5sum :-) +if [ -e "$destination" ]; then + md5sum "$destination" fi From 51669874a771b3919bae096a357d179dfa636a53 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 09:37:07 +0100 Subject: [PATCH 0342/6109] extend cdist-explorer-run to accept arguments for explorers Signed-off-by: Nico Schottelius --- bin/cdist-explorer-run | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index 23f8a6eb..8ed3c791 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -24,8 +24,8 @@ . cdist-config -if [ $# -ne 5 ]; then - __cdist_usage " " +if [ $# -lt 5 ]; then + __cdist_usage " [explorer args]" fi set -ue @@ -36,10 +36,6 @@ __cdist_local_dst_dir="$1"; shift __cdist_remote_src_dir="$1"; shift __cdist_remote_dst_dir="$1"; shift -################################################################################ -# New code -# - # Create remote source and destination directory ssh "${__cdist_remote_user}@${__cdist_target_host}" \ "mkdir -p \"${__cdist_remote_src_dir}\" \ @@ -65,7 +61,7 @@ for explorer in *; do # Execute explorers and save results in remote destination directory ssh "${__cdist_remote_user}@${__cdist_target_host}" \ "cd \"${__cdist_remote_src_dir}\" && \"./$explorer\" > \ - \"${__cdist_remote_dst_dir}/${explorer}\"" + \"${__cdist_remote_dst_dir}/${explorer}\"" "$@" done # Copy results back to us From a12df5ce7c8d752564ff9a2e65a52cfa00444c70 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 09:50:30 +0100 Subject: [PATCH 0343/6109] create __cdist_object_id_from_object and use it + __cdist_type_from_object in cdist-manifest-run-all Signed-off-by: Nico Schottelius --- bin/cdist-config | 5 +++++ bin/cdist-manifest-run-all | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 77b98b84..e2580a00 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -160,6 +160,11 @@ __cdist_type_from_object() echo "${1%%/*}" } +__cdist_object_id_from_object() +{ + echo "${1#*/}" +} + __cdist_object_arg() { local arg="$1"; shift diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 0fbc1791..038b0dc9 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -53,12 +53,12 @@ while [ "$__cdist_new_objects_created" = "y" ]; do # Full path to current object __cdist_cur_object_dir="$__cdist_object_base_dir/$__cdist_object" # Only the id - __cdist_object_id="${__cdist_object#*/}" + __cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")" if [ ! -f "${__cdist_cur_object_dir}/$__cdist_name_object_finished" ]; then echo "Working on object ${__cdist_object} ..." - __cdist_type="${__cdist_object%%/*}" + __cdist_type="$(__cdist_type_from_object "$__cdist_object")" __cdist_manifest="$__cdist_type_dir/${__cdist_type}/${__cdist_name_manifest}" echo $__cdist_manifest From 0835e68766502320e79df77d4a448f2a044e251f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 09:56:25 +0100 Subject: [PATCH 0344/6109] also pass object_id to cdist-explorer-run Signed-off-by: Nico Schottelius --- bin/cdist-object-explorer-all | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all index 375b50d5..a9880b28 100755 --- a/bin/cdist-object-explorer-all +++ b/bin/cdist-object-explorer-all @@ -37,7 +37,8 @@ done < "$__cdist_tmp_file" while [ $# -gt 0 ]; do object="$1"; shift - type=$(__cdist_type_from_object "$object") + object_id="$(__cdist_object_id_from_object "$object")" + type="$(__cdist_type_from_object "$object")" local_src_dir="$(__cdist_type_explorer_dir "$type")" local_dst_dir="$__cdist_object_base_dir/${object}/${__cdist_name_explorer}" @@ -53,7 +54,9 @@ while [ $# -gt 0 ]; do continue fi - cdist-explorer-run "$__cdist_target_host" \ - "$local_src_dir" "$local_dst_dir" "$remote_src_dir" "$remote_dst_dir" + cdist-explorer-run "$__cdist_target_host" \ + "$local_src_dir" "$local_dst_dir" \ + "$remote_src_dir" "$remote_dst_dir" \ + "$object_id" fi done From d58d13910b1ef836269808e9ea9fb45f6677437c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 10:01:23 +0100 Subject: [PATCH 0345/6109] explorers integrated, but parameters are not accessable Signed-off-by: Nico Schottelius --- bin/cdist-object-explorer-all | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all index a9880b28..91fc6571 100755 --- a/bin/cdist-object-explorer-all +++ b/bin/cdist-object-explorer-all @@ -47,6 +47,7 @@ while [ $# -gt 0 ]; do remote_dst_dir="$__cdist_remote_cache_dir/$__cdist_name_object/$object/$__cdist_name_explorer" if [ -d "$local_src_dir" ]; then + echo "Executing explorers for $object ..." num="$(ls -1 "$local_src_dir" | wc -l)" # Skip if there is not at least one explorer @@ -54,9 +55,11 @@ while [ $# -gt 0 ]; do continue fi - cdist-explorer-run "$__cdist_target_host" \ + set -x + cdist-explorer-run "$__cdist_target_host" \ "$local_src_dir" "$local_dst_dir" \ "$remote_src_dir" "$remote_dst_dir" \ "$object_id" + set +x fi done From b222b79407c7ced46394db110b2c03003e0d2d02 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 10:04:12 +0100 Subject: [PATCH 0346/6109] add some help output in cdist-explorer-run for bogus situations Signed-off-by: Nico Schottelius --- bin/cdist-explorer-run | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index 8ed3c791..b2d849b5 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -58,10 +58,22 @@ scp * "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" # Execute all explorers for explorer in *; do - # Execute explorers and save results in remote destination directory - ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "cd \"${__cdist_remote_src_dir}\" && \"./$explorer\" > \ - \"${__cdist_remote_dst_dir}/${explorer}\"" "$@" + if [ -f "$explorer" ]; then + if [ ! -x "$explorer" ]; then + echo "Explorer \"$explorer\" exists, but is not executable." + continue + fi + + # Execute explorers and save results in remote destination directory + ssh "${__cdist_remote_user}@${__cdist_target_host}" \ + "cd \"${__cdist_remote_src_dir}\" && \"./$explorer\" > \ + \"${__cdist_remote_dst_dir}/${explorer}\"" "$@" + else + if [ -e "$explorer" ]; then + echo "Explorer \"$explorer\" exists, but is not a file." + continue + fi + fi done # Copy results back to us From ce69491c34be0a6611352986547e4271d8a20527 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 10:12:26 +0100 Subject: [PATCH 0347/6109] sed -i 's/__cdist_name_type_params/__cdist_name_params/g' Signed-off-by: Nico Schottelius --- bin/cdist-config | 8 ++++---- bin/cdist_tree_wrapper | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index e2580a00..725a3c98 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -44,9 +44,9 @@ set -u : ${__cdist_name_object:=objects} : ${__cdist_name_type:=types} -: ${__cdist_name_type_params:=parameters} -: ${__cdist_name_type_params_required:=required} -: ${__cdist_name_type_params_optional:=optional} +: ${__cdist_name_params:=parameters} +: ${__cdist_name_params_required:=required} +: ${__cdist_name_params_optional:=optional} # Name of the executable generated : ${__cdist_name_exec:=exec} @@ -152,7 +152,7 @@ __cdist_type_param_file() local type="$1"; shift local paramtype="$1"; shift - echo "${__cdist_type_dir}/$type/$__cdist_name_type_params/$paramtype" + echo "${__cdist_type_dir}/$type/$__cdist_name_params/$paramtype" } __cdist_type_from_object() diff --git a/bin/cdist_tree_wrapper b/bin/cdist_tree_wrapper index c5a179f3..eac4e72a 100755 --- a/bin/cdist_tree_wrapper +++ b/bin/cdist_tree_wrapper @@ -51,7 +51,7 @@ mkdir -p "${__cdist_ddir}" echo "${__cdist_manifest}" > "${__cdist_ddir}/${__cdist_name_object_source}" # Record parameters to subdir -tempparams="${__cdist_tmp_dir}/${__cdist_name_type_params}" +tempparams="${__cdist_tmp_dir}/${__cdist_name_params}" mkdir -p "$tempparams" while [ $# -gt 0 ]; do @@ -76,14 +76,14 @@ while read required; do fi mv "${tempparams}/${required}" "${__cdist_ddir}" -done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_type_params_required")" +done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_params_required")" # Allow optional parameters while read optional; do if [ -f "${tempparams}/${optional}" ]; then mv "${tempparams}/${optional}" "${__cdist_ddir}" fi -done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_type_params_optional")" +done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_params_optional")" # Error out on other paramaters cd "${tempparams}" From 91b4b163cd882bdb389e504ac1b7500789169068 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 10:21:43 +0100 Subject: [PATCH 0348/6109] save parameters below parameters/ in the object Signed-off-by: Nico Schottelius --- bin/cdist_tree_wrapper | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/cdist_tree_wrapper b/bin/cdist_tree_wrapper index eac4e72a..9e46a9bb 100755 --- a/bin/cdist_tree_wrapper +++ b/bin/cdist_tree_wrapper @@ -36,6 +36,7 @@ echo "$__cdist_object_id" | grep -q "^${__cdist_sane_regexp}\$" || \ __cdist_object="${__cdist_type}/${__cdist_object_id}" __cdist_ddir="$__cdist_output_dir/${__cdist_object}" +__cdist_params_dir="$__cdist_ddir/$__cdist_name_params" # Append id for error messages __cdist_myname="$__cdist_myname ($__cdist_object_id)" @@ -46,11 +47,12 @@ if [ -e "${__cdist_ddir}" ]; then fi mkdir -p "${__cdist_ddir}" +mkdir -p "${__cdist_params_dir}" # Record (correct ;-) source echo "${__cdist_manifest}" > "${__cdist_ddir}/${__cdist_name_object_source}" -# Record parameters to subdir +# Record parameters to tmpdir tempparams="${__cdist_tmp_dir}/${__cdist_name_params}" mkdir -p "$tempparams" @@ -75,13 +77,13 @@ while read required; do __cdist_usage "Missing required parameter $required" fi - mv "${tempparams}/${required}" "${__cdist_ddir}" + mv "${tempparams}/${required}" "${__cdist_params_dir}" done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_params_required")" # Allow optional parameters while read optional; do if [ -f "${tempparams}/${optional}" ]; then - mv "${tempparams}/${optional}" "${__cdist_ddir}" + mv "${tempparams}/${optional}" "${__cdist_params_dir}" fi done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_params_optional")" From de71c881a25b26cb984d80ac1d7d4d0e332ecbbb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 10:24:20 +0100 Subject: [PATCH 0349/6109] begin to include parameter copy to remote host Signed-off-by: Nico Schottelius --- bin/cdist-object-explorer-all | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all index 91fc6571..aead9e49 100755 --- a/bin/cdist-object-explorer-all +++ b/bin/cdist-object-explorer-all @@ -43,8 +43,23 @@ while [ $# -gt 0 ]; do local_src_dir="$(__cdist_type_explorer_dir "$type")" local_dst_dir="$__cdist_object_base_dir/${object}/${__cdist_name_explorer}" + # FIXME: remove path concatenation from here and construct paths only in + # cdist-config! remote_src_dir="$__cdist_remote_cache_dir/$__cdist_name_type/$type/$__cdist_name_explorer" - remote_dst_dir="$__cdist_remote_cache_dir/$__cdist_name_object/$object/$__cdist_name_explorer" + + set -x + # Contains parameters + output of explorers + remote_object_dir="$__cdist_remote_cache_dir/$__cdist_name_object/$object" + remote_dst_dir="$remote_object_dir/$__cdist_name_explorer" + + # Also copy parameters + # FIXME: add function to copy whole host specific tree! + local_params_dir="$__cdist_object_base_dir/$object/$__cdist_name_params" + + # Copy directory, needs to be one level above, otherwise subdir is created + # FIXME: add -q later + ssh "${__cdist_remote_user}@${__cdist_target_host}" "mkdir -p \"$remote_object_dir\"" + scp -r "$local_params_dir" "${__cdist_remote_user}@${__cdist_target_host}:$remote_object_dir" if [ -d "$local_src_dir" ]; then echo "Executing explorers for $object ..." @@ -55,11 +70,10 @@ while [ $# -gt 0 ]; do continue fi - set -x cdist-explorer-run "$__cdist_target_host" \ "$local_src_dir" "$local_dst_dir" \ "$remote_src_dir" "$remote_dst_dir" \ "$object_id" - set +x fi + set +x done From deb2df20c08d4b7176d698dfbee9fd77cc2dbc6b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 13:37:05 +0100 Subject: [PATCH 0350/6109] remove reminder Signed-off-by: Nico Schottelius --- doc/internal.REMOVE_PRE_1.0/DO_NOT_DO_AGAIN | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 doc/internal.REMOVE_PRE_1.0/DO_NOT_DO_AGAIN diff --git a/doc/internal.REMOVE_PRE_1.0/DO_NOT_DO_AGAIN b/doc/internal.REMOVE_PRE_1.0/DO_NOT_DO_AGAIN deleted file mode 100644 index 23e7173e..00000000 --- a/doc/internal.REMOVE_PRE_1.0/DO_NOT_DO_AGAIN +++ /dev/null @@ -1,2 +0,0 @@ -DO NOT CREATE cdist-config in a path before path of cdist, -because this renders cdist-config unusable!!!!!!!! From 9f64444d17f14830d2b1e59d9bbd53cbeccff5ae Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 13:47:31 +0100 Subject: [PATCH 0351/6109] remove old notes Signed-off-by: Nico Schottelius --- ...-implementation-ideas.TO_FINISH_AND_DELETE | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100644 doc/internal.REMOVE_PRE_1.0/explorer-implementation-ideas.TO_FINISH_AND_DELETE diff --git a/doc/internal.REMOVE_PRE_1.0/explorer-implementation-ideas.TO_FINISH_AND_DELETE b/doc/internal.REMOVE_PRE_1.0/explorer-implementation-ideas.TO_FINISH_AND_DELETE deleted file mode 100644 index 31e4c048..00000000 --- a/doc/internal.REMOVE_PRE_1.0/explorer-implementation-ideas.TO_FINISH_AND_DELETE +++ /dev/null @@ -1,22 +0,0 @@ -1) safer and fast version - cat blob | ssh host > tmp; - for var in ... - var=grep ^var= tmp -2) slow & secure - for var in ... - eval var=$(cat single_blob | ssh host" - -3) easy & insecure - cat blob | ssh host > tmp; . tmp - -4) - rsync here/explorers target/explorers - - ssh target_host for explorer in target/explorers/; do - target/explorers/$explorer > target/cache/explorers/$explorer - done - - rsync target/cache/explorers here/cache/explorers.... - - MINUS RSYNC!!!!!!!!!?????????? - --------------------------------------------------------------------------------- - -TO_MAN: EXPLORER VALUES ARE UNTRUSTED (think of webclients and webapps) - From b8156ebedeb2508e299bb9bafe36ef3c0f51f333 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 13:49:29 +0100 Subject: [PATCH 0352/6109] cleanup old internal documentation Signed-off-by: Nico Schottelius --- .../todo/post-1.0-cache} | 0 .../cdist-hacking.TO_MAN | 4 -- .../puppet-analysis.REMOVE_PRE_1.0 | 66 ------------------- doc/internal.REMOVE_PRE_1.0/puppet-missing | 20 ++++++ 4 files changed, 20 insertions(+), 70 deletions(-) rename doc/{internal.REMOVE_PRE_1.0/cdist-cache.TO_MAN => dev/todo/post-1.0-cache} (100%) delete mode 100644 doc/internal.REMOVE_PRE_1.0/cdist-hacking.TO_MAN delete mode 100644 doc/internal.REMOVE_PRE_1.0/puppet-analysis.REMOVE_PRE_1.0 create mode 100644 doc/internal.REMOVE_PRE_1.0/puppet-missing diff --git a/doc/internal.REMOVE_PRE_1.0/cdist-cache.TO_MAN b/doc/dev/todo/post-1.0-cache similarity index 100% rename from doc/internal.REMOVE_PRE_1.0/cdist-cache.TO_MAN rename to doc/dev/todo/post-1.0-cache diff --git a/doc/internal.REMOVE_PRE_1.0/cdist-hacking.TO_MAN b/doc/internal.REMOVE_PRE_1.0/cdist-hacking.TO_MAN deleted file mode 100644 index c7254168..00000000 --- a/doc/internal.REMOVE_PRE_1.0/cdist-hacking.TO_MAN +++ /dev/null @@ -1,4 +0,0 @@ -setenv PATH ${PATH}:${HOME}/cdist/bin -setenv CDIST_CONFIG ${HOME}/cdist/conf -export PATH=$PATH:$HOME/cdist/bin -export CDIST_CONFIG=$HOME/cdist/conf diff --git a/doc/internal.REMOVE_PRE_1.0/puppet-analysis.REMOVE_PRE_1.0 b/doc/internal.REMOVE_PRE_1.0/puppet-analysis.REMOVE_PRE_1.0 deleted file mode 100644 index 6d10e18e..00000000 --- a/doc/internal.REMOVE_PRE_1.0/puppet-analysis.REMOVE_PRE_1.0 +++ /dev/null @@ -1,66 +0,0 @@ -## What do I need [from puppet?] - -### Abstraction of package managers - -I don't want to care about apt, rpm, yum, pacman, etc. I just -want to ensure, some package exists or does not exist. - - -### Common tasks already done - - - [LIBRARY] All the helper types like - - file - - ssh_keys - - package - - service - - user - -### PORTABILITY - - [PORTABILITY] clients for every unix - - mostly ruby + facter in puppet - -### Other - - Modules: Nice to put stuff together - - and reuse - - [CONDITIONS] facter is cool - - the DSL - - with many bugs - - templates - - Client/Server approach is nice to have - - Clients only get the part of the documentation, that's - relevant to them - - detect impossible/unsafe things: - - creating a file twice - - installing and removing a package - - and report location of occurence - - parse afterwards? - --------------------------------------------------------------------------------- -what is puppet? [FOR ME] - - A configuration deployment assistant, - a DSL that allows you define the objectives. - A webserver with fileserver capabilities. - A client based scheduled polling infrastructure. - --------------------------------------------------------------------------------- -What do I miss from puppet? - - - speed - - elegance - - clean design - - documentation - - the "no surprise" factor - - easy to use "data memory" (i.e. external ressources) - - easy integration into installation process - - copy identity to master - - multi master setups - - development configurations / tests - - editing of configuration files - - similar to cfengine - - replace bug squasher with bug avoidance - - qmail did not need one either - - push infrastructure - - real / meaningful error messages - - diff --git a/doc/internal.REMOVE_PRE_1.0/puppet-missing b/doc/internal.REMOVE_PRE_1.0/puppet-missing new file mode 100644 index 00000000..443b414b --- /dev/null +++ b/doc/internal.REMOVE_PRE_1.0/puppet-missing @@ -0,0 +1,20 @@ +What do I miss from puppet? + + - speed + - elegance + - clean design + - documentation + - the "no surprise" factor + - easy to use "data memory" (i.e. external ressources) + - easy integration into installation process + - copy identity to master + - multi master setups + - development configurations / tests + - editing of configuration files + - similar to cfengine + - replace bug squasher with bug avoidance + - qmail did not need one either + - push infrastructure + - real / meaningful error messages + + From 8513cca4d163619a8945083064db916b22140ce1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 13:55:42 +0100 Subject: [PATCH 0353/6109] begin to cleanup doc/man/cdist-types.text Signed-off-by: Nico Schottelius --- doc/man/cdist-types.text | 114 +++++++++++++-------------------------- 1 file changed, 38 insertions(+), 76 deletions(-) diff --git a/doc/man/cdist-types.text b/doc/man/cdist-types.text index 2ef07284..e0acf335 100644 --- a/doc/man/cdist-types.text +++ b/doc/man/cdist-types.text @@ -10,97 +10,59 @@ cdist-types - Functionality bundled DESCRIPTION ----------- -A cdist type describes some kind of functionality. -Types can be run from manifests. -It is recommeneded to prefix all types with two -underscores, because types will be executed and -thus you prevent collisions with real binaries -(like "file"). +A cdist type describes some kind of functionality, starting from +simple stuff like copying files until complex user auth/ldap/ +kerberos infrastructure designs. -This document is a brainstorming document, on how to integrate types. +The name of every type is prefixed with two underscores (__), +because types will be executed and the two underscores prevent +collisions with real binaries (like "file"). -Proposed/discussed structures: +It must be assumed that the clients are pretty dumb +and thus do not have high level tools like python +installed. -1) 2010-11-02 - $basedir/$type/ - properties/ - name/ - required # required | optional - choices # \n liste - +If a type requires specific tools to be present +on the target, there must be another type that +provides this tool and the first type must create +an object of the specific type. - meta/ - default (shell script) - types/ - pukman/ +If the generated code fails on the client, it must +print diagnostistic messages on stderr and call +"exit 1", so the configuration is aborted. -2) 2010-11-09 - -How to write my own type named "coffee": - - Create the directory /etc/cdist/types/coffee/ - Create the file /etc/cdist/types/coffee/README containing a description of the -type. - If your type supports attributes, create the directory /etc/cdist/types/coffee/ -attributes. - For each attribute, create the file - /etc/cdist/types/coffee/attributes/$attribute_name which contains - - a short description on the first line - then a blank line - then a long description (probably over several lines) - - If you think your type may be useful for others, submit it for inclusion - into cdist at cdist -- at -- l.schottelius.org. - - Create /etc/cdist/types/coffee/init which reads $configinput - (either via cconfig or via environment) and outputs a block of - shell code suitable for running on the client. - - - --------------------------------------------------------------------------------- -type layout: - - / - config # binary that is called to adjust cconfig tree - change # binary that is called on the remote host? --------------------------------------------------------------------------------- -Scope of code execution on the client - - It should be assumed that the clients are pretty dumb - and thus do not have high level tools like python - installed. - - If a type requires specific tools to be present - on the target, there must be another type that - provides this tool and the first type must create - an object of the specific type. - - If the generated code fails on the client, it must - print diagnostistic messages on stderr and call - "exit 1", so the configuration is aborted. - --------------------------------------------------------------------------------- - - have required and optional arguments - - are independent of hosts + - are independent of hosts in general - may make use of other types to realise a new type - - how to overwrite stuff? + - can overwrite stuff (HOW?) - overwrite in own tree? - needs knowledge of inherited provider - similar to current situation in puppet, but more like reusable defines - or may implement some functionality on their own --------------------------------------------------------------------------------- -Differences manifests vs. types +HOW TO WRITE A NEW TYPE (TODO) +----------------------- +Assume you want to create the new type named "coffee": - manifests types +Create the directory /etc/cdist/types/coffee/ +Create the file /etc/cdist/types/coffee/README containing a description of the +type. +If your type supports attributes, create the directory /etc/cdist/types/coffee/ +attributes. +For each attribute, create the file + /etc/cdist/types/coffee/attributes/$attribute_name which contains -main purpose map config to host provide functionality -can change config no (prevent conflicts) yes (allow inheritance) -specificness site specific (globally) reusable + a short description on the first line + then a blank line + then a long description (probably over several lines) + +If you think your type may be useful for others, submit it for inclusion +into cdist at cdist -- at -- l.schottelius.org. + +Create /etc/cdist/types/coffee/init which reads $configinput +(either via cconfig or via environment) and outputs a block of +shell code suitable for running on the client. SEE ALSO From 23782ea337dc967f4af3c119b7195c55fee85017 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 14:04:07 +0100 Subject: [PATCH 0354/6109] further cleanups in the cdist-types manpage Signed-off-by: Nico Schottelius --- doc/man/cdist-types.text | 54 +++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/doc/man/cdist-types.text b/doc/man/cdist-types.text index e0acf335..a2e2cc49 100644 --- a/doc/man/cdist-types.text +++ b/doc/man/cdist-types.text @@ -10,39 +10,35 @@ cdist-types - Functionality bundled DESCRIPTION ----------- -A cdist type describes some kind of functionality, starting from -simple stuff like copying files until complex user auth/ldap/ -kerberos infrastructure designs. +A cdist type describes some kind of functionality, starting from simple stuff +like copying files until complex user auth/ldap/ kerberos infrastructure +designs. The name of every type is prefixed with two underscores (__), because +types will be executed and the two underscores prevent collisions with real +binaries (like "file"). +In general, types should be written independent of hosts (as in reusable +code), but may be used implement functionality only needed on one host +as well. +It must be assumed that the clients are pretty dumb and thus do not have high +level tools like ruby installed. If a type requires specific tools to be present +on the target, there must be another type that provides this tool and the first +type must create an object of the specific type. +If the generated code fails on the client, it must print diagnostistic messages on +stderr and exit non-zero, so the configuration is aborted. +Types may make use of other types to realise a new type or may implement some +functionality on their own. -The name of every type is prefixed with two underscores (__), -because types will be executed and the two underscores prevent -collisions with real binaries (like "file"). +Types may consist of +- a number of required and optional parameters they accept, +- a manifest script that makes use of the parameters and may create other objects +- explorers that explore type specific information on the target +- a gencode script, that may generate code to be executed on the target -It must be assumed that the clients are pretty dumb -and thus do not have high level tools like python -installed. - -If a type requires specific tools to be present -on the target, there must be another type that -provides this tool and the first type must create -an object of the specific type. - -If the generated code fails on the client, it must -print diagnostistic messages on stderr and call -"exit 1", so the configuration is aborted. - - - are independent of hosts in general - - may make use of other types to realise a new type - - can overwrite stuff (HOW?) - - overwrite in own tree? - - needs knowledge of inherited provider - - similar to current situation in puppet, - but more like reusable defines - - or may implement some functionality on their own +Every time a type is used, a new object is created of the specific type, +with a type specific unique id that stores the parameters HOW TO WRITE A NEW TYPE (TODO) ------------------------ +------------------------------ Assume you want to create the new type named "coffee": Create the directory /etc/cdist/types/coffee/ @@ -67,6 +63,8 @@ shell code suitable for running on the client. SEE ALSO -------- +cdist-config-layout(7), cdist-type-manifest(7), cdist-type-explorer(7), +cdist-type-gencode(7) COPYING From b7e778512d1e8992e22a2bb851c291a37e8b820a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 14:05:19 +0100 Subject: [PATCH 0355/6109] optional is not required Signed-off-by: Nico Schottelius --- doc/man/cdist-config-layout.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/cdist-config-layout.text b/doc/man/cdist-config-layout.text index 2ce1c897..b38e3c0d 100644 --- a/doc/man/cdist-config-layout.text +++ b/doc/man/cdist-config-layout.text @@ -47,7 +47,7 @@ variables, see cdist-environment(7)). Parameters required by type, \n seperated list. See cdist-types(7). -- types//parameters/required: +- types//parameters/optional: Parameters optionally accepted by type, \n seperated list. See cdist-types(7). From 964654860c58cfe3c06f9db32336a00362d3a116 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 14:05:31 +0100 Subject: [PATCH 0356/6109] add template for cdist-type-manifest.text Signed-off-by: Nico Schottelius --- doc/man/cdist-type-manifest.text | 73 ++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 doc/man/cdist-type-manifest.text diff --git a/doc/man/cdist-type-manifest.text b/doc/man/cdist-type-manifest.text new file mode 100644 index 00000000..a2e2cc49 --- /dev/null +++ b/doc/man/cdist-type-manifest.text @@ -0,0 +1,73 @@ +cdist-types(7) +=============== +Nico Schottelius + + +NAME +---- +cdist-types - Functionality bundled + + +DESCRIPTION +----------- +A cdist type describes some kind of functionality, starting from simple stuff +like copying files until complex user auth/ldap/ kerberos infrastructure +designs. The name of every type is prefixed with two underscores (__), because +types will be executed and the two underscores prevent collisions with real +binaries (like "file"). +In general, types should be written independent of hosts (as in reusable +code), but may be used implement functionality only needed on one host +as well. +It must be assumed that the clients are pretty dumb and thus do not have high +level tools like ruby installed. If a type requires specific tools to be present +on the target, there must be another type that provides this tool and the first +type must create an object of the specific type. +If the generated code fails on the client, it must print diagnostistic messages on +stderr and exit non-zero, so the configuration is aborted. +Types may make use of other types to realise a new type or may implement some +functionality on their own. + +Types may consist of +- a number of required and optional parameters they accept, +- a manifest script that makes use of the parameters and may create other objects +- explorers that explore type specific information on the target +- a gencode script, that may generate code to be executed on the target + +Every time a type is used, a new object is created of the specific type, +with a type specific unique id that stores the parameters + + +HOW TO WRITE A NEW TYPE (TODO) +------------------------------ +Assume you want to create the new type named "coffee": + +Create the directory /etc/cdist/types/coffee/ +Create the file /etc/cdist/types/coffee/README containing a description of the +type. +If your type supports attributes, create the directory /etc/cdist/types/coffee/ +attributes. +For each attribute, create the file + /etc/cdist/types/coffee/attributes/$attribute_name which contains + + a short description on the first line + then a blank line + then a long description (probably over several lines) + +If you think your type may be useful for others, submit it for inclusion +into cdist at cdist -- at -- l.schottelius.org. + +Create /etc/cdist/types/coffee/init which reads $configinput +(either via cconfig or via environment) and outputs a block of +shell code suitable for running on the client. + + +SEE ALSO +-------- +cdist-config-layout(7), cdist-type-manifest(7), cdist-type-explorer(7), +cdist-type-gencode(7) + + +COPYING +------- +Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). From ba80f3aea4c1bfbc5ecfb88a22d54f8c58428bba Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 14:59:56 +0100 Subject: [PATCH 0357/6109] cleanup Signed-off-by: Nico Schottelius --- doc/man/cdist-type-manifest.text | 61 ++++---------------------------- 1 file changed, 6 insertions(+), 55 deletions(-) diff --git a/doc/man/cdist-type-manifest.text b/doc/man/cdist-type-manifest.text index a2e2cc49..7573df6b 100644 --- a/doc/man/cdist-type-manifest.text +++ b/doc/man/cdist-type-manifest.text @@ -1,70 +1,21 @@ -cdist-types(7) -=============== +cdist-type-manifest(7) +====================== Nico Schottelius NAME ---- -cdist-types - Functionality bundled +cdist-type-manifest - Manifest of a type DESCRIPTION ----------- -A cdist type describes some kind of functionality, starting from simple stuff -like copying files until complex user auth/ldap/ kerberos infrastructure -designs. The name of every type is prefixed with two underscores (__), because -types will be executed and the two underscores prevent collisions with real -binaries (like "file"). -In general, types should be written independent of hosts (as in reusable -code), but may be used implement functionality only needed on one host -as well. -It must be assumed that the clients are pretty dumb and thus do not have high -level tools like ruby installed. If a type requires specific tools to be present -on the target, there must be another type that provides this tool and the first -type must create an object of the specific type. -If the generated code fails on the client, it must print diagnostistic messages on -stderr and exit non-zero, so the configuration is aborted. -Types may make use of other types to realise a new type or may implement some -functionality on their own. - -Types may consist of -- a number of required and optional parameters they accept, -- a manifest script that makes use of the parameters and may create other objects -- explorers that explore type specific information on the target -- a gencode script, that may generate code to be executed on the target - -Every time a type is used, a new object is created of the specific type, -with a type specific unique id that stores the parameters - - -HOW TO WRITE A NEW TYPE (TODO) ------------------------------- -Assume you want to create the new type named "coffee": - -Create the directory /etc/cdist/types/coffee/ -Create the file /etc/cdist/types/coffee/README containing a description of the -type. -If your type supports attributes, create the directory /etc/cdist/types/coffee/ -attributes. -For each attribute, create the file - /etc/cdist/types/coffee/attributes/$attribute_name which contains - - a short description on the first line - then a blank line - then a long description (probably over several lines) - -If you think your type may be useful for others, submit it for inclusion -into cdist at cdist -- at -- l.schottelius.org. - -Create /etc/cdist/types/coffee/init which reads $configinput -(either via cconfig or via environment) and outputs a block of -shell code suitable for running on the client. - +CWD = object directory +ARGV = target host, basedir +ENV = SEE ALSO -------- -cdist-config-layout(7), cdist-type-manifest(7), cdist-type-explorer(7), -cdist-type-gencode(7) COPYING From 042655f6b863b242469e49c01092a63fd7bec0ed Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 15:10:32 +0100 Subject: [PATCH 0358/6109] introduce conf_dir and out_dir Signed-off-by: Nico Schottelius --- doc/man/cdist-config-layout.text | 34 ++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/doc/man/cdist-config-layout.text b/doc/man/cdist-config-layout.text index b38e3c0d..f2f281a6 100644 --- a/doc/man/cdist-config-layout.text +++ b/doc/man/cdist-config-layout.text @@ -14,7 +14,11 @@ If not otherwise specified, all paths are relative to the configuration directory, which is normally /etc/cdist (but can be changed using environment variables, see cdist-environment(7)). -- manifests/init: +- conf_dir/: + Contains the (static) configuration like manifests, types and + explorers. + +- conf_dir/manifests/init: This is the central entry point used by cdist-manifest-init(1). It is an executable (+x bit set) shell script that can use values for the explorers to decide which configuration to create @@ -22,57 +26,57 @@ variables, see cdist-environment(7)). It should be primary used to define mapping from configurations to hosts. -- manifests/*: All other files in this directory +- conf_dir/manifests/*: All other files in this directory Cdist does not use them directly, but you can seperate configuration mappings, if you have a lot of code in the manifest/init file. This may also be very helpful to have different admins maintain different groups of hosts. -- explorers/ +- conf_dir/explorers/ Contains explorers to be run on the target hosts, see cdist-explorers(7). -- types/ +- conf_dir/types/ Contains all available types, which are used to provide some kind of functionality. See cdist-stages(7). -- types//init: +- conf_dir/types//init: Used to generate additional objects from a type. See cdist-stages(7), cdist-types(7). -- types//gencode: +- conf_dir/types//gencode: Used to generate code to be executed on the client. See cdist-types(7). -- types//parameters/required: +- conf_dir/types//parameters/required: Parameters required by type, \n seperated list. See cdist-types(7). -- types//parameters/optional: +- conf_dir/types//parameters/optional: Parameters optionally accepted by type, \n seperated list. See cdist-types(7). -- types//explorers: +- conf_dir/types//explorers: Location of the type specific explorers. See cdist-explorers(7). -- /output-tree/ +- out_dir/ This directory contains output of cdist and is mirrored into the cache after a successful run. This directory may be placed below the tmpdir or at any other location. -- /output-tree/hosts/: +- out_dir/hosts/: Contains output of hosts. -- /output-tree/hosts/: +- out_dir/hosts/: Contains cache of the specific host. -- /output-tree/hosts//explorers: +- out_dir/hosts//explorers: Output of general explorers. -- /output-tree/hosts//objects: +- out_dir/hosts//objects: Objects created during last run for the host. -- /output-tree/hosts//objects//explorers: +- out_dir/hosts//objects//explorers: Output of type specific explorers, per object. - tmpdir: Temporary storage From f4c5e7ee9e85044e4ba221125e76e02951529065 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 15:11:52 +0100 Subject: [PATCH 0359/6109] flatten out_dir Signed-off-by: Nico Schottelius --- doc/man/cdist-config-layout.text | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/doc/man/cdist-config-layout.text b/doc/man/cdist-config-layout.text index f2f281a6..e16e4dbd 100644 --- a/doc/man/cdist-config-layout.text +++ b/doc/man/cdist-config-layout.text @@ -64,19 +64,13 @@ variables, see cdist-environment(7)). cache after a successful run. This directory may be placed below the tmpdir or at any other location. -- out_dir/hosts/: - Contains output of hosts. - -- out_dir/hosts/: - Contains cache of the specific host. - -- out_dir/hosts//explorers: +- out_dir/explorers: Output of general explorers. -- out_dir/hosts//objects: - Objects created during last run for the host. +- out_dir/objects: + Objects created for the host. -- out_dir/hosts//objects//explorers: +- out_dir/objects//explorers: Output of type specific explorers, per object. - tmpdir: Temporary storage @@ -97,6 +91,13 @@ The following functionality may be implemented in the next release (or so). may also be used in types to gather information about other hosts (like ssh-keys). +- out_dir/hosts/: + Contains output of hosts. + +- out_dir/hosts/: + Contains cache of the specific host. + + AUTHOR ------ From ba7944a9e73703f5ca86241cab5d22f8d31bc32f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 15:12:07 +0100 Subject: [PATCH 0360/6109] rename tmpdir -> tmp_dir Signed-off-by: Nico Schottelius --- doc/man/cdist-config-layout.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/cdist-config-layout.text b/doc/man/cdist-config-layout.text index e16e4dbd..509fcf27 100644 --- a/doc/man/cdist-config-layout.text +++ b/doc/man/cdist-config-layout.text @@ -73,7 +73,7 @@ variables, see cdist-environment(7)). - out_dir/objects//explorers: Output of type specific explorers, per object. -- tmpdir: Temporary storage +- tmp_dir: Temporary storage A tempdir and a tempfile is provided by cdist-config(1), which will be removed when the scripts ends automatically. From 8265d23dca2db734877811f53fc1e6c36a4854fa Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 15:14:03 +0100 Subject: [PATCH 0361/6109] cleanup cache_dir Signed-off-by: Nico Schottelius --- doc/man/cdist-config-layout.text | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/doc/man/cdist-config-layout.text b/doc/man/cdist-config-layout.text index 509fcf27..36bb7837 100644 --- a/doc/man/cdist-config-layout.text +++ b/doc/man/cdist-config-layout.text @@ -77,26 +77,18 @@ variables, see cdist-environment(7)). A tempdir and a tempfile is provided by cdist-config(1), which will be removed when the scripts ends automatically. + FUTURE ------ -The following functionality may be implemented in the next release (or so). +The following functionality may be implemented in one of the next releases: -- tmpdir/cache/: New cache - This directory contains elements for the new cache of the host. - If all stages are completed successfully, the new cache is used - to replace the previous one. - -- cache/ - The cache contains the cconfig output tree from previous runs, which +- cache_dir/ + The cache contains the out_dir from previous runs, which may also be used in types to gather information about other hosts (like ssh-keys). -- out_dir/hosts/: - Contains output of hosts. - -- out_dir/hosts/: - Contains cache of the specific host. - +- cache_dir/hosts/: + Contains the last out_dir of the specific host. AUTHOR From 6f2b304400381dcc3ea6190d3746f0213b2db6d0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 15:15:06 +0100 Subject: [PATCH 0362/6109] out_dir on target Signed-off-by: Nico Schottelius --- doc/man/cdist-config-layout.text | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/man/cdist-config-layout.text b/doc/man/cdist-config-layout.text index 36bb7837..be45f873 100644 --- a/doc/man/cdist-config-layout.text +++ b/doc/man/cdist-config-layout.text @@ -62,7 +62,8 @@ variables, see cdist-environment(7)). - out_dir/ This directory contains output of cdist and is mirrored into the cache after a successful run. This directory may be placed below - the tmpdir or at any other location. + the tmpdir or at any other location and is also available on the + target. - out_dir/explorers: Output of general explorers. From 243556a69f46d8c7979a2ba184e844eaf594e55b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 15:32:17 +0100 Subject: [PATCH 0363/6109] add template for cdist-dir-push Signed-off-by: Nico Schottelius --- bin/cdist-dir-push | 81 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100755 bin/cdist-dir-push diff --git a/bin/cdist-dir-push b/bin/cdist-dir-push new file mode 100755 index 00000000..b2d849b5 --- /dev/null +++ b/bin/cdist-dir-push @@ -0,0 +1,81 @@ +#!/bin/sh +# +# 2010-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 . +# +# +# FIXME: Replace * references: * breaks if there is no explorer +# or FIXME: check that there is at least one explorer? +# + + +. cdist-config +if [ $# -lt 5 ]; then + __cdist_usage " [explorer args]" +fi +set -ue + +__cdist_target_host="$1"; shift + +__cdist_local_src_dir="$1"; shift +__cdist_local_dst_dir="$1"; shift +__cdist_remote_src_dir="$1"; shift +__cdist_remote_dst_dir="$1"; shift + +# Create remote source and destination directory +ssh "${__cdist_remote_user}@${__cdist_target_host}" \ + "mkdir -p \"${__cdist_remote_src_dir}\" \ + \"${__cdist_remote_dst_dir}\"" + +# Ensure local destination directory exists +mkdir -p "$__cdist_local_dst_dir" + +# FIXME: enable -q as soon as the code is cleaned up +cd "${__cdist_local_src_dir}" + +# Ensure there is at least one explorer +num="$(ls -1 | wc -l)" +if [ "$num" -lt 1 ]; then + __cdist_exit_err "${__cdist_local_src_dir}: Contains no explorers" +fi + +# Copy all explorers to remote source directory +scp * "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" + +# Execute all explorers +for explorer in *; do + if [ -f "$explorer" ]; then + if [ ! -x "$explorer" ]; then + echo "Explorer \"$explorer\" exists, but is not executable." + continue + fi + + # Execute explorers and save results in remote destination directory + ssh "${__cdist_remote_user}@${__cdist_target_host}" \ + "cd \"${__cdist_remote_src_dir}\" && \"./$explorer\" > \ + \"${__cdist_remote_dst_dir}/${explorer}\"" "$@" + else + if [ -e "$explorer" ]; then + echo "Explorer \"$explorer\" exists, but is not a file." + continue + fi + fi +done + +# Copy results back to us +scp "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_dst_dir}/*" \ + "$__cdist_local_dst_dir" From c0edcbee847232b43a5293b9eca5fa9a2240641f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 15:33:10 +0100 Subject: [PATCH 0364/6109] nexttodo updated Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 099464f1..f58fb61a 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1 +1,3 @@ add explorers per type/object + - create clean trees locally and remote + - invent cdist-dir-{push|pull} for directory exchange (same name) From d8cb6d58f76af028d99576d6708376a664d8f7e1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 15:42:14 +0100 Subject: [PATCH 0365/6109] finish bin/cdist-dir-push Signed-off-by: Nico Schottelius --- bin/cdist-dir-push | 63 +++++++++++----------------------------------- 1 file changed, 15 insertions(+), 48 deletions(-) diff --git a/bin/cdist-dir-push b/bin/cdist-dir-push index b2d849b5..5a2a9fcf 100755 --- a/bin/cdist-dir-push +++ b/bin/cdist-dir-push @@ -1,6 +1,6 @@ #!/bin/sh # -# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -18,64 +18,31 @@ # along with cdist. If not, see . # # -# FIXME: Replace * references: * breaks if there is no explorer -# or FIXME: check that there is at least one explorer? +# Push a directory to a target, both sides have the same name (i.e. explorers) # . cdist-config -if [ $# -lt 5 ]; then - __cdist_usage " [explorer args]" +if [ $# -lt 3 ]; then + __cdist_usage " " fi set -ue __cdist_target_host="$1"; shift - __cdist_local_src_dir="$1"; shift -__cdist_local_dst_dir="$1"; shift -__cdist_remote_src_dir="$1"; shift __cdist_remote_dst_dir="$1"; shift -# Create remote source and destination directory -ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "mkdir -p \"${__cdist_remote_src_dir}\" \ - \"${__cdist_remote_dst_dir}\"" +# This will be the destination directory, so no subdirectories +# of the same name are created, if the directory is already existing +__cdist_remote_top_dir="${__cdist_remote_dst_dir%/*}" -# Ensure local destination directory exists -mkdir -p "$__cdist_local_dst_dir" +# The directory name itself +__cdist_remote_base_dir="${__cdist_remote_dst_dir##*/}" -# FIXME: enable -q as soon as the code is cleaned up -cd "${__cdist_local_src_dir}" +# Create remote destination directory +ssh "${__cdist_remote_user}@${__cdist_target_host}" \ + "mkdir -p \"${__cdist_remote_dst_dir}\"" -# Ensure there is at least one explorer -num="$(ls -1 | wc -l)" -if [ "$num" -lt 1 ]; then - __cdist_exit_err "${__cdist_local_src_dir}: Contains no explorers" -fi - -# Copy all explorers to remote source directory -scp * "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" - -# Execute all explorers -for explorer in *; do - if [ -f "$explorer" ]; then - if [ ! -x "$explorer" ]; then - echo "Explorer \"$explorer\" exists, but is not executable." - continue - fi - - # Execute explorers and save results in remote destination directory - ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "cd \"${__cdist_remote_src_dir}\" && \"./$explorer\" > \ - \"${__cdist_remote_dst_dir}/${explorer}\"" "$@" - else - if [ -e "$explorer" ]; then - echo "Explorer \"$explorer\" exists, but is not a file." - continue - fi - fi -done - -# Copy results back to us -scp "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_dst_dir}/*" \ - "$__cdist_local_dst_dir" +# The actual transfer +scp -r "$__cdist_local_src_dir" \ + "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_top_dir}" From 5d881f226acc4cfae4df8871c9ea95054ef7ac79 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 15:50:33 +0100 Subject: [PATCH 0366/6109] superseed cdist-dir-push with cdist-dir Signed-off-by: Nico Schottelius --- bin/{cdist-dir-push => cdist-dir} | 34 ++++++++++++++++++------------- 1 file changed, 20 insertions(+), 14 deletions(-) rename bin/{cdist-dir-push => cdist-dir} (57%) diff --git a/bin/cdist-dir-push b/bin/cdist-dir similarity index 57% rename from bin/cdist-dir-push rename to bin/cdist-dir index 5a2a9fcf..3c8433d3 100755 --- a/bin/cdist-dir-push +++ b/bin/cdist-dir @@ -19,30 +19,36 @@ # # # Push a directory to a target, both sides have the same name (i.e. explorers) +# or +# Pull a directory from a target, both sides have the same name (i.e. explorers) # . cdist-config if [ $# -lt 3 ]; then - __cdist_usage " " + __cdist_usage " " fi set -ue __cdist_target_host="$1"; shift -__cdist_local_src_dir="$1"; shift -__cdist_remote_dst_dir="$1"; shift +__cdist_action="$1"; shift + +__cdist_src_dir="$1"; shift +__cdist_dst_dir="$1"; shift # This will be the destination directory, so no subdirectories # of the same name are created, if the directory is already existing -__cdist_remote_top_dir="${__cdist_remote_dst_dir%/*}" +__cdist_top_dir="${__cdist_dst_dir%/*}" -# The directory name itself -__cdist_remote_base_dir="${__cdist_remote_dst_dir##*/}" - -# Create remote destination directory -ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "mkdir -p \"${__cdist_remote_dst_dir}\"" - -# The actual transfer -scp -r "$__cdist_local_src_dir" \ - "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_top_dir}" +if [ "$__cdist_action" = "push" ]; then + ssh "${__cdist_remote_user}@${__cdist_target_host}" \ + "mkdir -p \"${__cdist_dst_dir}\"" + scp -r "$__cdist_src_dir" \ + "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_top_dir}" +elif [ "$__cdist_action" = "pull" ]; then + mkdir -p "${__cdist_dst_dir}" + scp -r "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_src_dir}" \ + "${__cdist_top_dir}" +else + __cdist_exit_err "Unknown action $__cdist_action" +fi From 5957de201bfc39469a476a32cb948c2a914208d3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 15:53:51 +0100 Subject: [PATCH 0367/6109] wait for correct count of args in bin/cdist-dir Signed-off-by: Nico Schottelius --- bin/cdist-dir | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cdist-dir b/bin/cdist-dir index 3c8433d3..7bdeb644 100755 --- a/bin/cdist-dir +++ b/bin/cdist-dir @@ -25,13 +25,13 @@ . cdist-config -if [ $# -lt 3 ]; then - __cdist_usage " " +if [ $# -ne 4 ]; then + __cdist_usage " " fi set -ue -__cdist_target_host="$1"; shift __cdist_action="$1"; shift +__cdist_target_host="$1"; shift __cdist_src_dir="$1"; shift __cdist_dst_dir="$1"; shift From 17838de1efa0ccb8d38217368810586a95882c92 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 16:01:18 +0100 Subject: [PATCH 0368/6109] remove exports from cdist-config, let subscribts take care about that, add out_dir Signed-off-by: Nico Schottelius --- bin/cdist-config | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 725a3c98..64ec63bd 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -35,6 +35,7 @@ set -u : ${__cdist_name_gencode:=gencode} : ${__cdist_name_host:=hosts} : ${__cdist_name_init:=init} +: ${__cdist_name_out_dir:=out_dir} # Name of the manifest file in types : ${__cdist_name_manifest:=manifest} @@ -72,30 +73,27 @@ set -u # Used for IDs __cdist_sane_regexp='[A-Za-z0-9]*[-A-Za-z0-9_]*' -# Remote - # Default remote user : ${__cdist_remote_user:=root} +# Remote paths : ${__cdist_remote_base_dir:=/var/lib/cdist} -export __cdist_remote_base_dir : ${__cdist_remote_explorer_dir:=$__cdist_remote_base_dir/$__cdist_name_explorer} -export __cdist_remote_explorer_dir : ${__cdist_remote_cache_dir:=$__cdist_remote_base_dir/$__cdist_name_cache} -export __cdist_remote_cache_dir : ${__cdist_remote_cache_explorer:=$__cdist_remote_cache_dir/$__cdist_name_explorer} -export __cdist_remote_cache_explorer : ${__cdist_remote_cache_bin:=$__cdist_remote_base_dir/$__cdist_name_bin} -export __cdist_remote_cache_bin : ${__cdist_remote_cache_exec:=$__cdist_remote_base_dir/$__cdist_name_exec} -export __cdist_remote_cache_exec -# Tempfiles need to be recreated for each individual script, unshared! +# Tempfiles __cdist_tmp_dir=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX") export __cdist_tmp_dir __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") export __cdist_tmp_file +# Local output base directory +: ${__cdist_out_dir:=$__cdist_tmp_dir/$__cdist_name_out_dir} + + ################################################################################ # cconf standard vars prefixed with cdist __cdist_pwd="$(pwd -P)" From d7299b8ab1e788506b8e6704696b0417cc42f513 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 16:10:36 +0100 Subject: [PATCH 0369/6109] begin to integrate out_dir in cdist_config Signed-off-by: Nico Schottelius --- bin/cdist-config | 1 + bin/cdist-deploy-to | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 64ec63bd..596e4980 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -92,6 +92,7 @@ export __cdist_tmp_file # Local output base directory : ${__cdist_out_dir:=$__cdist_tmp_dir/$__cdist_name_out_dir} +: ${__cdist_out_explorer_dir:=$__cdist_out_dir/$__cdist_name_explorer} ################################################################################ diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index c4e89712..1c7a142d 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -27,16 +27,16 @@ set -eu __cdist_target_host="$1" -: ${__cdist_out_explorers:="$__cdist_tmp_dir/$__cdist_name_explorer"} : ${__cdist_out_objects:="$__cdist_tmp_dir/$__cdist_name_object"} : ${__cdist_out_execs:="$__cdist_tmp_dir/$__cdist_name_exec"} -export __cdist_out_explorers export __cdist_out_objects export __cdist_out_execs # See cdist-stages(7) -cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorers" +cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" + +exit 2 cdist-manifest-init "$__cdist_target_host" "$__cdist_out_objects" cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_objects" cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_objects" From 9800b0a142c49521f9ef14aab1c2c585d6ecfa42 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 16:13:46 +0100 Subject: [PATCH 0370/6109] simplify HACKERS_README and use __cdist_out_dir Signed-off-by: Nico Schottelius --- HACKERS_README | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index 48df9258..e13c0343 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -28,10 +28,7 @@ export PATH="$PATH:$(pwd -P)/bin" export __cdist_config="$(pwd -P)/conf" # Change paths so we can debug stuff :-) -base=/tmp/localhost -export __cdist_out_objects=${base}/objects -export __cdist_out_explorers=${base}/explorers -export __cdist_out_execs=${base}/exec +export __cdist_out_dir=/tmp/localhost target="${1:-localhost}" cdist-deploy-to "$target" From ce9fc9fd555ce7796a4b71c584a7415561cfb7b5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 16:15:34 +0100 Subject: [PATCH 0371/6109] fix HACKERS_README find Signed-off-by: Nico Schottelius --- HACKERS_README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HACKERS_README b/HACKERS_README index e13c0343..9f196482 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -33,4 +33,4 @@ export __cdist_out_dir=/tmp/localhost target="${1:-localhost}" cdist-deploy-to "$target" -find "${base}" +find "${__cdist_out_dir}" From 84ede1ae29dddd3f7817375a7f1ca9f32102859f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 16:19:41 +0100 Subject: [PATCH 0372/6109] cleanup cdist config, remove cache, add out_dir and conf_dir Signed-off-by: Nico Schottelius --- bin/cdist-config | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 596e4980..a38db028 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -29,13 +29,13 @@ set -u # Names / Constants : ${__cdist_name_bin:=bin} -: ${__cdist_name_cache:=cache} : ${__cdist_name_code:=code} : ${__cdist_name_explorer:=explorers} : ${__cdist_name_gencode:=gencode} : ${__cdist_name_host:=hosts} : ${__cdist_name_init:=init} : ${__cdist_name_out_dir:=out_dir} +: ${__cdist_name_conf_dir:=out_dir} # Name of the manifest file in types : ${__cdist_name_manifest:=manifest} @@ -65,34 +65,31 @@ set -u : ${__cdist_manifest_init:=$__cdist_manifest_dir/$__cdist_name_init} : ${__cdist_type_dir:=$__cdist_config/$__cdist_name_type} -# Cache -: ${__cdist_cache_dir:=$__cdist_config/cache} -: ${__cdist_cache_hosts:=$__cdist_cache_dir/$__cdist_name_host} -: ${__cdist_cache_bin:=$__cdist_cache_dir/$__cdist_name_bin} - # Used for IDs __cdist_sane_regexp='[A-Za-z0-9]*[-A-Za-z0-9_]*' # Default remote user : ${__cdist_remote_user:=root} -# Remote paths +# Remote base : ${__cdist_remote_base_dir:=/var/lib/cdist} -: ${__cdist_remote_explorer_dir:=$__cdist_remote_base_dir/$__cdist_name_explorer} -: ${__cdist_remote_cache_dir:=$__cdist_remote_base_dir/$__cdist_name_cache} -: ${__cdist_remote_cache_explorer:=$__cdist_remote_cache_dir/$__cdist_name_explorer} -: ${__cdist_remote_cache_bin:=$__cdist_remote_base_dir/$__cdist_name_bin} -: ${__cdist_remote_cache_exec:=$__cdist_remote_base_dir/$__cdist_name_exec} + +# Remote config +: ${__cdist_remote_conf_dir:=$__cdist_remote_base_dir/$__cdist_name_conf_dir} +: ${__cdist_remote_explorer_dir:=$__cdist_remote_conf_dir/$__cdist_name_explorer} + +# Remote out +: ${__cdist_remote_out_dir:=$__cdist_remote_base_dir/$__cdist_name_out_dir} +: ${__cdist_remote_out_explorer_dir:=$__cdist_remote_out_dir/$__cdist_name_explorer} # Tempfiles __cdist_tmp_dir=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX") -export __cdist_tmp_dir __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") -export __cdist_tmp_file # Local output base directory : ${__cdist_out_dir:=$__cdist_tmp_dir/$__cdist_name_out_dir} : ${__cdist_out_explorer_dir:=$__cdist_out_dir/$__cdist_name_explorer} +: ${__cdist_out_object_dir:=$__cdist_out_dir/$__cdist_name_object} ################################################################################ @@ -124,10 +121,10 @@ __cdist_usage() __cdist_exit_err "$__cdist_myname: $@" } -__cdist_cache_host() -{ - echo "${__cdist_cache_hosts}/${__cdist_target_host}" -} +# __cdist_cache_host() +# { +# echo "${__cdist_cache_hosts}/${__cdist_target_host}" +# } __cdist_type_mydir() { From a48efaf355b587826e09e929fb04a08abaad6975 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 16:25:26 +0100 Subject: [PATCH 0373/6109] nexttodo Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index f58fb61a..82253c4c 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,3 +1,5 @@ add explorers per type/object - create clean trees locally and remote - - invent cdist-dir-{push|pull} for directory exchange (same name) + - define paths in cdist-config + - rewrite cdist-explorer-run + - define helpers on the remote side (like cdist-explorer-coordinator) From 6ffd99fe6799808966bd3a301732e875673628d5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 16:25:41 +0100 Subject: [PATCH 0374/6109] cleanup and break bin/cdist-deploy-to Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 1c7a142d..2bcf26cc 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -27,30 +27,24 @@ set -eu __cdist_target_host="$1" -: ${__cdist_out_objects:="$__cdist_tmp_dir/$__cdist_name_object"} -: ${__cdist_out_execs:="$__cdist_tmp_dir/$__cdist_name_exec"} - -export __cdist_out_objects -export __cdist_out_execs - # See cdist-stages(7) cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" exit 2 -cdist-manifest-init "$__cdist_target_host" "$__cdist_out_objects" -cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_objects" -cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_objects" +cdist-manifest-init "$__cdist_target_host" "$__cdist_out_object_dir" +cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" +cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" exit 0 -cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_objects" "$__cdist_out_execs" +cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_object_dir" "$__cdist_out_execs" cdist-exec-transfer "$__cdist_target_host" "$__cdist_out_execs" cdist-exec-run "$__cdist_target_host" # FIXME: Create new cache from results: -# cdist-cache-copy "$__cdist_target_host" __cdist_out_explorers __cdist_out_objects __cdist_out_execs +# cdist-cache-copy "$__cdist_target_host" __cdist_out_explorers __cdist_out_object_dir __cdist_out_execs # or similar, better with one directory # # echo rm -rf "$(__cdist_cache_host)" # mkdir -p "$(__cdist_cache_host)" -# mv "$__cdist_out_explorers" "$__cdist_out_objects" "$(__cdist_cache_host)" +# mv "$__cdist_out_explorers" "$__cdist_out_object_dir" "$(__cdist_cache_host)" # Also save last code fragment # mv "$tmp_code" "$(__cdist_cache_host)" From edc4bf6a479c9e955c1b35855782e8d86e73e8d2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 16:31:28 +0100 Subject: [PATCH 0375/6109] add template for cdist-explorer-remote-run Signed-off-by: Nico Schottelius --- conf/helper/cdist-explorer-remote-run | 71 +++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100755 conf/helper/cdist-explorer-remote-run diff --git a/conf/helper/cdist-explorer-remote-run b/conf/helper/cdist-explorer-remote-run new file mode 100755 index 00000000..dd0886e0 --- /dev/null +++ b/conf/helper/cdist-explorer-remote-run @@ -0,0 +1,71 @@ +#!/bin/sh +# +# 2010-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 . +# +# +# FIXME: Replace * references: * breaks if there is no explorer +# or FIXME: check that there is at least one explorer? +# + + +. cdist-config +if [ $# -lt 3 ]; then + __cdist_usage " [explorer args]" +fi +set -ue + +__cdist_target_host="$1"; shift +__cdist_remote_src_dir="$1"; shift +__cdist_remote_dst_dir="$1"; shift + +# Create remote destination directory +ssh "${__cdist_remote_user}@${__cdist_target_host}" \ + "mkdir -p \"${__cdist_remote_dst_dir}\"" + +# FIXME: enable -q as soon as the code is cleaned up +cd "${__cdist_local_src_dir}" + +# Ensure there is at least one explorer +num="$(ls -1 | wc -l)" +if [ "$num" -lt 1 ]; then + __cdist_exit_err "${__cdist_local_src_dir}: Contains no explorers" +fi + +# Execute all explorers +for explorer in *; do + if [ -f "$explorer" ]; then + if [ ! -x "$explorer" ]; then + echo "Explorer \"$explorer\" exists, but is not executable." + continue + fi + + # Execute explorers and save results in remote destination directory + ssh "${__cdist_remote_user}@${__cdist_target_host}" \ + "cd \"${__cdist_remote_src_dir}\" && \"./$explorer\" > \ + \"${__cdist_remote_dst_dir}/${explorer}\"" "$@" + else + if [ -e "$explorer" ]; then + echo "Explorer \"$explorer\" exists, but is not a file." + continue + fi + fi +done + +# Copy results back to us +scp "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_dst_dir}/*" \ + "$__cdist_local_dst_dir" From 995bf8d963122c4912c2f8234c34b520685c526f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 16:45:38 +0100 Subject: [PATCH 0376/6109] a giant commit into the future Signed-off-by: Nico Schottelius --- bin/cdist-config | 8 ++++-- bin/cdist-deploy-to | 12 ++++++++- bin/cdist-explorer-run | 18 +++---------- bin/cdist-explorer-run-init | 18 +++++++++---- bin/cdist-object-explorer-all | 4 +++ conf/helper/cdist-explorer-remote-run | 38 ++++++++++----------------- 6 files changed, 52 insertions(+), 46 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index a38db028..31a83997 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -21,8 +21,9 @@ # Print configuration directories - helper for all other scripts # -# Fail if something bogus is going on -set -u +# Fail if something bogus is going on and export all variables +# The export is mainly needed for remote knowledge +set -au # Values can be overriden from outside, so you can # customise paths as you like (for distributors, geeks and hackers) @@ -32,6 +33,7 @@ set -u : ${__cdist_name_code:=code} : ${__cdist_name_explorer:=explorers} : ${__cdist_name_gencode:=gencode} +: ${__cdist_name_helper:=helper} : ${__cdist_name_host:=hosts} : ${__cdist_name_init:=init} : ${__cdist_name_out_dir:=out_dir} @@ -61,6 +63,7 @@ set -u # Base : ${__cdist_config:=/etc/cdist} : ${__cdist_explorer_dir:=$__cdist_config/$__cdist_name_explorer} +: ${__cdist_helper_dir:=$__cdist_config/$__cdist_name_helper} : ${__cdist_manifest_dir:=$__cdist_config/$__cdist_name_manifests} : ${__cdist_manifest_init:=$__cdist_manifest_dir/$__cdist_name_init} : ${__cdist_type_dir:=$__cdist_config/$__cdist_name_type} @@ -77,6 +80,7 @@ __cdist_sane_regexp='[A-Za-z0-9]*[-A-Za-z0-9_]*' # Remote config : ${__cdist_remote_conf_dir:=$__cdist_remote_base_dir/$__cdist_name_conf_dir} : ${__cdist_remote_explorer_dir:=$__cdist_remote_conf_dir/$__cdist_name_explorer} +: ${__cdist_remote_helper_dir:=$__cdist_remote_conf_dir/$__cdist_name_helper} # Remote out : ${__cdist_remote_out_dir:=$__cdist_remote_base_dir/$__cdist_name_out_dir} diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 2bcf26cc..3355a01d 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -27,10 +27,20 @@ set -eu __cdist_target_host="$1" +################################################################################ # See cdist-stages(7) -cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" +# + +# Transfer core helpers plus cdist-config +cdist-dir push "$__cdist_target_host" "${__cdist_helper_dir}" "${__cdist_remote_helper_dir}" +scp "$(which cdist-config)" \ + "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_helper_dir}" exit 2 + +# Execute explorer +cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" + cdist-manifest-init "$__cdist_target_host" "$__cdist_out_object_dir" cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index b2d849b5..dd0886e0 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -24,25 +24,18 @@ . cdist-config -if [ $# -lt 5 ]; then - __cdist_usage " [explorer args]" +if [ $# -lt 3 ]; then + __cdist_usage " [explorer args]" fi set -ue __cdist_target_host="$1"; shift - -__cdist_local_src_dir="$1"; shift -__cdist_local_dst_dir="$1"; shift __cdist_remote_src_dir="$1"; shift __cdist_remote_dst_dir="$1"; shift -# Create remote source and destination directory +# Create remote destination directory ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "mkdir -p \"${__cdist_remote_src_dir}\" \ - \"${__cdist_remote_dst_dir}\"" - -# Ensure local destination directory exists -mkdir -p "$__cdist_local_dst_dir" + "mkdir -p \"${__cdist_remote_dst_dir}\"" # FIXME: enable -q as soon as the code is cleaned up cd "${__cdist_local_src_dir}" @@ -53,9 +46,6 @@ if [ "$num" -lt 1 ]; then __cdist_exit_err "${__cdist_local_src_dir}: Contains no explorers" fi -# Copy all explorers to remote source directory -scp * "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_src_dir}" - # Execute all explorers for explorer in *; do if [ -f "$explorer" ]; then diff --git a/bin/cdist-explorer-run-init b/bin/cdist-explorer-run-init index e1ed2382..1e4e0d18 100755 --- a/bin/cdist-explorer-run-init +++ b/bin/cdist-explorer-run-init @@ -18,16 +18,24 @@ # along with cdist. If not, see . # # -# Run the global explorers, i.e. not bound to types +# Copy & run the general explorers, i.e. not bound to types # . cdist-config -[ $# -eq 2 ] || __cdist_usage " " +[ $# -eq 2 ] || __cdist_usage " " set -ue __cdist_target_host="$1"; shift -__cdist_output_dir="$1"; shift +__cdist_my_out_dir="$1"; shift +# copy the explorers +cdist-dir push "$__cdist_target_host" \ + "${__cdist_explorer_dir}" "${__cdist_remote_explorer_dir}" + +# run the explorers remotely cdist-explorer-run "$__cdist_target_host" \ - "$__cdist_explorer_dir" "$__cdist_output_dir" \ - "$__cdist_remote_explorer_dir" "$__cdist_remote_cache_explorer" + "$__cdist_remote_explorer_dir" "$__cdist_remote_out_explorer_dir" + +# retrieve the results +cdist-dir pull "$__cdist_target_host" \ + "${__cdist_remote_out_explorer_dir}" "${__cdist_my_out_dir}" diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all index aead9e49..cd4fee6f 100755 --- a/bin/cdist-object-explorer-all +++ b/bin/cdist-object-explorer-all @@ -59,6 +59,10 @@ while [ $# -gt 0 ]; do # Copy directory, needs to be one level above, otherwise subdir is created # FIXME: add -q later ssh "${__cdist_remote_user}@${__cdist_target_host}" "mkdir -p \"$remote_object_dir\"" + + # + ssh "${__cdist_remote_user}@${__cdist_target_host}" "mkdir -p \"$remote_object_dir\"" + scp -r "$local_params_dir" "${__cdist_remote_user}@${__cdist_target_host}:$remote_object_dir" if [ -d "$local_src_dir" ]; then diff --git a/conf/helper/cdist-explorer-remote-run b/conf/helper/cdist-explorer-remote-run index dd0886e0..e2eb1e58 100755 --- a/conf/helper/cdist-explorer-remote-run +++ b/conf/helper/cdist-explorer-remote-run @@ -1,6 +1,6 @@ #!/bin/sh # -# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -18,36 +18,32 @@ # along with cdist. If not, see . # # -# FIXME: Replace * references: * breaks if there is no explorer -# or FIXME: check that there is at least one explorer? -# - . cdist-config if [ $# -lt 3 ]; then - __cdist_usage " [explorer args]" + __cdist_usage " [explorer args]" fi set -ue -__cdist_target_host="$1"; shift -__cdist_remote_src_dir="$1"; shift -__cdist_remote_dst_dir="$1"; shift +# cd to this dir +__cdist_work_dir="$1"; shift -# Create remote destination directory -ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "mkdir -p \"${__cdist_remote_dst_dir}\"" +# find explorers here +__cdist_explorer_dir="$1"; shift -# FIXME: enable -q as soon as the code is cleaned up -cd "${__cdist_local_src_dir}" +# write output here +__cdist_my_out_dir="$1"; shift + +cd "${__cdist_work_dir}" # Ensure there is at least one explorer -num="$(ls -1 | wc -l)" +num="$(ls -1 "$__cdist_explorer_dir" | wc -l)" if [ "$num" -lt 1 ]; then - __cdist_exit_err "${__cdist_local_src_dir}: Contains no explorers" + __cdist_exit_err "${__cdist_explorer_dir}: Contains no explorers" fi # Execute all explorers -for explorer in *; do +for explorer in "$__cdist_explorer_dir/"*; do if [ -f "$explorer" ]; then if [ ! -x "$explorer" ]; then echo "Explorer \"$explorer\" exists, but is not executable." @@ -55,9 +51,7 @@ for explorer in *; do fi # Execute explorers and save results in remote destination directory - ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "cd \"${__cdist_remote_src_dir}\" && \"./$explorer\" > \ - \"${__cdist_remote_dst_dir}/${explorer}\"" "$@" + "$explorer" "$@" > "${__cdist_my_out_dir}" else if [ -e "$explorer" ]; then echo "Explorer \"$explorer\" exists, but is not a file." @@ -65,7 +59,3 @@ for explorer in *; do fi fi done - -# Copy results back to us -scp "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_dst_dir}/*" \ - "$__cdist_local_dst_dir" From 9c9d3b33cf798630faa096e6fcc55b58c529339a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 16:49:39 +0100 Subject: [PATCH 0377/6109] update cdist-explorer-run to almost run again Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 4 +-- bin/cdist-explorer-run | 38 +-------------------------- conf/helper/cdist-explorer-remote-run | 1 + 3 files changed, 4 insertions(+), 39 deletions(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 3355a01d..97538d1f 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -36,11 +36,11 @@ cdist-dir push "$__cdist_target_host" "${__cdist_helper_dir}" "${__cdist_remote_ scp "$(which cdist-config)" \ "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_helper_dir}" -exit 2 - # Execute explorer cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" +exit 2 + cdist-manifest-init "$__cdist_target_host" "$__cdist_out_object_dir" cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index dd0886e0..5654e084 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -30,42 +30,6 @@ fi set -ue __cdist_target_host="$1"; shift -__cdist_remote_src_dir="$1"; shift -__cdist_remote_dst_dir="$1"; shift -# Create remote destination directory ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "mkdir -p \"${__cdist_remote_dst_dir}\"" - -# FIXME: enable -q as soon as the code is cleaned up -cd "${__cdist_local_src_dir}" - -# Ensure there is at least one explorer -num="$(ls -1 | wc -l)" -if [ "$num" -lt 1 ]; then - __cdist_exit_err "${__cdist_local_src_dir}: Contains no explorers" -fi - -# Execute all explorers -for explorer in *; do - if [ -f "$explorer" ]; then - if [ ! -x "$explorer" ]; then - echo "Explorer \"$explorer\" exists, but is not executable." - continue - fi - - # Execute explorers and save results in remote destination directory - ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "cd \"${__cdist_remote_src_dir}\" && \"./$explorer\" > \ - \"${__cdist_remote_dst_dir}/${explorer}\"" "$@" - else - if [ -e "$explorer" ]; then - echo "Explorer \"$explorer\" exists, but is not a file." - continue - fi - fi -done - -# Copy results back to us -scp "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_dst_dir}/*" \ - "$__cdist_local_dst_dir" + "${__cdist_remote_helper_dir}/cdist-explorer-remote-run" "$@" diff --git a/conf/helper/cdist-explorer-remote-run b/conf/helper/cdist-explorer-remote-run index e2eb1e58..a04b0057 100755 --- a/conf/helper/cdist-explorer-remote-run +++ b/conf/helper/cdist-explorer-remote-run @@ -35,6 +35,7 @@ __cdist_explorer_dir="$1"; shift __cdist_my_out_dir="$1"; shift cd "${__cdist_work_dir}" +mkdir -p "$__cdist_my_out_dir" # Ensure there is at least one explorer num="$(ls -1 "$__cdist_explorer_dir" | wc -l)" From b81101ac47a39a1a544e4949a52aa9a5ed35529d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 16:51:47 +0100 Subject: [PATCH 0378/6109] begin introduction of cdist-helper-exec Signed-off-by: Nico Schottelius --- bin/cdist-explorer-run | 5 +++++ doc/dev/todo/niconext | 1 + 2 files changed, 6 insertions(+) diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index 5654e084..c975c35a 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -31,5 +31,10 @@ set -ue __cdist_target_host="$1"; shift +cdist-helper-exec "${__cdist_target_host}" "cdist-explorer-remote-run" "$@" + +exit 23 + +# use this in cdist-helper-exec ssh "${__cdist_remote_user}@${__cdist_target_host}" \ "${__cdist_remote_helper_dir}/cdist-explorer-remote-run" "$@" diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 82253c4c..d6a7e77e 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -3,3 +3,4 @@ add explorers per type/object - define paths in cdist-config - rewrite cdist-explorer-run - define helpers on the remote side (like cdist-explorer-coordinator) + - make cdist-config available / put helpers into path From 926a307234ae16b7fc7d7c5242c3246d1e58571a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 17:55:35 +0100 Subject: [PATCH 0379/6109] transfer all cdist binaries to the target, may be helpful Signed-off-by: Nico Schottelius --- bin/cdist-bin-transfer | 42 +++++++++++++++++++ .../helper => bin}/cdist-explorer-remote-run | 0 2 files changed, 42 insertions(+) create mode 100755 bin/cdist-bin-transfer rename {conf/helper => bin}/cdist-explorer-remote-run (100%) diff --git a/bin/cdist-bin-transfer b/bin/cdist-bin-transfer new file mode 100755 index 00000000..9fd00e0f --- /dev/null +++ b/bin/cdist-bin-transfer @@ -0,0 +1,42 @@ +#!/bin/sh +# +# 2010-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 . +# +# +# Transfer all executables +# + +. cdist-config +[ $# -eq 2 ] || __cdist_usage " " +set -eu + +__cdist_target_host="$1"; shift +__cdist_my_remote_out_dir="$1"; shift + +# Find directory that contains cdist binaries +__cdist_config_path=$(which cdist-config) +__cdist_src_base=${__cdist_config_path%config} + +# re-create basedir so it's clean +ssh "${__cdist_remote_user}@${__cdist_target_host}" \ + "rm -rf \"${__cdist_my_remote_out_dir}\" && mkdir -p \"${__cdist_my_remote_out_dir}\"" + +# FIXME: enable -q as soon as the code is cleaned up +# Transfer cdist-* to the remote host +scp -r "${__cdist_src_base}"* \ + "root@${__cdist_target_host}:${__cdist_my_remote_out_dir}" diff --git a/conf/helper/cdist-explorer-remote-run b/bin/cdist-explorer-remote-run similarity index 100% rename from conf/helper/cdist-explorer-remote-run rename to bin/cdist-explorer-remote-run From 50c533bac32fa3dccb6a3812225a2e947578ce9a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 18:04:29 +0100 Subject: [PATCH 0380/6109] add cdist-remote-run Signed-off-by: Nico Schottelius --- bin/cdist-remote-run | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 bin/cdist-remote-run diff --git a/bin/cdist-remote-run b/bin/cdist-remote-run new file mode 100755 index 00000000..8b3915fc --- /dev/null +++ b/bin/cdist-remote-run @@ -0,0 +1,32 @@ +#!/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 . +# +# +# Run a cdist binary on the remote side +# + +. cdist-config +[ $# -ge 2 ] || __cdist_usage " [opts]" +set -ue + +__cdist_target_host="$1"; shift +__cdist_remote_binary="$1"; shift + +ssh "${__cdist_remote_user}@${__cdist_target_host}" \ + "PATH=\"${__cdist_remote_bin_dir}:\$PATH\" \"$__cdist_remote_binary\"" "$@" From 2e0d1b78fb0551543db8f115df728f41fca94b14 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 18:10:26 +0100 Subject: [PATCH 0381/6109] rename: cdist-remote-* = remote Signed-off-by: Nico Schottelius --- bin/cdist-config | 6 ++---- bin/cdist-explorer-run | 11 ++--------- ...-explorer-remote-run => cdist-remote-explorer-run} | 0 bin/{cdist-remote-run => cdist-run-remote} | 0 4 files changed, 4 insertions(+), 13 deletions(-) rename bin/{cdist-explorer-remote-run => cdist-remote-explorer-run} (100%) rename bin/{cdist-remote-run => cdist-run-remote} (100%) diff --git a/bin/cdist-config b/bin/cdist-config index 31a83997..8deaa86b 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -33,7 +33,6 @@ set -au : ${__cdist_name_code:=code} : ${__cdist_name_explorer:=explorers} : ${__cdist_name_gencode:=gencode} -: ${__cdist_name_helper:=helper} : ${__cdist_name_host:=hosts} : ${__cdist_name_init:=init} : ${__cdist_name_out_dir:=out_dir} @@ -63,7 +62,6 @@ set -au # Base : ${__cdist_config:=/etc/cdist} : ${__cdist_explorer_dir:=$__cdist_config/$__cdist_name_explorer} -: ${__cdist_helper_dir:=$__cdist_config/$__cdist_name_helper} : ${__cdist_manifest_dir:=$__cdist_config/$__cdist_name_manifests} : ${__cdist_manifest_init:=$__cdist_manifest_dir/$__cdist_name_init} : ${__cdist_type_dir:=$__cdist_config/$__cdist_name_type} @@ -80,9 +78,9 @@ __cdist_sane_regexp='[A-Za-z0-9]*[-A-Za-z0-9_]*' # Remote config : ${__cdist_remote_conf_dir:=$__cdist_remote_base_dir/$__cdist_name_conf_dir} : ${__cdist_remote_explorer_dir:=$__cdist_remote_conf_dir/$__cdist_name_explorer} -: ${__cdist_remote_helper_dir:=$__cdist_remote_conf_dir/$__cdist_name_helper} +: ${__cdist_remote_bin_dir:=$__cdist_remote_conf_dir/$__cdist_name_bin} -# Remote out +# Remot} out : ${__cdist_remote_out_dir:=$__cdist_remote_base_dir/$__cdist_name_out_dir} : ${__cdist_remote_out_explorer_dir:=$__cdist_remote_out_dir/$__cdist_name_explorer} diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index c975c35a..e558015e 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -18,8 +18,7 @@ # along with cdist. If not, see . # # -# FIXME: Replace * references: * breaks if there is no explorer -# or FIXME: check that there is at least one explorer? +# Run already copied explorers # @@ -31,10 +30,4 @@ set -ue __cdist_target_host="$1"; shift -cdist-helper-exec "${__cdist_target_host}" "cdist-explorer-remote-run" "$@" - -exit 23 - -# use this in cdist-helper-exec -ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "${__cdist_remote_helper_dir}/cdist-explorer-remote-run" "$@" +cdist-run-remote "${__cdist_target_host}" "cdist-remote-explorer-run" "$@" diff --git a/bin/cdist-explorer-remote-run b/bin/cdist-remote-explorer-run similarity index 100% rename from bin/cdist-explorer-remote-run rename to bin/cdist-remote-explorer-run diff --git a/bin/cdist-remote-run b/bin/cdist-run-remote similarity index 100% rename from bin/cdist-remote-run rename to bin/cdist-run-remote From 45237ec5ae42654ee5d01fb65d81378ad59f4883 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 18:13:08 +0100 Subject: [PATCH 0382/6109] conf != out 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 8deaa86b..d9e35c02 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -36,7 +36,7 @@ set -au : ${__cdist_name_host:=hosts} : ${__cdist_name_init:=init} : ${__cdist_name_out_dir:=out_dir} -: ${__cdist_name_conf_dir:=out_dir} +: ${__cdist_name_conf_dir:=conf_dir} # Name of the manifest file in types : ${__cdist_name_manifest:=manifest} From 609b92b661165ffa6ac0e501ceaf48445788a222 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 18:17:15 +0100 Subject: [PATCH 0383/6109] update to new binaries Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 6 ++---- bin/cdist-explorer-run | 4 ++-- bin/cdist-remote-explorer-run | 2 ++ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 97538d1f..50bb48b8 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -31,10 +31,8 @@ __cdist_target_host="$1" # See cdist-stages(7) # -# Transfer core helpers plus cdist-config -cdist-dir push "$__cdist_target_host" "${__cdist_helper_dir}" "${__cdist_remote_helper_dir}" -scp "$(which cdist-config)" \ - "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_helper_dir}" +# Transfer cdist "binaries" +cdist-bin-transfer "$__cdist_target_host" "${__cdist_remote_bin_dir}" # Execute explorer cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run index e558015e..fde3512c 100755 --- a/bin/cdist-explorer-run +++ b/bin/cdist-explorer-run @@ -23,8 +23,8 @@ . cdist-config -if [ $# -lt 3 ]; then - __cdist_usage " [explorer args]" +if [ $# -lt 4 ]; then + __cdist_usage " [explorer args]" fi set -ue diff --git a/bin/cdist-remote-explorer-run b/bin/cdist-remote-explorer-run index a04b0057..5dbea39c 100755 --- a/bin/cdist-remote-explorer-run +++ b/bin/cdist-remote-explorer-run @@ -18,6 +18,8 @@ # along with cdist. If not, see . # # +# This binary is executed on the remote side to execute explorers +# . cdist-config if [ $# -lt 3 ]; then From f58f1c91e4a93a77dfd18b9f37bea77422dd4360 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 18:24:51 +0100 Subject: [PATCH 0384/6109] write to explorer name Signed-off-by: Nico Schottelius --- bin/cdist-remote-explorer-run | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/cdist-remote-explorer-run b/bin/cdist-remote-explorer-run index 5dbea39c..26708101 100755 --- a/bin/cdist-remote-explorer-run +++ b/bin/cdist-remote-explorer-run @@ -47,6 +47,8 @@ fi # Execute all explorers for explorer in "$__cdist_explorer_dir/"*; do + explorer_name="${explorer##*/}" + if [ -f "$explorer" ]; then if [ ! -x "$explorer" ]; then echo "Explorer \"$explorer\" exists, but is not executable." @@ -54,7 +56,7 @@ for explorer in "$__cdist_explorer_dir/"*; do fi # Execute explorers and save results in remote destination directory - "$explorer" "$@" > "${__cdist_my_out_dir}" + "$explorer" "$@" > "${__cdist_my_out_dir}/$explorer_name" else if [ -e "$explorer" ]; then echo "Explorer \"$explorer\" exists, but is not a file." From 978ed2c75f01961fc8890cfe3c6a50d77fddaffb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 18:25:25 +0100 Subject: [PATCH 0385/6109] also submit working directory Signed-off-by: Nico Schottelius --- bin/cdist-explorer-run-init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-explorer-run-init b/bin/cdist-explorer-run-init index 1e4e0d18..e03c4fea 100755 --- a/bin/cdist-explorer-run-init +++ b/bin/cdist-explorer-run-init @@ -32,8 +32,8 @@ __cdist_my_out_dir="$1"; shift cdist-dir push "$__cdist_target_host" \ "${__cdist_explorer_dir}" "${__cdist_remote_explorer_dir}" -# run the explorers remotely -cdist-explorer-run "$__cdist_target_host" \ +# run the initial explorers remotely +cdist-explorer-run "$__cdist_target_host" "$__cdist_remote_base_dir" \ "$__cdist_remote_explorer_dir" "$__cdist_remote_out_explorer_dir" # retrieve the results From fde8b2b1b9fbeb650ed6ea5a3b910ab7b881398e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 18:30:06 +0100 Subject: [PATCH 0386/6109] out does not need _dir in the fs Signed-off-by: Nico Schottelius --- bin/cdist-config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index d9e35c02..77f60605 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -35,8 +35,8 @@ set -au : ${__cdist_name_gencode:=gencode} : ${__cdist_name_host:=hosts} : ${__cdist_name_init:=init} -: ${__cdist_name_out_dir:=out_dir} -: ${__cdist_name_conf_dir:=conf_dir} +: ${__cdist_name_out_dir:=out} +: ${__cdist_name_conf_dir:=conf} # Name of the manifest file in types : ${__cdist_name_manifest:=manifest} @@ -80,7 +80,7 @@ __cdist_sane_regexp='[A-Za-z0-9]*[-A-Za-z0-9_]*' : ${__cdist_remote_explorer_dir:=$__cdist_remote_conf_dir/$__cdist_name_explorer} : ${__cdist_remote_bin_dir:=$__cdist_remote_conf_dir/$__cdist_name_bin} -# Remot} out +# Remote out : ${__cdist_remote_out_dir:=$__cdist_remote_base_dir/$__cdist_name_out_dir} : ${__cdist_remote_out_explorer_dir:=$__cdist_remote_out_dir/$__cdist_name_explorer} From 0bf48923a9b437d7cc66e5ea565fb18e2b22988b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 18:36:02 +0100 Subject: [PATCH 0387/6109] change explorer to use locally available path Signed-off-by: Nico Schottelius --- bin/{cdist-build-bin => cdist-type-build-emulation} | 0 bin/{cdist_tree_wrapper => cdist-type-emulator} | 0 conf/explorers/pkg_system | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename bin/{cdist-build-bin => cdist-type-build-emulation} (100%) rename bin/{cdist_tree_wrapper => cdist-type-emulator} (100%) diff --git a/bin/cdist-build-bin b/bin/cdist-type-build-emulation similarity index 100% rename from bin/cdist-build-bin rename to bin/cdist-type-build-emulation diff --git a/bin/cdist_tree_wrapper b/bin/cdist-type-emulator similarity index 100% rename from bin/cdist_tree_wrapper rename to bin/cdist-type-emulator diff --git a/conf/explorers/pkg_system b/conf/explorers/pkg_system index dc1bd129..d6467631 100755 --- a/conf/explorers/pkg_system +++ b/conf/explorers/pkg_system @@ -19,7 +19,7 @@ # # -case "$(./os)" in +case "$(./conf/explorers/os)" in archlinux) echo pacman ;; debian|ubuntu) echo apt ;; gentoo) echo emerge ;; From 0b94a11d27a9256b146e89ccc5cfaee4bf684cd0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 18:40:58 +0100 Subject: [PATCH 0388/6109] implement the rename to cdist-type-build-emulation in cdist-manifest-run and cleanups Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 ++ bin/cdist-deploy-to | 4 +++- bin/cdist-manifest-run | 4 ++-- bin/cdist-type-build-emulation | 11 +++++------ 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 77f60605..1976db86 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -37,6 +37,7 @@ set -au : ${__cdist_name_init:=init} : ${__cdist_name_out_dir:=out} : ${__cdist_name_conf_dir:=conf} +: ${__cdist_name_type_bin:=type_bin} # Name of the manifest file in types : ${__cdist_name_manifest:=manifest} @@ -92,6 +93,7 @@ __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") : ${__cdist_out_dir:=$__cdist_tmp_dir/$__cdist_name_out_dir} : ${__cdist_out_explorer_dir:=$__cdist_out_dir/$__cdist_name_explorer} : ${__cdist_out_object_dir:=$__cdist_out_dir/$__cdist_name_object} +: ${__cdist_out_type_bin_dir:=$__cdist_out_dir/$__cdist_name_type_bin} ################################################################################ diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 50bb48b8..54cd4623 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -37,9 +37,11 @@ cdist-bin-transfer "$__cdist_target_host" "${__cdist_remote_bin_dir}" # Execute explorer cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" +# Create initial object base +cdist-manifest-init "$__cdist_target_host" "$__cdist_out_object_dir" + exit 2 -cdist-manifest-init "$__cdist_target_host" "$__cdist_out_object_dir" cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" exit 0 diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 5d617444..48990edb 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -31,10 +31,10 @@ export __cdist_manifest="$1"; shift export __cdist_output_dir="$1"; shift # Ensure binaries exist and are up-to-date -cdist-build-bin || __cdist_exit_err "Failed to build support binaries" +cdist-type-build-emulation || __cdist_exit_err "Failed to build type emulation binaries" # prepend our path, so all cdist tools come before other tools -PATH="${__cdist_cache_bin}:$PATH" +PATH="${__cdist_out_type_bin_dir}:$PATH" # Force -x, so the user is aware the file is executed if [ ! -x "${__cdist_manifest}" ]; then diff --git a/bin/cdist-type-build-emulation b/bin/cdist-type-build-emulation index 18b0dfbb..e5def2bd 100755 --- a/bin/cdist-type-build-emulation +++ b/bin/cdist-type-build-emulation @@ -1,6 +1,6 @@ #!/bin/sh # -# 2010 Nico Schottelius (nico-cdist at schottelius.org) +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -17,15 +17,14 @@ # You should have received a copy of the GNU General Public License # along with cdist. If not, see . # -# Build pseudo binaries +# Build pseudo binaries for type emulation # . cdist-config - set -aeu # FIXME: load this from the cdist-core library -__cdist_tree_wrapper="$(which cdist_tree_wrapper)" +__cdist_type_emulator="$(which cdist-type-emulator)" if [ ! -d ${__cdist_type_dir} ]; then __cdist_exit_err "$__cdist_type_dir must exist and contain available types" @@ -36,7 +35,7 @@ cd "${__cdist_type_dir}" ls -1 > "${__cdist_tmp_file}" # Create binaries -mkdir -p "${__cdist_cache_bin}" +mkdir -p "${__cdist_out_type_bin_dir}" while read type; do - ln -sf "${__cdist_tree_wrapper}" "${__cdist_cache_bin}/${type}" + ln -sf "${__cdist_type_emulator}" "${__cdist_out_type_bin_dir}/${type}" done < "${__cdist_tmp_file}" From c9a146a2a205324dce97aa07351159b21bba624b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 18:42:30 +0100 Subject: [PATCH 0389/6109] +2011 :-) Signed-off-by: Nico Schottelius --- bin/cdist-manifest-init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-manifest-init b/bin/cdist-manifest-init index 6a29ea9e..2b9ae00b 100755 --- a/bin/cdist-manifest-init +++ b/bin/cdist-manifest-init @@ -1,6 +1,6 @@ #!/bin/sh # -# 2010 Nico Schottelius (nico-cdist at schottelius.org) +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # From e6c45334647da74b605e33353a236245d5e0da1e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 19:01:29 +0100 Subject: [PATCH 0390/6109] BREAK: rename __cdist_config to __cdist_conf_dir Signed-off-by: Nico Schottelius --- HACKERS_README | 2 +- bin/cdist-bin-transfer | 4 ++-- bin/cdist-config | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index 9f196482..46d4b589 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -25,7 +25,7 @@ set -x # prepare use (only from top level directory) export PATH="$PATH:$(pwd -P)/bin" -export __cdist_config="$(pwd -P)/conf" +export __cdist_conf_dir="$(pwd -P)/conf" # Change paths so we can debug stuff :-) export __cdist_out_dir=/tmp/localhost diff --git a/bin/cdist-bin-transfer b/bin/cdist-bin-transfer index 9fd00e0f..53037698 100755 --- a/bin/cdist-bin-transfer +++ b/bin/cdist-bin-transfer @@ -29,8 +29,8 @@ __cdist_target_host="$1"; shift __cdist_my_remote_out_dir="$1"; shift # Find directory that contains cdist binaries -__cdist_config_path=$(which cdist-config) -__cdist_src_base=${__cdist_config_path%config} +__cdist_conf_dir_path=$(which cdist-config) +__cdist_src_base=${__cdist_conf_dir_path%config} # re-create basedir so it's clean ssh "${__cdist_remote_user}@${__cdist_target_host}" \ diff --git a/bin/cdist-config b/bin/cdist-config index 1976db86..5dccf4ea 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -61,11 +61,11 @@ set -au : ${__cdist_name_object_finished:=.done} # Base -: ${__cdist_config:=/etc/cdist} -: ${__cdist_explorer_dir:=$__cdist_config/$__cdist_name_explorer} -: ${__cdist_manifest_dir:=$__cdist_config/$__cdist_name_manifests} +: ${__cdist_conf_dir:=/etc/cdist} +: ${__cdist_explorer_dir:=$__cdist_conf_dir/$__cdist_name_explorer} +: ${__cdist_manifest_dir:=$__cdist_conf_dir/$__cdist_name_manifests} : ${__cdist_manifest_init:=$__cdist_manifest_dir/$__cdist_name_init} -: ${__cdist_type_dir:=$__cdist_config/$__cdist_name_type} +: ${__cdist_type_dir:=$__cdist_conf_dir/$__cdist_name_type} # Used for IDs __cdist_sane_regexp='[A-Za-z0-9]*[-A-Za-z0-9_]*' From 957ab446fa64eb320443967295987634824981c0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 19:05:46 +0100 Subject: [PATCH 0391/6109] introduce __cdist_local_base_dir and use it in HACKERS_README This way out/ and conf/ are debugable. Signed-off-by: Nico Schottelius --- HACKERS_README | 5 ++--- bin/cdist-config | 3 ++- bin/cdist-deploy-to | 5 +++-- conf/types/__issue/manifest | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index 46d4b589..004b8612 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -27,10 +27,9 @@ set -x export PATH="$PATH:$(pwd -P)/bin" export __cdist_conf_dir="$(pwd -P)/conf" -# Change paths so we can debug stuff :-) -export __cdist_out_dir=/tmp/localhost +export __cdist_local_base_dir=/tmp/localhost target="${1:-localhost}" cdist-deploy-to "$target" -find "${__cdist_out_dir}" +find "${__cdist_local_base_dir}" diff --git a/bin/cdist-config b/bin/cdist-config index 5dccf4ea..2778272e 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -90,7 +90,8 @@ __cdist_tmp_dir=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX") __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") # Local output base directory -: ${__cdist_out_dir:=$__cdist_tmp_dir/$__cdist_name_out_dir} +: ${__cdist_local_base_dir:=$__cdist_tmp_dir} +: ${__cdist_out_dir:=$__cdist_local_base_dir/$__cdist_name_out_dir} : ${__cdist_out_explorer_dir:=$__cdist_out_dir/$__cdist_name_explorer} : ${__cdist_out_object_dir:=$__cdist_out_dir/$__cdist_name_object} : ${__cdist_out_type_bin_dir:=$__cdist_out_dir/$__cdist_name_type_bin} diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 54cd4623..b0132beb 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -40,11 +40,12 @@ cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" # Create initial object base cdist-manifest-init "$__cdist_target_host" "$__cdist_out_object_dir" +# Create dependent objects +cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" + exit 2 -cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" -exit 0 cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_object_dir" "$__cdist_out_execs" cdist-exec-transfer "$__cdist_target_host" "$__cdist_out_execs" cdist-exec-run "$__cdist_target_host" diff --git a/conf/types/__issue/manifest b/conf/types/__issue/manifest index 5236d447..d38aeb92 100755 --- a/conf/types/__issue/manifest +++ b/conf/types/__issue/manifest @@ -21,7 +21,7 @@ destination=/etc/issue -case "$(cat "$__cdist_out_explorers/os")" in +case "$(cat "out/explorers/os")" in archlinux) source="$(pwd -P)/files/archlinux" ;; From c98b84ba4b50c543365afd87f99bdd8bfe576a8d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 19:11:45 +0100 Subject: [PATCH 0392/6109] have conf/ and out/ locally, similar to the remote side Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index b0132beb..b6203409 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -31,8 +31,14 @@ __cdist_target_host="$1" # See cdist-stages(7) # +# Init base +mkdir -p "$__cdist_local_base_dir" + +# Link configuration source directory - consistent with remote +ln -sf "$__cdist_conf_dir" "$__cdist_local_base_dir/$__cdist_name_conf_dir" + # Transfer cdist "binaries" -cdist-bin-transfer "$__cdist_target_host" "${__cdist_remote_bin_dir}" +cdist-bin-transfer "$__cdist_target_host" "$__cdist_remote_bin_dir" # Execute explorer cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" From 5a7ffff077e8b5ac7ab6ade908c40a134c1a992b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Feb 2011 19:25:41 +0100 Subject: [PATCH 0393/6109] document bug 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 b6203409..c4fb2289 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -46,7 +46,7 @@ cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" # Create initial object base cdist-manifest-init "$__cdist_target_host" "$__cdist_out_object_dir" -# Create dependent objects +# Create dependent objects - BUG: does not abort on error in manifest!!!! cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" exit 2 From 57c60a40a8e4a4db29b204434de9b594ebe313e8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 09:37:31 +0100 Subject: [PATCH 0394/6109] make cdist-manifest-run change the working dir Signed-off-by: Nico Schottelius --- bin/cdist-manifest-init | 3 ++- bin/cdist-manifest-run | 10 ++++++---- bin/cdist-manifest-run-all | 8 ++------ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/bin/cdist-manifest-init b/bin/cdist-manifest-init index 2b9ae00b..9e8a346f 100755 --- a/bin/cdist-manifest-init +++ b/bin/cdist-manifest-init @@ -29,4 +29,5 @@ set -e export __cdist_target_host="$1"; shift export __cdist_output_dir="$1"; shift -cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest_init" "$__cdist_output_dir" +cdist-manifest-run "$__cdist_target_host" "$__cdist_local_base_dir" \ + "$__cdist_manifest_init" "$__cdist_output_dir" diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 48990edb..892b3a2f 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -23,12 +23,13 @@ # . cdist-config -[ $# -ge 3 ] || __cdist_usage " [manifest arguments]" +[ $# -ge 4 ] || __cdist_usage " [manifest arguments]" set -u -export __cdist_target_host="$1"; shift -export __cdist_manifest="$1"; shift -export __cdist_output_dir="$1"; shift +__cdist_target_host="$1"; shift +__cdist_work_dir="$1"; shift +__cdist_manifest="$1"; shift +__cdist_output_dir="$1"; shift # Ensure binaries exist and are up-to-date cdist-type-build-emulation || __cdist_exit_err "Failed to build type emulation binaries" @@ -43,4 +44,5 @@ fi mkdir -p "${__cdist_output_dir}" || __cdist_exit_err "Cannot create output dir ${__cdist_output_dir}" +cd "$__cdist_work_dir" || __cdist_exit_err "Cannot change to work dir \"$__cdist_work_dir\"." __cdist_exec_fail_on_error "${__cdist_manifest}" "$@" diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 038b0dc9..ad49bbb4 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -65,12 +65,8 @@ while [ "$__cdist_new_objects_created" = "y" ]; do if [ -x "${__cdist_manifest}" ]; then echo "Executing manifest ${__cdist_manifest} ..." - # Safely change directory, convienent for type-writers - ( - cd "$__cdist_cur_object_dir" - cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" \ - "$__cdist_new_objects_dir" "$__cdist_object_id" - ) + cdist-manifest-run "$__cdist_target_host" "$__cdist_cur_object_dir" \ + "$__cdist_manifest" "$__cdist_new_objects_dir" "$__cdist_object_id" __cdist_object_list "${__cdist_new_objects_dir}" > "$__cdist_new_objects_list" From 2b9acf9f2609b56c2fe8d866621f383fbe24f9d3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 09:41:42 +0100 Subject: [PATCH 0395/6109] adjust issue manifest not to hide error if file is missing Signed-off-by: Nico Schottelius --- conf/types/__issue/manifest | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/types/__issue/manifest b/conf/types/__issue/manifest index d38aeb92..45c3bd98 100755 --- a/conf/types/__issue/manifest +++ b/conf/types/__issue/manifest @@ -20,8 +20,9 @@ # destination=/etc/issue +os="$(cat "out/explorers/os")" -case "$(cat "out/explorers/os")" in +case "$os" in archlinux) source="$(pwd -P)/files/archlinux" ;; From 3af305b1fc396e99b86506a16c0608adffa39c81 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 09:41:53 +0100 Subject: [PATCH 0396/6109] -debug in cdist-manifest-run-all Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index ad49bbb4..5d21b70c 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -60,7 +60,6 @@ while [ "$__cdist_new_objects_created" = "y" ]; do __cdist_type="$(__cdist_type_from_object "$__cdist_object")" __cdist_manifest="$__cdist_type_dir/${__cdist_type}/${__cdist_name_manifest}" - echo $__cdist_manifest if [ -x "${__cdist_manifest}" ]; then echo "Executing manifest ${__cdist_manifest} ..." From f7662c164d495e6f8388857803c9197e86832604 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 24 Feb 2011 09:59:41 +0100 Subject: [PATCH 0397/6109] minor nitpicks Signed-off-by: Steven Armstrong --- doc/man/cdist-config-layout.text | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/man/cdist-config-layout.text b/doc/man/cdist-config-layout.text index be45f873..fef7e1d7 100644 --- a/doc/man/cdist-config-layout.text +++ b/doc/man/cdist-config-layout.text @@ -10,7 +10,7 @@ cdist-config-layout - Usage of paths in cdist DESCRIPTION ----------- -If not otherwise specified, all paths are relative to the configuration +If not specified otherwise, all paths are relative to the configuration directory, which is normally /etc/cdist (but can be changed using environment variables, see cdist-environment(7)). @@ -21,16 +21,16 @@ variables, see cdist-environment(7)). - conf_dir/manifests/init: This is the central entry point used by cdist-manifest-init(1). It is an executable (+x bit set) shell script that can use - values for the explorers to decide which configuration to create + values from the explorers to decide which configuration to create for the specified target host. It should be primary used to define mapping from configurations to hosts. -- conf_dir/manifests/*: All other files in this directory - Cdist does not use them directly, but you can seperate - configuration mappings, if you have a lot of code in the manifest/init - file. This may also be very helpful to have different admins maintain - different groups of hosts. +- conf_dir/manifests/*: + All other files in this directory are not directly used by Cdist, but you + can seperate configuration mappings, if you have a lot of code in the + manifest/init file. This may also be very helpful to have different admins + maintain different groups of hosts. - conf_dir/explorers/ Contains explorers to be run on the target hosts, see cdist-explorers(7). From 6e6643d9d1f110d4694628c03e89b9ac7675cd08 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 10:01:31 +0100 Subject: [PATCH 0398/6109] --todo Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 5 ----- 1 file changed, 5 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index d6a7e77e..099464f1 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,6 +1 @@ add explorers per type/object - - create clean trees locally and remote - - define paths in cdist-config - - rewrite cdist-explorer-run - - define helpers on the remote side (like cdist-explorer-coordinator) - - make cdist-config available / put helpers into path From 06ce87a289b5d181881642b2c37ef2f49604a84a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 10:06:56 +0100 Subject: [PATCH 0399/6109] begin to cleanup bin/cdist-object-explorer-all Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 4 +++- bin/cdist-object-explorer-all | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index c4fb2289..88b7aaf9 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -49,9 +49,11 @@ cdist-manifest-init "$__cdist_target_host" "$__cdist_out_object_dir" # Create dependent objects - BUG: does not abort on error in manifest!!!! cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" +# Run explorer of each type for every object of types with explorer +cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" + exit 2 -cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_object_dir" "$__cdist_out_execs" cdist-exec-transfer "$__cdist_target_host" "$__cdist_out_execs" cdist-exec-run "$__cdist_target_host" diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all index cd4fee6f..45628f4a 100755 --- a/bin/cdist-object-explorer-all +++ b/bin/cdist-object-explorer-all @@ -28,6 +28,23 @@ set -eu __cdist_target_host="$1"; shift __cdist_object_base_dir="$1"; shift +################################################################################ +# New code +# + +# Get listing of objects + +# Get listing of types used + +# For every type that has explorers, Transfer the explorers + +# For every object of a type that has explorers, execute the explorers +# and retrieve the results + +################################################################################ +# Old code +# + __cdist_object_list "$__cdist_object_base_dir" > "$__cdist_tmp_file" # need to create pseudo array, as ssh in cdist-explorer-run will destroy while-read loops From 84d141a9457f8f36338c8aff71c0868bc3724288 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 24 Feb 2011 10:07:22 +0100 Subject: [PATCH 0400/6109] doc bugfix: /init/manifest/ Signed-off-by: Steven Armstrong --- doc/man/cdist-config-layout.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/cdist-config-layout.text b/doc/man/cdist-config-layout.text index fef7e1d7..e64b09ab 100644 --- a/doc/man/cdist-config-layout.text +++ b/doc/man/cdist-config-layout.text @@ -39,7 +39,7 @@ variables, see cdist-environment(7)). Contains all available types, which are used to provide some kind of functionality. See cdist-stages(7). -- conf_dir/types//init: +- conf_dir/types//manifest: Used to generate additional objects from a type. See cdist-stages(7), cdist-types(7). From 2831b35aab96e001dd4ab44e806b5b61e4f1a2a2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 12:59:25 +0100 Subject: [PATCH 0401/6109] add log from today Signed-off-by: Nico Schottelius --- doc/dev/logs/2011-02-24 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/dev/logs/2011-02-24 diff --git a/doc/dev/logs/2011-02-24 b/doc/dev/logs/2011-02-24 new file mode 100644 index 00000000..7ba6d3de --- /dev/null +++ b/doc/dev/logs/2011-02-24 @@ -0,0 +1,14 @@ +- Steven, Nico + +- all cdist cores change to the local or remote base dir before excution + of non-core (i.e. manifests, gencode, ...) executables + +- non-core executables get helper information via environment variables: + + general explorers: __explorers + initial manifest: __manifests + type manifests: __object, __object_id + type explorers: __object, __object_id, __type_explorers + type codegen: __object, __object_id + type code: - + From e2ecdd92abebdab6ecdb7bfac4f324f1070c3ecc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 14:15:02 +0100 Subject: [PATCH 0402/6109] remove almost obsolete bin/cdist-explorer-run Signed-off-by: Nico Schottelius --- bin/cdist-explorer-run | 33 --------------------------------- doc/dev/todo/niconext | 1 + 2 files changed, 1 insertion(+), 33 deletions(-) delete mode 100755 bin/cdist-explorer-run diff --git a/bin/cdist-explorer-run b/bin/cdist-explorer-run deleted file mode 100755 index fde3512c..00000000 --- a/bin/cdist-explorer-run +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# -# 2010-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 . -# -# -# Run already copied explorers -# - - -. cdist-config -if [ $# -lt 4 ]; then - __cdist_usage " [explorer args]" -fi -set -ue - -__cdist_target_host="$1"; shift - -cdist-run-remote "${__cdist_target_host}" "cdist-remote-explorer-run" "$@" diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 099464f1..1cd5ccdb 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1 +1,2 @@ add explorers per type/object + - change exec directory for all stages From f5eccb2cb181a9384463b0a09412930939b6c96e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 14:24:47 +0100 Subject: [PATCH 0403/6109] introduce new variable names and use __explorers Signed-off-by: Nico Schottelius --- bin/cdist-config | 3 +++ bin/cdist-explorer-run-init | 5 +++-- bin/cdist-manifest-run | 1 + bin/cdist-object-explorer-all | 14 ++++++++++++-- bin/cdist-remote-explorer-run | 18 ++++++++++++++---- conf/explorers/pkg_system | 10 +++++++--- doc/dev/todo/niconext | 1 + 7 files changed, 41 insertions(+), 11 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 2778272e..662f9515 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -39,6 +39,9 @@ set -au : ${__cdist_name_conf_dir:=conf} : ${__cdist_name_type_bin:=type_bin} +# Exported variable names +: ${__cdist_name_var_explorer:=__$__cdist_name_explorer} + # Name of the manifest file in types : ${__cdist_name_manifest:=manifest} diff --git a/bin/cdist-explorer-run-init b/bin/cdist-explorer-run-init index e03c4fea..96049dcd 100755 --- a/bin/cdist-explorer-run-init +++ b/bin/cdist-explorer-run-init @@ -33,8 +33,9 @@ cdist-dir push "$__cdist_target_host" \ "${__cdist_explorer_dir}" "${__cdist_remote_explorer_dir}" # run the initial explorers remotely -cdist-explorer-run "$__cdist_target_host" "$__cdist_remote_base_dir" \ - "$__cdist_remote_explorer_dir" "$__cdist_remote_out_explorer_dir" +cdist-run-remote "${__cdist_target_host}" cdist-remote-explorer-run \ + "$__cdist_remote_base_dir" "$__cdist_remote_explorer_dir" \ + "$__cdist_name_var_explorer" "$__cdist_remote_out_explorer_dir" # retrieve the results cdist-dir pull "$__cdist_target_host" \ diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 892b3a2f..5ed2c4fe 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -45,4 +45,5 @@ fi mkdir -p "${__cdist_output_dir}" || __cdist_exit_err "Cannot create output dir ${__cdist_output_dir}" cd "$__cdist_work_dir" || __cdist_exit_err "Cannot change to work dir \"$__cdist_work_dir\"." + __cdist_exec_fail_on_error "${__cdist_manifest}" "$@" diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all index 45628f4a..f2a8f42d 100755 --- a/bin/cdist-object-explorer-all +++ b/bin/cdist-object-explorer-all @@ -31,22 +31,32 @@ __cdist_object_base_dir="$1"; shift ################################################################################ # New code # +object_listing="$__cdist_tmp_dir/objects" +type_listing_all="$__cdist_tmp_dir/types_all" +type_listing="$__cdist_tmp_dir/types" # Get listing of objects +__cdist_object_list "$__cdist_object_base_dir" > "$__cdist_tmp_file" # Get listing of types used +while read object; do + echo "$(__cdist_type_from_object "$object")" >> "$type_listing_all" +done < "$__cdist_tmp_file" +sort "$type_listing_all" | uniq > "$type_listing" + +cat "$type_listing" # For every type that has explorers, Transfer the explorers # For every object of a type that has explorers, execute the explorers # and retrieve the results +exit 1 + ################################################################################ # Old code # -__cdist_object_list "$__cdist_object_base_dir" > "$__cdist_tmp_file" - # need to create pseudo array, as ssh in cdist-explorer-run will destroy while-read loops while read object; do set -- "$@" "$object" diff --git a/bin/cdist-remote-explorer-run b/bin/cdist-remote-explorer-run index 26708101..6ec0cbed 100755 --- a/bin/cdist-remote-explorer-run +++ b/bin/cdist-remote-explorer-run @@ -19,23 +19,31 @@ # # # This binary is executed on the remote side to execute explorers +# +# It supports different variables names to be used, so __explorers +# and __type_explorers can be submitted :-) # . cdist-config -if [ $# -lt 3 ]; then - __cdist_usage " [explorer args]" +if [ $# -lt 4 ]; then + __cdist_usage " [explorer args]" fi set -ue # cd to this dir __cdist_work_dir="$1"; shift -# find explorers here +# Find explorers here __cdist_explorer_dir="$1"; shift -# write output here +# Variable that defines the home of the explorers +__cdist_variable_name="$1"; shift + +# Write output here __cdist_my_out_dir="$1"; shift +# Setup environment +eval export $__cdist_variable_name=\"$__cdist_explorer_dir\" cd "${__cdist_work_dir}" mkdir -p "$__cdist_my_out_dir" @@ -45,6 +53,8 @@ if [ "$num" -lt 1 ]; then __cdist_exit_err "${__cdist_explorer_dir}: Contains no explorers" fi +# Setup environment for explorer + # Execute all explorers for explorer in "$__cdist_explorer_dir/"*; do explorer_name="${explorer##*/}" diff --git a/conf/explorers/pkg_system b/conf/explorers/pkg_system index d6467631..552209a1 100755 --- a/conf/explorers/pkg_system +++ b/conf/explorers/pkg_system @@ -19,10 +19,14 @@ # # -case "$(./conf/explorers/os)" in +os="$("$__explorers/os")" + +case "$os" in archlinux) echo pacman ;; debian|ubuntu) echo apt ;; gentoo) echo emerge ;; + *) + echo "Unknown OS: $os" >&2 + exit 1 + ;; esac - -exit 0 diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 1cd5ccdb..6b263955 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,2 +1,3 @@ add explorers per type/object - change exec directory for all stages + - create cdist-remote-explorer-run that sets From 40752d4ac4b129379749a73f8f1fcfcfdfc34324 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 14:28:29 +0100 Subject: [PATCH 0404/6109] remove autoexport from cdist-config 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 662f9515..3e474331 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -23,7 +23,7 @@ # Fail if something bogus is going on and export all variables # The export is mainly needed for remote knowledge -set -au +set -u # Values can be overriden from outside, so you can # customise paths as you like (for distributors, geeks and hackers) From 7db5a808313253b1cd605d1e13a85abcfb3f5ad6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 14:40:30 +0100 Subject: [PATCH 0405/6109] rename cdist-manifest-init to cdist-manifest-run-init Signed-off-by: Nico Schottelius --- bin/{cdist-manifest-init => cdist-manifest-run-init} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename bin/{cdist-manifest-init => cdist-manifest-run-init} (100%) diff --git a/bin/cdist-manifest-init b/bin/cdist-manifest-run-init similarity index 100% rename from bin/cdist-manifest-init rename to bin/cdist-manifest-run-init From 7d766d5376568379ceb691d43e32b399b2690392 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 14:47:52 +0100 Subject: [PATCH 0406/6109] export __manifests Signed-off-by: Nico Schottelius --- bin/cdist-config | 7 ++++--- bin/cdist-deploy-to | 2 +- bin/cdist-manifest-run | 6 ++++-- bin/cdist-manifest-run-all | 3 +++ bin/cdist-manifest-run-init | 9 +++++---- conf/manifests/init | 2 ++ doc/dev/todo/niconext | 2 ++ 7 files changed, 21 insertions(+), 10 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 3e474331..c1179b0d 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -35,15 +35,16 @@ set -u : ${__cdist_name_gencode:=gencode} : ${__cdist_name_host:=hosts} : ${__cdist_name_init:=init} +: ${__cdist_name_manifest:=manifest} +: ${__cdist_name_manifest_dir:=manifests} : ${__cdist_name_out_dir:=out} : ${__cdist_name_conf_dir:=conf} : ${__cdist_name_type_bin:=type_bin} -# Exported variable names +# Exported variable names (usable for non core) : ${__cdist_name_var_explorer:=__$__cdist_name_explorer} +: ${__cdist_name_var_manifest:=__$__cdist_name_manifest_dir} -# Name of the manifest file in types -: ${__cdist_name_manifest:=manifest} # Name of the base directory containing the initial manifests : ${__cdist_name_manifests:=manifests} diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 88b7aaf9..9c042c41 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -44,7 +44,7 @@ cdist-bin-transfer "$__cdist_target_host" "$__cdist_remote_bin_dir" cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" # Create initial object base -cdist-manifest-init "$__cdist_target_host" "$__cdist_out_object_dir" +cdist-manifest-run-init "$__cdist_target_host" "$__cdist_out_object_dir" # Create dependent objects - BUG: does not abort on error in manifest!!!! cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 5ed2c4fe..367ac96f 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -23,14 +23,16 @@ # . cdist-config -[ $# -ge 4 ] || __cdist_usage " [manifest arguments]" +[ $# -ge 3 ] || __cdist_usage " [manifest arguments]" set -u __cdist_target_host="$1"; shift -__cdist_work_dir="$1"; shift __cdist_manifest="$1"; shift __cdist_output_dir="$1"; shift +# Always start from local base +__cdist_work_dir="$__cdist_local_base_dir" + # Ensure binaries exist and are up-to-date cdist-type-build-emulation || __cdist_exit_err "Failed to build type emulation binaries" diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 5d21b70c..5e58a205 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -61,6 +61,9 @@ while [ "$__cdist_new_objects_created" = "y" ]; do __cdist_type="$(__cdist_type_from_object "$__cdist_object")" __cdist_manifest="$__cdist_type_dir/${__cdist_type}/${__cdist_name_manifest}" + # Make __cdist_manifest available for cdist-type-emulator + export __cdist_manifest + if [ -x "${__cdist_manifest}" ]; then echo "Executing manifest ${__cdist_manifest} ..." diff --git a/bin/cdist-manifest-run-init b/bin/cdist-manifest-run-init index 9e8a346f..79329252 100755 --- a/bin/cdist-manifest-run-init +++ b/bin/cdist-manifest-run-init @@ -26,8 +26,9 @@ [ $# -eq 2 ] || __cdist_usage " " set -e -export __cdist_target_host="$1"; shift -export __cdist_output_dir="$1"; shift +__cdist_target_host="$1"; shift +__cdist_output_dir="$1"; shift -cdist-manifest-run "$__cdist_target_host" "$__cdist_local_base_dir" \ - "$__cdist_manifest_init" "$__cdist_output_dir" +eval export $__cdist_name_var_manifest=\"\$__cdist_manifest_dir\" + +cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest_init" "$__cdist_output_dir" diff --git a/conf/manifests/init b/conf/manifests/init index 20714bad..736985fe 100755 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -2,6 +2,8 @@ # This is a sample manifest, but used in real world # +echo $__manifests + # All systems get a file /etc/cdist-managed, so the sysadmin knows # who manages the configuration. #__file /etc/cdist-managed --type file diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 6b263955..21b3883a 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,3 +1,5 @@ add explorers per type/object - change exec directory for all stages - create cdist-remote-explorer-run that sets + - iterate over all stages again + - ensure discussed variables are in place From 368eed50c15576dfbf9d5408fcd2501abc21eb70 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 14:48:20 +0100 Subject: [PATCH 0407/6109] -debug Signed-off-by: Nico Schottelius --- conf/manifests/init | 2 -- 1 file changed, 2 deletions(-) diff --git a/conf/manifests/init b/conf/manifests/init index 736985fe..20714bad 100755 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -2,8 +2,6 @@ # This is a sample manifest, but used in real world # -echo $__manifests - # All systems get a file /etc/cdist-managed, so the sysadmin knows # who manages the configuration. #__file /etc/cdist-managed --type file From 212260b46d2fae4ec65359c51a5cd92207ade446 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 14:51:49 +0100 Subject: [PATCH 0408/6109] cleanup cdist-explorer-run-init, export __explorers to general explorers Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 8 ++++---- bin/cdist-explorer-run-init | 4 ++-- bin/cdist-remote-explorer-run | 18 ++++++++---------- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 9c042c41..cb6fc8da 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -40,9 +40,12 @@ ln -sf "$__cdist_conf_dir" "$__cdist_local_base_dir/$__cdist_name_conf_dir" # Transfer cdist "binaries" cdist-bin-transfer "$__cdist_target_host" "$__cdist_remote_bin_dir" -# Execute explorer +# Execute general explorers cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" + +exit 2 + # Create initial object base cdist-manifest-run-init "$__cdist_target_host" "$__cdist_out_object_dir" @@ -51,9 +54,6 @@ cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" # Run explorer of each type for every object of types with explorer cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" - -exit 2 - cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_object_dir" "$__cdist_out_execs" cdist-exec-transfer "$__cdist_target_host" "$__cdist_out_execs" cdist-exec-run "$__cdist_target_host" diff --git a/bin/cdist-explorer-run-init b/bin/cdist-explorer-run-init index 96049dcd..a6774d11 100755 --- a/bin/cdist-explorer-run-init +++ b/bin/cdist-explorer-run-init @@ -34,8 +34,8 @@ cdist-dir push "$__cdist_target_host" \ # run the initial explorers remotely cdist-run-remote "${__cdist_target_host}" cdist-remote-explorer-run \ - "$__cdist_remote_base_dir" "$__cdist_remote_explorer_dir" \ - "$__cdist_name_var_explorer" "$__cdist_remote_out_explorer_dir" + "$__cdist_name_var_explorer" "$__cdist_remote_explorer_dir" \ + "$__cdist_remote_out_explorer_dir" # retrieve the results cdist-dir pull "$__cdist_target_host" \ diff --git a/bin/cdist-remote-explorer-run b/bin/cdist-remote-explorer-run index 6ec0cbed..1be2afd1 100755 --- a/bin/cdist-remote-explorer-run +++ b/bin/cdist-remote-explorer-run @@ -25,23 +25,23 @@ # . cdist-config -if [ $# -lt 4 ]; then - __cdist_usage " [explorer args]" +if [ $# -lt 3 ]; then + __cdist_usage " [explorer args]" fi set -ue -# cd to this dir -__cdist_work_dir="$1"; shift - -# Find explorers here -__cdist_explorer_dir="$1"; shift - # Variable that defines the home of the explorers __cdist_variable_name="$1"; shift +# Find explorers here +__cdist_explorer_dir="$1"; shift + # Write output here __cdist_my_out_dir="$1"; shift +# cd to this dir +__cdist_work_dir="$__cdist_remote_base_dir" + # Setup environment eval export $__cdist_variable_name=\"$__cdist_explorer_dir\" cd "${__cdist_work_dir}" @@ -53,8 +53,6 @@ if [ "$num" -lt 1 ]; then __cdist_exit_err "${__cdist_explorer_dir}: Contains no explorers" fi -# Setup environment for explorer - # Execute all explorers for explorer in "$__cdist_explorer_dir/"*; do explorer_name="${explorer##*/}" From 93253f7fda8157fe2bd4aa39a81311990252f4a3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 15:05:31 +0100 Subject: [PATCH 0409/6109] export __target_host Signed-off-by: Nico Schottelius --- bin/cdist-config | 3 ++- bin/cdist-deploy-to | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index c1179b0d..6d9090b0 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -39,12 +39,13 @@ set -u : ${__cdist_name_manifest_dir:=manifests} : ${__cdist_name_out_dir:=out} : ${__cdist_name_conf_dir:=conf} +: ${__cdist_name_target_host:=target_host} : ${__cdist_name_type_bin:=type_bin} # Exported variable names (usable for non core) : ${__cdist_name_var_explorer:=__$__cdist_name_explorer} : ${__cdist_name_var_manifest:=__$__cdist_name_manifest_dir} - +: ${__cdist_name_var_target_host:=__$__cdist_name_target_host} # Name of the base directory containing the initial manifests : ${__cdist_name_manifests:=manifests} diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index cb6fc8da..7524e779 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -27,6 +27,9 @@ set -eu __cdist_target_host="$1" +# Make target host available for non-core +export $__cdist_name_var_target_host=\"\$__cdist_target_host\" + ################################################################################ # See cdist-stages(7) # @@ -43,12 +46,11 @@ cdist-bin-transfer "$__cdist_target_host" "$__cdist_remote_bin_dir" # Execute general explorers cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" - -exit 2 - # Create initial object base cdist-manifest-run-init "$__cdist_target_host" "$__cdist_out_object_dir" +exit 2 + # Create dependent objects - BUG: does not abort on error in manifest!!!! cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" From 3fdb5a2e2426c551763faf50e20948a0add598db Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 15:14:00 +0100 Subject: [PATCH 0410/6109] successfully implement __target_host Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 2 +- bin/cdist-manifest-run | 2 +- bin/cdist-remote-explorer-run | 2 +- conf/manifests/init | 8 +++++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 7524e779..553e56c0 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -28,7 +28,7 @@ set -eu __cdist_target_host="$1" # Make target host available for non-core -export $__cdist_name_var_target_host=\"\$__cdist_target_host\" +export $__cdist_name_var_target_host="$__cdist_target_host" ################################################################################ # See cdist-stages(7) diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 367ac96f..8f682b72 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -24,7 +24,7 @@ . cdist-config [ $# -ge 3 ] || __cdist_usage " [manifest arguments]" -set -u +set -ux __cdist_target_host="$1"; shift __cdist_manifest="$1"; shift diff --git a/bin/cdist-remote-explorer-run b/bin/cdist-remote-explorer-run index 1be2afd1..50d5357e 100755 --- a/bin/cdist-remote-explorer-run +++ b/bin/cdist-remote-explorer-run @@ -43,7 +43,7 @@ __cdist_my_out_dir="$1"; shift __cdist_work_dir="$__cdist_remote_base_dir" # Setup environment -eval export $__cdist_variable_name=\"$__cdist_explorer_dir\" +export $__cdist_variable_name="$__cdist_explorer_dir" cd "${__cdist_work_dir}" mkdir -p "$__cdist_my_out_dir" diff --git a/conf/manifests/init b/conf/manifests/init index 20714bad..f28f293e 100755 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -2,12 +2,18 @@ # This is a sample manifest, but used in real world # +# This is debug and should not be in a production environment +echo "Running initial manifest for $__target_host" +echo "We could access other manifests in $__manifests" + +set -x + # All systems get a file /etc/cdist-managed, so the sysadmin knows # who manages the configuration. #__file /etc/cdist-managed --type file # All ikqs get a sample file -case "$__cdist_target_host" in +case "$__target_host" in localhost) __issue iddoesnotmatterhere __file test --type file --destination /tmp/cdist-testfile From bfb1cee403e88a7cf9228ed90b7648250bcd95ba Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 15:19:38 +0100 Subject: [PATCH 0411/6109] export __cdist_output_dir __cdist_manifest for bin/cdist-type-emulator Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 8f682b72..44cf0741 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -33,6 +33,9 @@ __cdist_output_dir="$1"; shift # Always start from local base __cdist_work_dir="$__cdist_local_base_dir" +# Export information for cdist-type-emulator +export __cdist_output_dir __cdist_manifest + # Ensure binaries exist and are up-to-date cdist-type-build-emulation || __cdist_exit_err "Failed to build type emulation binaries" @@ -45,7 +48,6 @@ if [ ! -x "${__cdist_manifest}" ]; then fi mkdir -p "${__cdist_output_dir}" || __cdist_exit_err "Cannot create output dir ${__cdist_output_dir}" - cd "$__cdist_work_dir" || __cdist_exit_err "Cannot change to work dir \"$__cdist_work_dir\"." __cdist_exec_fail_on_error "${__cdist_manifest}" "$@" From ce15edf4d6264aeb1f68018949e3983748e2f65b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 15:23:36 +0100 Subject: [PATCH 0412/6109] do not allow to pass arguments to bin/cdist-manifest-run anymore - use env Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 44cf0741..a24144b8 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -23,8 +23,8 @@ # . cdist-config -[ $# -ge 3 ] || __cdist_usage " [manifest arguments]" -set -ux +[ $# -eq 3 ] || __cdist_usage " " +set -u __cdist_target_host="$1"; shift __cdist_manifest="$1"; shift From 24ce08820edf0c051e3ea2d21eab29b8be4aa7c3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 15:34:17 +0100 Subject: [PATCH 0413/6109] export __object and __object_id Signed-off-by: Nico Schottelius --- bin/cdist-config | 4 ++++ bin/cdist-deploy-to | 4 ++-- bin/cdist-manifest-run-all | 8 ++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 6d9090b0..8a4bb4a6 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -37,6 +37,8 @@ set -u : ${__cdist_name_init:=init} : ${__cdist_name_manifest:=manifest} : ${__cdist_name_manifest_dir:=manifests} +: ${__cdist_name_object:=object} +: ${__cdist_name_object_id:=object_id} : ${__cdist_name_out_dir:=out} : ${__cdist_name_conf_dir:=conf} : ${__cdist_name_target_host:=target_host} @@ -46,6 +48,8 @@ set -u : ${__cdist_name_var_explorer:=__$__cdist_name_explorer} : ${__cdist_name_var_manifest:=__$__cdist_name_manifest_dir} : ${__cdist_name_var_target_host:=__$__cdist_name_target_host} +: ${__cdist_name_var_object:=__$__cdist_name_object} +: ${__cdist_name_var_object_id:=__$__cdist_name_object_id} # Name of the base directory containing the initial manifests : ${__cdist_name_manifests:=manifests} diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 553e56c0..f9217c82 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -49,11 +49,11 @@ cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" # Create initial object base cdist-manifest-run-init "$__cdist_target_host" "$__cdist_out_object_dir" -exit 2 - # Create dependent objects - BUG: does not abort on error in manifest!!!! cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" +exit 2 + # Run explorer of each type for every object of types with explorer cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_object_dir" "$__cdist_out_execs" diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 5e58a205..24ebc102 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -67,8 +67,12 @@ while [ "$__cdist_new_objects_created" = "y" ]; do if [ -x "${__cdist_manifest}" ]; then echo "Executing manifest ${__cdist_manifest} ..." - cdist-manifest-run "$__cdist_target_host" "$__cdist_cur_object_dir" \ - "$__cdist_manifest" "$__cdist_new_objects_dir" "$__cdist_object_id" + # Make variables available to non-core + export $__cdist_name_object="$__cdist_object" + export $__cdist_name_object_id="$__cdist_object_id" + + cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" \ + "$__cdist_new_objects_dir" "$__cdist_object_id" __cdist_object_list "${__cdist_new_objects_dir}" > "$__cdist_new_objects_list" From 97ab2066d4ed8c0641741330efb3c521dd3f7208 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 15:40:34 +0100 Subject: [PATCH 0414/6109] verify: __object_id and __object work in cdist-manifest-run-all Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 24ebc102..c0de5b8b 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -68,8 +68,10 @@ while [ "$__cdist_new_objects_created" = "y" ]; do echo "Executing manifest ${__cdist_manifest} ..." # Make variables available to non-core - export $__cdist_name_object="$__cdist_object" - export $__cdist_name_object_id="$__cdist_object_id" + set -x + export $__cdist_name_var_object="$__cdist_cur_object_dir" + export $__cdist_name_var_object_id="$__cdist_object_id" + set +x cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" \ "$__cdist_new_objects_dir" "$__cdist_object_id" From 241548c6ec49e0b2493919d5829fcc0ab1626ebd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 15:43:53 +0100 Subject: [PATCH 0415/6109] cleanup, -debug Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 4 +--- conf/manifests/init | 7 ------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index c0de5b8b..dcd5222d 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -68,13 +68,11 @@ while [ "$__cdist_new_objects_created" = "y" ]; do echo "Executing manifest ${__cdist_manifest} ..." # Make variables available to non-core - set -x export $__cdist_name_var_object="$__cdist_cur_object_dir" export $__cdist_name_var_object_id="$__cdist_object_id" - set +x cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" \ - "$__cdist_new_objects_dir" "$__cdist_object_id" + "$__cdist_new_objects_dir" __cdist_object_list "${__cdist_new_objects_dir}" > "$__cdist_new_objects_list" diff --git a/conf/manifests/init b/conf/manifests/init index f28f293e..2bc47e15 100755 --- a/conf/manifests/init +++ b/conf/manifests/init @@ -6,13 +6,6 @@ echo "Running initial manifest for $__target_host" echo "We could access other manifests in $__manifests" -set -x - -# All systems get a file /etc/cdist-managed, so the sysadmin knows -# who manages the configuration. -#__file /etc/cdist-managed --type file - -# All ikqs get a sample file case "$__target_host" in localhost) __issue iddoesnotmatterhere From e599e1684c8f1b54cdbf95812735602173271779 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 16:33:08 +0100 Subject: [PATCH 0416/6109] continue on bin/cdist-object-explorer-all, make scp silent Signed-off-by: Nico Schottelius --- bin/cdist-bin-transfer | 3 +-- bin/cdist-config | 6 ++++++ bin/cdist-deploy-to | 7 +++--- bin/cdist-dir | 4 ++-- bin/cdist-object-explorer-all | 40 +++++++++++++++++++++-------------- 5 files changed, 37 insertions(+), 23 deletions(-) diff --git a/bin/cdist-bin-transfer b/bin/cdist-bin-transfer index 53037698..ae204b13 100755 --- a/bin/cdist-bin-transfer +++ b/bin/cdist-bin-transfer @@ -36,7 +36,6 @@ __cdist_src_base=${__cdist_conf_dir_path%config} ssh "${__cdist_remote_user}@${__cdist_target_host}" \ "rm -rf \"${__cdist_my_remote_out_dir}\" && mkdir -p \"${__cdist_my_remote_out_dir}\"" -# FIXME: enable -q as soon as the code is cleaned up # Transfer cdist-* to the remote host -scp -r "${__cdist_src_base}"* \ +scp -qr "${__cdist_src_base}"* \ "root@${__cdist_target_host}:${__cdist_my_remote_out_dir}" diff --git a/bin/cdist-config b/bin/cdist-config index 8a4bb4a6..70013a50 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -89,6 +89,7 @@ __cdist_sane_regexp='[A-Za-z0-9]*[-A-Za-z0-9_]*' : ${__cdist_remote_conf_dir:=$__cdist_remote_base_dir/$__cdist_name_conf_dir} : ${__cdist_remote_explorer_dir:=$__cdist_remote_conf_dir/$__cdist_name_explorer} : ${__cdist_remote_bin_dir:=$__cdist_remote_conf_dir/$__cdist_name_bin} +: ${__cdist_remote_type_dir:=$__cdist_remote_conf_dir/$__cdist_name_type} # Remote out : ${__cdist_remote_out_dir:=$__cdist_remote_base_dir/$__cdist_name_out_dir} @@ -150,6 +151,11 @@ __cdist_type_explorer_dir() echo "${__cdist_type_dir}/$1/$__cdist_name_explorer" } +__cdist_remote_type_explorer_dir() +{ + echo "${__cdist_remote_type_dir}/$1/$__cdist_name_explorer" +} + __cdist_type_gencode() { local type="$1" diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index f9217c82..b0b70220 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -49,13 +49,14 @@ cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" # Create initial object base cdist-manifest-run-init "$__cdist_target_host" "$__cdist_out_object_dir" -# Create dependent objects - BUG: does not abort on error in manifest!!!! +# Create dependent objects cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" -exit 2 - # Run explorer of each type for every object of types with explorer cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" + +exit 2 + cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_object_dir" "$__cdist_out_execs" cdist-exec-transfer "$__cdist_target_host" "$__cdist_out_execs" cdist-exec-run "$__cdist_target_host" diff --git a/bin/cdist-dir b/bin/cdist-dir index 7bdeb644..72f4730b 100755 --- a/bin/cdist-dir +++ b/bin/cdist-dir @@ -43,11 +43,11 @@ __cdist_top_dir="${__cdist_dst_dir%/*}" if [ "$__cdist_action" = "push" ]; then ssh "${__cdist_remote_user}@${__cdist_target_host}" \ "mkdir -p \"${__cdist_dst_dir}\"" - scp -r "$__cdist_src_dir" \ + scp -qr "$__cdist_src_dir" \ "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_top_dir}" elif [ "$__cdist_action" = "pull" ]; then mkdir -p "${__cdist_dst_dir}" - scp -r "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_src_dir}" \ + scp -qr "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_src_dir}" \ "${__cdist_top_dir}" else __cdist_exit_err "Unknown action $__cdist_action" diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all index f2a8f42d..4bcee1ed 100755 --- a/bin/cdist-object-explorer-all +++ b/bin/cdist-object-explorer-all @@ -23,7 +23,7 @@ . cdist-config [ $# -eq 2 ] || __cdist_usage " " -set -eu +set -eux __cdist_target_host="$1"; shift __cdist_object_base_dir="$1"; shift @@ -36,31 +36,46 @@ type_listing_all="$__cdist_tmp_dir/types_all" type_listing="$__cdist_tmp_dir/types" # Get listing of objects -__cdist_object_list "$__cdist_object_base_dir" > "$__cdist_tmp_file" +__cdist_object_list "$__cdist_object_base_dir" > "$object_listing" # Get listing of types used while read object; do echo "$(__cdist_type_from_object "$object")" >> "$type_listing_all" -done < "$__cdist_tmp_file" +done < "$object_listing" sort "$type_listing_all" | uniq > "$type_listing" -cat "$type_listing" +# Create pseudo array to avoid issues with ssh +tc=0 +while read type; do + eval type_$tc=\"\$type\" + tc=$((tc+1)) +done < "$type_listing" # For every type that has explorers, Transfer the explorers +i=0 +while [ "$i" -le "$tc" ]; do + eval cur_type=\"type_$i\" -# For every object of a type that has explorers, execute the explorers -# and retrieve the results + src_dir="$(__cdist_type_explorer_dir "$cur_type")" + dst_dir="$(__cdist_remote_type_explorer_dir "$cur_type")" -exit 1 + if [ -d "$src_dir" ]; then + cdist-dir push "$__cdist_target_host" "$src_dir" "$dst_dir" + fi + i=$((i+1)) +done ################################################################################ -# Old code +# Explorer execution per object # # need to create pseudo array, as ssh in cdist-explorer-run will destroy while-read loops while read object; do set -- "$@" "$object" -done < "$__cdist_tmp_file" +done < "$object_listing" + +# For every object of a type that has explorers, execute the explorers +# and retrieve the results while [ $# -gt 0 ]; do object="$1"; shift @@ -94,13 +109,6 @@ while [ $# -gt 0 ]; do if [ -d "$local_src_dir" ]; then echo "Executing explorers for $object ..." - num="$(ls -1 "$local_src_dir" | wc -l)" - - # Skip if there is not at least one explorer - if [ "$num" -lt 1 ]; then - continue - fi - cdist-explorer-run "$__cdist_target_host" \ "$local_src_dir" "$local_dst_dir" \ "$remote_src_dir" "$remote_dst_dir" \ From 16ac8117b2131013a51527930d918aa23a90ba4c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 17:28:14 +0100 Subject: [PATCH 0417/6109] cleanup much of bin/cdist-object-explorer-all Signed-off-by: Nico Schottelius --- bin/cdist-config | 19 +++++++++---- bin/cdist-object-explorer-all | 52 ++++++++++++----------------------- 2 files changed, 31 insertions(+), 40 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 70013a50..c9df6cad 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -42,10 +42,13 @@ set -u : ${__cdist_name_out_dir:=out} : ${__cdist_name_conf_dir:=conf} : ${__cdist_name_target_host:=target_host} +: ${__cdist_name_type:=types} : ${__cdist_name_type_bin:=type_bin} +: ${__cdist_name_type_explorers:=type_explores} # Exported variable names (usable for non core) : ${__cdist_name_var_explorer:=__$__cdist_name_explorer} +: ${__cdist_name_var_type_explorer:=__$__cdist_name_type_explorers} : ${__cdist_name_var_manifest:=__$__cdist_name_manifest_dir} : ${__cdist_name_var_target_host:=__$__cdist_name_target_host} : ${__cdist_name_var_object:=__$__cdist_name_object} @@ -55,7 +58,6 @@ set -u : ${__cdist_name_manifests:=manifests} : ${__cdist_name_object:=objects} -: ${__cdist_name_type:=types} : ${__cdist_name_params:=parameters} : ${__cdist_name_params_required:=required} : ${__cdist_name_params_optional:=optional} @@ -141,6 +143,11 @@ __cdist_usage() # echo "${__cdist_cache_hosts}/${__cdist_target_host}" # } +__cdist_type_has_explorer() +{ + echo "${__cdist_type_dir}/${__cdist_type_current}" +} + __cdist_type_mydir() { echo "${__cdist_type_dir}/${__cdist_type_current}" @@ -181,12 +188,14 @@ __cdist_object_id_from_object() echo "${1#*/}" } -__cdist_object_arg() +__cdist_object_param_dir() { - local arg="$1"; shift - local object="$1"; shift + echo "${__cdist_object_base_dir}/$1/$__cdist_name_params}" +} - cat "${__cdist_object_base_dir}/${object}/${arg}" +__cdist_remote_object_param_dir() +{ + echo "${__cdist_remote_object_base_dir}/$1/$__cdist_name_params}" } # Find objects, remove ./ and /MARKER diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all index 4bcee1ed..cabc6bf3 100755 --- a/bin/cdist-object-explorer-all +++ b/bin/cdist-object-explorer-all @@ -28,9 +28,6 @@ set -eux __cdist_target_host="$1"; shift __cdist_object_base_dir="$1"; shift -################################################################################ -# New code -# object_listing="$__cdist_tmp_dir/objects" type_listing_all="$__cdist_tmp_dir/types_all" type_listing="$__cdist_tmp_dir/types" @@ -68,7 +65,6 @@ done ################################################################################ # Explorer execution per object # - # need to create pseudo array, as ssh in cdist-explorer-run will destroy while-read loops while read object; do set -- "$@" "$object" @@ -76,43 +72,29 @@ done < "$object_listing" # For every object of a type that has explorers, execute the explorers # and retrieve the results - while [ $# -gt 0 ]; do + # NEW CODE object="$1"; shift object_id="$(__cdist_object_id_from_object "$object")" type="$(__cdist_type_from_object "$object")" + type_explorer_dir="$(__cdist_remote_type_explorer_dir "$object")" + object_explorer_out_dir="$(__cdist_out_type_explorer_dir "$object")" + remote_object_explorer_out_dir="$(__cdist_remote_out_type_explorer_dir "$object")" - local_src_dir="$(__cdist_type_explorer_dir "$type")" - local_dst_dir="$__cdist_object_base_dir/${object}/${__cdist_name_explorer}" + # Always copy object parameters (looks weired if done only for the ones with explorer) + # Really always? - # FIXME: remove path concatenation from here and construct paths only in - # cdist-config! - remote_src_dir="$__cdist_remote_cache_dir/$__cdist_name_type/$type/$__cdist_name_explorer" + # Check if type of object has >= 1 explorer + has_explorer="$(__cdist_type_has_explorer "$type")" - set -x - # Contains parameters + output of explorers - remote_object_dir="$__cdist_remote_cache_dir/$__cdist_name_object/$object" - remote_dst_dir="$remote_object_dir/$__cdist_name_explorer" - - # Also copy parameters - # FIXME: add function to copy whole host specific tree! - local_params_dir="$__cdist_object_base_dir/$object/$__cdist_name_params" - - # Copy directory, needs to be one level above, otherwise subdir is created - # FIXME: add -q later - ssh "${__cdist_remote_user}@${__cdist_target_host}" "mkdir -p \"$remote_object_dir\"" - - # - ssh "${__cdist_remote_user}@${__cdist_target_host}" "mkdir -p \"$remote_object_dir\"" - - scp -r "$local_params_dir" "${__cdist_remote_user}@${__cdist_target_host}:$remote_object_dir" - - if [ -d "$local_src_dir" ]; then - echo "Executing explorers for $object ..." - cdist-explorer-run "$__cdist_target_host" \ - "$local_src_dir" "$local_dst_dir" \ - "$remote_src_dir" "$remote_dst_dir" \ - "$object_id" + # If so, run explorers on remote side + if [ "$has_explorer" ]; then + cdist-run-remote "$__cdist_target_host" cdist-remote-explorer-run \ + "$__cdist_name_var_type_explorer" "$type_explorer_dir" \ + "$remote_object_explorer_out_dir" + + # Copy back results + cdist-dir pull "$__cdist_target_host" \ + "$remote_object_explorer_out_dir" "$object_explorer_out_dir" fi - set +x done From 39b2976f9ae70265236526213e30542c3f54d0a1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 21:24:21 +0100 Subject: [PATCH 0418/6109] in theory, finish bin/cdist-object-explorer-all Signed-off-by: Nico Schottelius --- bin/cdist-config | 19 +++++++++++++++++-- bin/cdist-object-explorer-all | 19 ++++++++----------- bin/cdist-remote-explorer-run | 4 ++-- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index c9df6cad..5f712bff 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -38,6 +38,7 @@ set -u : ${__cdist_name_manifest:=manifest} : ${__cdist_name_manifest_dir:=manifests} : ${__cdist_name_object:=object} +: ${__cdist_name_objects:=objects} : ${__cdist_name_object_id:=object_id} : ${__cdist_name_out_dir:=out} : ${__cdist_name_conf_dir:=conf} @@ -56,7 +57,6 @@ set -u # Name of the base directory containing the initial manifests : ${__cdist_name_manifests:=manifests} -: ${__cdist_name_object:=objects} : ${__cdist_name_params:=parameters} : ${__cdist_name_params_required:=required} @@ -96,6 +96,7 @@ __cdist_sane_regexp='[A-Za-z0-9]*[-A-Za-z0-9_]*' # Remote out : ${__cdist_remote_out_dir:=$__cdist_remote_base_dir/$__cdist_name_out_dir} : ${__cdist_remote_out_explorer_dir:=$__cdist_remote_out_dir/$__cdist_name_explorer} +: ${__cdist_remote_out_object_base_dir:=$__cdist_remote_out_dir/$__cdist_name_object} # Tempfiles __cdist_tmp_dir=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX") @@ -145,7 +146,11 @@ __cdist_usage() __cdist_type_has_explorer() { - echo "${__cdist_type_dir}/${__cdist_type_current}" + # We only create output, if there's at least one explorer + # and can thus be used as a boolean ;-) + if [ -d "$(__cdist_type_explorer_dir "$1")" ]; then + ls -1 "$(__cdist_type_explorer_dir "$1")" + fi } __cdist_type_mydir() @@ -193,6 +198,16 @@ __cdist_object_param_dir() echo "${__cdist_object_base_dir}/$1/$__cdist_name_params}" } +__cdist_object_type_explorer_dir() +{ + echo "${__cdist_object_base_dir}/$1/$__cdist_name_explorer}" +} + +__cdist_remote_object_type_explorer_dir() +{ + echo "${__cdist_remote_object_base_dir}/$1/$__cdist_name_explorer}" +} + __cdist_remote_object_param_dir() { echo "${__cdist_remote_object_base_dir}/$1/$__cdist_name_params}" diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all index cabc6bf3..82222943 100755 --- a/bin/cdist-object-explorer-all +++ b/bin/cdist-object-explorer-all @@ -70,16 +70,10 @@ while read object; do set -- "$@" "$object" done < "$object_listing" -# For every object of a type that has explorers, execute the explorers -# and retrieve the results while [ $# -gt 0 ]; do - # NEW CODE object="$1"; shift object_id="$(__cdist_object_id_from_object "$object")" type="$(__cdist_type_from_object "$object")" - type_explorer_dir="$(__cdist_remote_type_explorer_dir "$object")" - object_explorer_out_dir="$(__cdist_out_type_explorer_dir "$object")" - remote_object_explorer_out_dir="$(__cdist_remote_out_type_explorer_dir "$object")" # Always copy object parameters (looks weired if done only for the ones with explorer) # Really always? @@ -89,12 +83,15 @@ while [ $# -gt 0 ]; do # If so, run explorers on remote side if [ "$has_explorer" ]; then - cdist-run-remote "$__cdist_target_host" cdist-remote-explorer-run \ - "$__cdist_name_var_type_explorer" "$type_explorer_dir" \ - "$remote_object_explorer_out_dir" + cdist-run-remote "$__cdist_target_host" \ + cdist-remote-explorer-run \ + "$__cdist_name_var_type_explorer" \ + "$(__cdist_remote_type_explorer_dir "$type")" \ + "$(__cdist_remote_object_type_explorer_dir "$object")" # Copy back results - cdist-dir pull "$__cdist_target_host" \ - "$remote_object_explorer_out_dir" "$object_explorer_out_dir" + cdist-dir pull "$__cdist_target_host" \ + "$(__cdist_remote_object_type_explorer_dir "$object")" \ + "$(__cdist_object_type_explorer_dir "$object")" fi done diff --git a/bin/cdist-remote-explorer-run b/bin/cdist-remote-explorer-run index 50d5357e..7064a323 100755 --- a/bin/cdist-remote-explorer-run +++ b/bin/cdist-remote-explorer-run @@ -25,8 +25,8 @@ # . cdist-config -if [ $# -lt 3 ]; then - __cdist_usage " [explorer args]" +if [ $# -ne 3 ]; then + __cdist_usage " " fi set -ue From 238b5119eb2f78ea60571d3645785ad8ecb2e6b4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 21:32:01 +0100 Subject: [PATCH 0419/6109] begin to migrate from plural to singular, CONSISTENTLY Signed-off-by: Nico Schottelius --- bin/cdist-config | 41 ++++++++----------- conf/{explorers => explorer}/hostname | 0 conf/{explorers => explorer}/os | 0 conf/{explorers => explorer}/pkg_system | 0 conf/{manifests => manifest}/init | 0 conf/{types => type}/__file/explorers/md5sum | 0 conf/{types => type}/__file/gencode | 0 .../__file/parameters/optional | 0 .../__file/parameters/required | 0 conf/{types => type}/__issue/README | 0 conf/{types => type}/__issue/files/archlinux | 0 conf/{types => type}/__issue/files/default | 0 conf/{types => type}/__issue/manifest | 0 .../__issue/parameters/optional | 0 .../__issue/parameters/required | 0 conf/{types => type}/__package/hints | 0 conf/{types => type}/__package/manifest | 0 .../__package/parameters/optional | 0 .../__package/parameters/required | 0 conf/{types => type}/__package_emerge/gencode | 0 conf/{types => type}/__package_emerge/hints | 0 .../__package_emerge/parameters/optional | 0 .../__package_emerge/parameters/required | 0 23 files changed, 17 insertions(+), 24 deletions(-) rename conf/{explorers => explorer}/hostname (100%) rename conf/{explorers => explorer}/os (100%) rename conf/{explorers => explorer}/pkg_system (100%) rename conf/{manifests => manifest}/init (100%) rename conf/{types => type}/__file/explorers/md5sum (100%) rename conf/{types => type}/__file/gencode (100%) rename conf/{types => type}/__file/parameters/optional (100%) rename conf/{types => type}/__file/parameters/required (100%) rename conf/{types => type}/__issue/README (100%) rename conf/{types => type}/__issue/files/archlinux (100%) rename conf/{types => type}/__issue/files/default (100%) rename conf/{types => type}/__issue/manifest (100%) rename conf/{types => type}/__issue/parameters/optional (100%) rename conf/{types => type}/__issue/parameters/required (100%) rename conf/{types => type}/__package/hints (100%) rename conf/{types => type}/__package/manifest (100%) rename conf/{types => type}/__package/parameters/optional (100%) rename conf/{types => type}/__package/parameters/required (100%) rename conf/{types => type}/__package_emerge/gencode (100%) rename conf/{types => type}/__package_emerge/hints (100%) rename conf/{types => type}/__package_emerge/parameters/optional (100%) rename conf/{types => type}/__package_emerge/parameters/required (100%) diff --git a/bin/cdist-config b/bin/cdist-config index 5f712bff..8b5f5c69 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -31,40 +31,32 @@ set -u # Names / Constants : ${__cdist_name_bin:=bin} : ${__cdist_name_code:=code} -: ${__cdist_name_explorer:=explorers} +: ${__cdist_name_explorer:=explorer} : ${__cdist_name_gencode:=gencode} -: ${__cdist_name_host:=hosts} +: ${__cdist_name_host:=host} : ${__cdist_name_init:=init} : ${__cdist_name_manifest:=manifest} -: ${__cdist_name_manifest_dir:=manifests} : ${__cdist_name_object:=object} -: ${__cdist_name_objects:=objects} : ${__cdist_name_object_id:=object_id} +: ${__cdist_name_parameter:=parameter} +: ${__cdist_name_parameter_required:=required} +: ${__cdist_name_parameter_optional:=optional} +: ${__cdist_name_target_host:=target_host} +: ${__cdist_name_type:=type} +: ${__cdist_name_type_bin:=type_bin} +: ${__cdist_name_type_explorer:=type_explorer} + : ${__cdist_name_out_dir:=out} : ${__cdist_name_conf_dir:=conf} -: ${__cdist_name_target_host:=target_host} -: ${__cdist_name_type:=types} -: ${__cdist_name_type_bin:=type_bin} -: ${__cdist_name_type_explorers:=type_explores} # Exported variable names (usable for non core) : ${__cdist_name_var_explorer:=__$__cdist_name_explorer} -: ${__cdist_name_var_type_explorer:=__$__cdist_name_type_explorers} -: ${__cdist_name_var_manifest:=__$__cdist_name_manifest_dir} +: ${__cdist_name_var_type_explorer:=__$__cdist_name_type_explorer} +: ${__cdist_name_var_manifest:=__$__cdist_name_manifest} : ${__cdist_name_var_target_host:=__$__cdist_name_target_host} : ${__cdist_name_var_object:=__$__cdist_name_object} : ${__cdist_name_var_object_id:=__$__cdist_name_object_id} -# Name of the base directory containing the initial manifests -: ${__cdist_name_manifests:=manifests} - -: ${__cdist_name_params:=parameters} -: ${__cdist_name_params_required:=required} -: ${__cdist_name_params_optional:=optional} - -# Name of the executable generated -: ${__cdist_name_exec:=exec} - # File that contains source of a specific object creation : ${__cdist_name_object_source:=.source} @@ -74,7 +66,7 @@ set -u # Base : ${__cdist_conf_dir:=/etc/cdist} : ${__cdist_explorer_dir:=$__cdist_conf_dir/$__cdist_name_explorer} -: ${__cdist_manifest_dir:=$__cdist_conf_dir/$__cdist_name_manifests} +: ${__cdist_manifest_dir:=$__cdist_conf_dir/$__cdist_name_manifest} : ${__cdist_manifest_init:=$__cdist_manifest_dir/$__cdist_name_init} : ${__cdist_type_dir:=$__cdist_conf_dir/$__cdist_name_type} @@ -177,10 +169,11 @@ __cdist_type_gencode() __cdist_type_param_file() { + # FIXME: local == posix? local type="$1"; shift local paramtype="$1"; shift - echo "${__cdist_type_dir}/$type/$__cdist_name_params/$paramtype" + echo "${__cdist_type_dir}/$type/$__cdist_name_parameter/$paramtype" } __cdist_type_from_object() @@ -195,7 +188,7 @@ __cdist_object_id_from_object() __cdist_object_param_dir() { - echo "${__cdist_object_base_dir}/$1/$__cdist_name_params}" + echo "${__cdist_object_base_dir}/$1/$__cdist_name_parameter}" } __cdist_object_type_explorer_dir() @@ -210,7 +203,7 @@ __cdist_remote_object_type_explorer_dir() __cdist_remote_object_param_dir() { - echo "${__cdist_remote_object_base_dir}/$1/$__cdist_name_params}" + echo "${__cdist_remote_object_base_dir}/$1/$__cdist_name_parameter}" } # Find objects, remove ./ and /MARKER diff --git a/conf/explorers/hostname b/conf/explorer/hostname similarity index 100% rename from conf/explorers/hostname rename to conf/explorer/hostname diff --git a/conf/explorers/os b/conf/explorer/os similarity index 100% rename from conf/explorers/os rename to conf/explorer/os diff --git a/conf/explorers/pkg_system b/conf/explorer/pkg_system similarity index 100% rename from conf/explorers/pkg_system rename to conf/explorer/pkg_system diff --git a/conf/manifests/init b/conf/manifest/init similarity index 100% rename from conf/manifests/init rename to conf/manifest/init diff --git a/conf/types/__file/explorers/md5sum b/conf/type/__file/explorers/md5sum similarity index 100% rename from conf/types/__file/explorers/md5sum rename to conf/type/__file/explorers/md5sum diff --git a/conf/types/__file/gencode b/conf/type/__file/gencode similarity index 100% rename from conf/types/__file/gencode rename to conf/type/__file/gencode diff --git a/conf/types/__file/parameters/optional b/conf/type/__file/parameters/optional similarity index 100% rename from conf/types/__file/parameters/optional rename to conf/type/__file/parameters/optional diff --git a/conf/types/__file/parameters/required b/conf/type/__file/parameters/required similarity index 100% rename from conf/types/__file/parameters/required rename to conf/type/__file/parameters/required diff --git a/conf/types/__issue/README b/conf/type/__issue/README similarity index 100% rename from conf/types/__issue/README rename to conf/type/__issue/README diff --git a/conf/types/__issue/files/archlinux b/conf/type/__issue/files/archlinux similarity index 100% rename from conf/types/__issue/files/archlinux rename to conf/type/__issue/files/archlinux diff --git a/conf/types/__issue/files/default b/conf/type/__issue/files/default similarity index 100% rename from conf/types/__issue/files/default rename to conf/type/__issue/files/default diff --git a/conf/types/__issue/manifest b/conf/type/__issue/manifest similarity index 100% rename from conf/types/__issue/manifest rename to conf/type/__issue/manifest diff --git a/conf/types/__issue/parameters/optional b/conf/type/__issue/parameters/optional similarity index 100% rename from conf/types/__issue/parameters/optional rename to conf/type/__issue/parameters/optional diff --git a/conf/types/__issue/parameters/required b/conf/type/__issue/parameters/required similarity index 100% rename from conf/types/__issue/parameters/required rename to conf/type/__issue/parameters/required diff --git a/conf/types/__package/hints b/conf/type/__package/hints similarity index 100% rename from conf/types/__package/hints rename to conf/type/__package/hints diff --git a/conf/types/__package/manifest b/conf/type/__package/manifest similarity index 100% rename from conf/types/__package/manifest rename to conf/type/__package/manifest diff --git a/conf/types/__package/parameters/optional b/conf/type/__package/parameters/optional similarity index 100% rename from conf/types/__package/parameters/optional rename to conf/type/__package/parameters/optional diff --git a/conf/types/__package/parameters/required b/conf/type/__package/parameters/required similarity index 100% rename from conf/types/__package/parameters/required rename to conf/type/__package/parameters/required diff --git a/conf/types/__package_emerge/gencode b/conf/type/__package_emerge/gencode similarity index 100% rename from conf/types/__package_emerge/gencode rename to conf/type/__package_emerge/gencode diff --git a/conf/types/__package_emerge/hints b/conf/type/__package_emerge/hints similarity index 100% rename from conf/types/__package_emerge/hints rename to conf/type/__package_emerge/hints diff --git a/conf/types/__package_emerge/parameters/optional b/conf/type/__package_emerge/parameters/optional similarity index 100% rename from conf/types/__package_emerge/parameters/optional rename to conf/type/__package_emerge/parameters/optional diff --git a/conf/types/__package_emerge/parameters/required b/conf/type/__package_emerge/parameters/required similarity index 100% rename from conf/types/__package_emerge/parameters/required rename to conf/type/__package_emerge/parameters/required From be7c647165776d79262719d88f57f6eff29607ff Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 21:32:52 +0100 Subject: [PATCH 0420/6109] adjust documentation Signed-off-by: Nico Schottelius --- doc/man/cdist-config-layout.text | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/man/cdist-config-layout.text b/doc/man/cdist-config-layout.text index e64b09ab..d6be10df 100644 --- a/doc/man/cdist-config-layout.text +++ b/doc/man/cdist-config-layout.text @@ -18,7 +18,7 @@ variables, see cdist-environment(7)). Contains the (static) configuration like manifests, types and explorers. -- conf_dir/manifests/init: +- conf_dir/manifest/init: This is the central entry point used by cdist-manifest-init(1). It is an executable (+x bit set) shell script that can use values from the explorers to decide which configuration to create @@ -26,36 +26,36 @@ variables, see cdist-environment(7)). It should be primary used to define mapping from configurations to hosts. -- conf_dir/manifests/*: +- conf_dir/manifest/*: All other files in this directory are not directly used by Cdist, but you can seperate configuration mappings, if you have a lot of code in the manifest/init file. This may also be very helpful to have different admins maintain different groups of hosts. -- conf_dir/explorers/ +- conf_dir/explorer/ Contains explorers to be run on the target hosts, see cdist-explorers(7). -- conf_dir/types/ +- conf_dir/type/ Contains all available types, which are used to provide some kind of functionality. See cdist-stages(7). -- conf_dir/types//manifest: +- conf_dir/type//manifest: Used to generate additional objects from a type. See cdist-stages(7), cdist-types(7). -- conf_dir/types//gencode: +- conf_dir/type//gencode: Used to generate code to be executed on the client. See cdist-types(7). -- conf_dir/types//parameters/required: +- conf_dir/type//parameters/required: Parameters required by type, \n seperated list. See cdist-types(7). -- conf_dir/types//parameters/optional: +- conf_dir/type//parameters/optional: Parameters optionally accepted by type, \n seperated list. See cdist-types(7). -- conf_dir/types//explorers: +- conf_dir/type//explorer: Location of the type specific explorers. See cdist-explorers(7). @@ -65,13 +65,13 @@ variables, see cdist-environment(7)). the tmpdir or at any other location and is also available on the target. -- out_dir/explorers: +- out_dir/explorer: Output of general explorers. -- out_dir/objects: +- out_dir/object: Objects created for the host. -- out_dir/objects//explorers: +- out_dir/object//explorers: Output of type specific explorers, per object. - tmp_dir: Temporary storage @@ -88,7 +88,7 @@ The following functionality may be implemented in one of the next releases: may also be used in types to gather information about other hosts (like ssh-keys). -- cache_dir/hosts/: +- cache_dir/host/: Contains the last out_dir of the specific host. From b683b8ca707400a7445b40965283733ddfdc39d5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 21:36:11 +0100 Subject: [PATCH 0421/6109] more plural -> singular cleanups Signed-off-by: Nico Schottelius --- conf/explorer/pkg_system | 2 +- conf/manifest/init | 2 +- conf/type/__file/{parameters => parameter}/optional | 0 conf/type/__file/{parameters => parameter}/required | 0 conf/type/__issue/{parameters => parameter}/optional | 0 conf/type/__issue/{parameters => parameter}/required | 0 conf/type/__package/{parameters => parameter}/optional | 0 conf/type/__package/{parameters => parameter}/required | 0 conf/type/__package_emerge/{parameters => parameter}/optional | 0 conf/type/__package_emerge/{parameters => parameter}/required | 0 10 files changed, 2 insertions(+), 2 deletions(-) rename conf/type/__file/{parameters => parameter}/optional (100%) rename conf/type/__file/{parameters => parameter}/required (100%) rename conf/type/__issue/{parameters => parameter}/optional (100%) rename conf/type/__issue/{parameters => parameter}/required (100%) rename conf/type/__package/{parameters => parameter}/optional (100%) rename conf/type/__package/{parameters => parameter}/required (100%) rename conf/type/__package_emerge/{parameters => parameter}/optional (100%) rename conf/type/__package_emerge/{parameters => parameter}/required (100%) diff --git a/conf/explorer/pkg_system b/conf/explorer/pkg_system index 552209a1..fad2a9f0 100755 --- a/conf/explorer/pkg_system +++ b/conf/explorer/pkg_system @@ -19,7 +19,7 @@ # # -os="$("$__explorers/os")" +os="$("$__explorer/os")" case "$os" in archlinux) echo pacman ;; diff --git a/conf/manifest/init b/conf/manifest/init index 2bc47e15..260fb490 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -4,7 +4,7 @@ # This is debug and should not be in a production environment echo "Running initial manifest for $__target_host" -echo "We could access other manifests in $__manifests" +echo "We could access other manifests in $__manifest" case "$__target_host" in localhost) diff --git a/conf/type/__file/parameters/optional b/conf/type/__file/parameter/optional similarity index 100% rename from conf/type/__file/parameters/optional rename to conf/type/__file/parameter/optional diff --git a/conf/type/__file/parameters/required b/conf/type/__file/parameter/required similarity index 100% rename from conf/type/__file/parameters/required rename to conf/type/__file/parameter/required diff --git a/conf/type/__issue/parameters/optional b/conf/type/__issue/parameter/optional similarity index 100% rename from conf/type/__issue/parameters/optional rename to conf/type/__issue/parameter/optional diff --git a/conf/type/__issue/parameters/required b/conf/type/__issue/parameter/required similarity index 100% rename from conf/type/__issue/parameters/required rename to conf/type/__issue/parameter/required diff --git a/conf/type/__package/parameters/optional b/conf/type/__package/parameter/optional similarity index 100% rename from conf/type/__package/parameters/optional rename to conf/type/__package/parameter/optional diff --git a/conf/type/__package/parameters/required b/conf/type/__package/parameter/required similarity index 100% rename from conf/type/__package/parameters/required rename to conf/type/__package/parameter/required diff --git a/conf/type/__package_emerge/parameters/optional b/conf/type/__package_emerge/parameter/optional similarity index 100% rename from conf/type/__package_emerge/parameters/optional rename to conf/type/__package_emerge/parameter/optional diff --git a/conf/type/__package_emerge/parameters/required b/conf/type/__package_emerge/parameter/required similarity index 100% rename from conf/type/__package_emerge/parameters/required rename to conf/type/__package_emerge/parameter/required From df2bbebed7f0146d98848b384ff334ae781a5f64 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 21:37:55 +0100 Subject: [PATCH 0422/6109] params -> parameter Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 24 ++++++++++++------------ conf/type/__issue/manifest | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 9e46a9bb..9283052d 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -36,7 +36,7 @@ echo "$__cdist_object_id" | grep -q "^${__cdist_sane_regexp}\$" || \ __cdist_object="${__cdist_type}/${__cdist_object_id}" __cdist_ddir="$__cdist_output_dir/${__cdist_object}" -__cdist_params_dir="$__cdist_ddir/$__cdist_name_params" +__cdist_parameter_dir="$__cdist_ddir/$__cdist_name_parameter" # Append id for error messages __cdist_myname="$__cdist_myname ($__cdist_object_id)" @@ -47,14 +47,14 @@ if [ -e "${__cdist_ddir}" ]; then fi mkdir -p "${__cdist_ddir}" -mkdir -p "${__cdist_params_dir}" +mkdir -p "${__cdist_parameter_dir}" # Record (correct ;-) source echo "${__cdist_manifest}" > "${__cdist_ddir}/${__cdist_name_object_source}" # Record parameters to tmpdir -tempparams="${__cdist_tmp_dir}/${__cdist_name_params}" -mkdir -p "$tempparams" +tempparameter="${__cdist_tmp_dir}/${__cdist_name_parameter}" +mkdir -p "$tempparameter" while [ $# -gt 0 ]; do opt="$1"; shift @@ -68,27 +68,27 @@ while [ $# -gt 0 ]; do value="$1"; shift - echo "${value}" > "${tempparams}/${opt_file}" + echo "${value}" > "${tempparameter}/${opt_file}" done # Ensure required parameters are given while read required; do - if [ ! -f "${tempparams}/${required}" ]; then + if [ ! -f "${tempparameter}/${required}" ]; then __cdist_usage "Missing required parameter $required" fi - mv "${tempparams}/${required}" "${__cdist_params_dir}" -done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_params_required")" + mv "${tempparameter}/${required}" "${__cdist_parameter_dir}" +done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_parameter_required")" # Allow optional parameters while read optional; do - if [ -f "${tempparams}/${optional}" ]; then - mv "${tempparams}/${optional}" "${__cdist_params_dir}" + if [ -f "${tempparameter}/${optional}" ]; then + mv "${tempparameter}/${optional}" "${__cdist_parameter_dir}" fi -done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_params_optional")" +done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_parameter_optional")" # Error out on other paramaters -cd "${tempparams}" +cd "${tempparameter}" other="$(ls)" if [ "$other" ]; then diff --git a/conf/type/__issue/manifest b/conf/type/__issue/manifest index 45c3bd98..73df3dee 100755 --- a/conf/type/__issue/manifest +++ b/conf/type/__issue/manifest @@ -20,7 +20,7 @@ # destination=/etc/issue -os="$(cat "out/explorers/os")" +os="$(cat "out/explorer/os")" case "$os" in archlinux) From e4a6efa84b92ab744497ec76d7fbe1bc1449d589 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Feb 2011 21:41:03 +0100 Subject: [PATCH 0423/6109] correctly evaluate Signed-off-by: Nico Schottelius --- bin/cdist-object-explorer-all | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all index 82222943..e341961a 100755 --- a/bin/cdist-object-explorer-all +++ b/bin/cdist-object-explorer-all @@ -50,8 +50,8 @@ done < "$type_listing" # For every type that has explorers, Transfer the explorers i=0 -while [ "$i" -le "$tc" ]; do - eval cur_type=\"type_$i\" +while [ "$i" -lt "$tc" ]; do + eval cur_type=\"\$type_$i\" src_dir="$(__cdist_type_explorer_dir "$cur_type")" dst_dir="$(__cdist_remote_type_explorer_dir "$cur_type")" From 72f62a873451cf08e300068f0f4512eb332edd34 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 00:14:26 +0100 Subject: [PATCH 0424/6109] cleanup and fix some missing } in cdist-config Signed-off-by: Nico Schottelius --- bin/cdist-config | 31 +++++++++---------- .../__file/{explorers => explorer}/md5sum | 0 2 files changed, 14 insertions(+), 17 deletions(-) rename conf/type/__file/{explorers => explorer}/md5sum (100%) diff --git a/bin/cdist-config b/bin/cdist-config index 8b5f5c69..da7281c2 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -31,13 +31,17 @@ set -u # Names / Constants : ${__cdist_name_bin:=bin} : ${__cdist_name_code:=code} +: ${__cdist_name_conf_dir:=conf} : ${__cdist_name_explorer:=explorer} : ${__cdist_name_gencode:=gencode} : ${__cdist_name_host:=host} : ${__cdist_name_init:=init} : ${__cdist_name_manifest:=manifest} : ${__cdist_name_object:=object} +: ${__cdist_name_object_finished:=.done} : ${__cdist_name_object_id:=object_id} +: ${__cdist_name_object_source:=.source} +: ${__cdist_name_out_dir:=out} : ${__cdist_name_parameter:=parameter} : ${__cdist_name_parameter_required:=required} : ${__cdist_name_parameter_optional:=optional} @@ -46,8 +50,6 @@ set -u : ${__cdist_name_type_bin:=type_bin} : ${__cdist_name_type_explorer:=type_explorer} -: ${__cdist_name_out_dir:=out} -: ${__cdist_name_conf_dir:=conf} # Exported variable names (usable for non core) : ${__cdist_name_var_explorer:=__$__cdist_name_explorer} @@ -57,11 +59,6 @@ set -u : ${__cdist_name_var_object:=__$__cdist_name_object} : ${__cdist_name_var_object_id:=__$__cdist_name_object_id} -# File that contains source of a specific object creation -: ${__cdist_name_object_source:=.source} - -# Marks an object finished -: ${__cdist_name_object_finished:=.done} # Base : ${__cdist_conf_dir:=/etc/cdist} @@ -152,19 +149,19 @@ __cdist_type_mydir() __cdist_type_explorer_dir() { - echo "${__cdist_type_dir}/$1/$__cdist_name_explorer" + echo "${__cdist_type_dir}/$1/${__cdist_name_explorer}" } __cdist_remote_type_explorer_dir() { - echo "${__cdist_remote_type_dir}/$1/$__cdist_name_explorer" + echo "${__cdist_remote_type_dir}/$1/${__cdist_name_explorer}" } __cdist_type_gencode() { local type="$1" - echo "${__cdist_type_dir}/${type}/$__cdist_name_gencode" + echo "${__cdist_type_dir}/${type}/${__cdist_name_gencode}" } __cdist_type_param_file() @@ -173,7 +170,7 @@ __cdist_type_param_file() local type="$1"; shift local paramtype="$1"; shift - echo "${__cdist_type_dir}/$type/$__cdist_name_parameter/$paramtype" + echo "${__cdist_type_dir}/${type}/${__cdist_name_parameter}/${paramtype}" } __cdist_type_from_object() @@ -193,17 +190,17 @@ __cdist_object_param_dir() __cdist_object_type_explorer_dir() { - echo "${__cdist_object_base_dir}/$1/$__cdist_name_explorer}" + echo "${__cdist_object_base_dir}/$1/${__cdist_name_explorer}" } __cdist_remote_object_type_explorer_dir() { - echo "${__cdist_remote_object_base_dir}/$1/$__cdist_name_explorer}" + echo "${__cdist_remote_out_object_base_dir}/$1/${__cdist_name_explorer}" } -__cdist_remote_object_param_dir() +__cdist_remote_object_parameter_dir() { - echo "${__cdist_remote_object_base_dir}/$1/$__cdist_name_parameter}" + echo "${__cdist_remote_out_object_base_dir}/$1/${__cdist_name_parameter}" } # Find objects, remove ./ and /MARKER @@ -216,7 +213,7 @@ __cdist_object_list() cd "${basedir}" find . -name "$__cdist_name_object_source" | \ - sed -e 's;^./;;' -e "s;/$__cdist_name_object_source\$;;" + sed -e 's;^./;;' -e "s;/${__cdist_name_object_source}\$;;" ) } @@ -225,7 +222,7 @@ __cdist_object_source() { local object_dir="$1"; shift - cat "${object_dir}/$__cdist_name_object_source" + cat "${object_dir}/${__cdist_name_object_source}" } __cdist_exec_fail_on_error() diff --git a/conf/type/__file/explorers/md5sum b/conf/type/__file/explorer/md5sum similarity index 100% rename from conf/type/__file/explorers/md5sum rename to conf/type/__file/explorer/md5sum From d8e2294865148d1dc7a025bd0d86e4721ea26239 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 00:20:10 +0100 Subject: [PATCH 0425/6109] remove debug Signed-off-by: Nico Schottelius --- bin/cdist-object-explorer-all | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all index e341961a..341ef765 100755 --- a/bin/cdist-object-explorer-all +++ b/bin/cdist-object-explorer-all @@ -23,7 +23,7 @@ . cdist-config [ $# -eq 2 ] || __cdist_usage " " -set -eux +set -eu __cdist_target_host="$1"; shift __cdist_object_base_dir="$1"; shift @@ -83,6 +83,7 @@ while [ $# -gt 0 ]; do # If so, run explorers on remote side if [ "$has_explorer" ]; then + echo "Running explorers for $object ..." cdist-run-remote "$__cdist_target_host" \ cdist-remote-explorer-run \ "$__cdist_name_var_type_explorer" \ From 302b6ef58c01480750c301bce004a749defff461 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 00:27:48 +0100 Subject: [PATCH 0426/6109] shrink bin/cdist-run-remote Signed-off-by: Nico Schottelius --- bin/cdist-run-remote | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/cdist-run-remote b/bin/cdist-run-remote index 8b3915fc..87af8459 100755 --- a/bin/cdist-run-remote +++ b/bin/cdist-run-remote @@ -26,7 +26,6 @@ set -ue __cdist_target_host="$1"; shift -__cdist_remote_binary="$1"; shift ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "PATH=\"${__cdist_remote_bin_dir}:\$PATH\" \"$__cdist_remote_binary\"" "$@" + "PATH=\"${__cdist_remote_bin_dir}:\$PATH\"" "$@" From dcb9900afc1beaca732a6309effe2be097adb68b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 00:30:37 +0100 Subject: [PATCH 0427/6109] submit variables to cdist-remote-explorer-run Signed-off-by: Nico Schottelius --- bin/cdist-object-explorer-all | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all index 341ef765..e38dc070 100755 --- a/bin/cdist-object-explorer-all +++ b/bin/cdist-object-explorer-all @@ -71,28 +71,29 @@ while read object; do done < "$object_listing" while [ $# -gt 0 ]; do - object="$1"; shift - object_id="$(__cdist_object_id_from_object "$object")" - type="$(__cdist_type_from_object "$object")" + __object="$1"; shift + __object_id="$(__cdist_object_id_from_object "$__object")" + __cdist_type="$(__cdist_type_from_object "$__object")" # Always copy object parameters (looks weired if done only for the ones with explorer) # Really always? # Check if type of object has >= 1 explorer - has_explorer="$(__cdist_type_has_explorer "$type")" + has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" # If so, run explorers on remote side if [ "$has_explorer" ]; then - echo "Running explorers for $object ..." - cdist-run-remote "$__cdist_target_host" \ - cdist-remote-explorer-run \ - "$__cdist_name_var_type_explorer" \ - "$(__cdist_remote_type_explorer_dir "$type")" \ - "$(__cdist_remote_object_type_explorer_dir "$object")" + echo "Running explorers for $__object ..." + cdist-run-remote "$__cdist_target_host" \ + "__object=\"$__object\" __object_id=\"$__object_id\"" \ + cdist-remote-explorer-run \ + "$__cdist_name_var_type_explorer" \ + "$(__cdist_remote_type_explorer_dir "$__cdist_type")" \ + "$(__cdist_remote_object_type_explorer_dir "$__object")" # Copy back results cdist-dir pull "$__cdist_target_host" \ - "$(__cdist_remote_object_type_explorer_dir "$object")" \ - "$(__cdist_object_type_explorer_dir "$object")" + "$(__cdist_remote_object_type_explorer_dir "$__object")" \ + "$(__cdist_object_type_explorer_dir "$__object")" fi done From 8d774ff152f8039dd494442de549e55bddb82ec2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 00:54:49 +0100 Subject: [PATCH 0428/6109] fix some issues in cdist-config, transfer parameters Signed-off-by: Nico Schottelius --- bin/cdist-config | 24 +++++++++++++++++------- bin/cdist-object-explorer-all | 12 ++++++++---- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index da7281c2..16aef65b 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -183,24 +183,34 @@ __cdist_object_id_from_object() echo "${1#*/}" } -__cdist_object_param_dir() +__cdist_object_dir() { - echo "${__cdist_object_base_dir}/$1/$__cdist_name_parameter}" + echo "${__cdist_object_base_dir}/$1" } -__cdist_object_type_explorer_dir() +__cdist_remote_object_dir() { - echo "${__cdist_object_base_dir}/$1/${__cdist_name_explorer}" + echo "${__cdist_remote_out_object_base_dir}/$1" } -__cdist_remote_object_type_explorer_dir() +__cdist_object_parameter_dir() { - echo "${__cdist_remote_out_object_base_dir}/$1/${__cdist_name_explorer}" + echo "$(__cdist_object_dir "$1")/${__cdist_name_parameter}" } __cdist_remote_object_parameter_dir() { - echo "${__cdist_remote_out_object_base_dir}/$1/${__cdist_name_parameter}" + echo "$(__cdist_remote_object_dir "$1")/${__cdist_name_parameter}" +} + +__cdist_object_type_explorer_dir() +{ + echo "$(__cdist_object_dir "$1")/${__cdist_name_explorer}" +} + +__cdist_remote_object_type_explorer_dir() +{ + echo "$(__cdist_remote_object_dir "$1")/${__cdist_name_explorer}" } # Find objects, remove ./ and /MARKER diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all index e38dc070..8d6ab54a 100755 --- a/bin/cdist-object-explorer-all +++ b/bin/cdist-object-explorer-all @@ -75,17 +75,21 @@ while [ $# -gt 0 ]; do __object_id="$(__cdist_object_id_from_object "$__object")" __cdist_type="$(__cdist_type_from_object "$__object")" - # Always copy object parameters (looks weired if done only for the ones with explorer) - # Really always? - # Check if type of object has >= 1 explorer has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" # If so, run explorers on remote side if [ "$has_explorer" ]; then echo "Running explorers for $__object ..." + # Copy object parameters + cdist-dir push "$__cdist_target_host" \ + "$(__cdist_object_parameter_dir "$__object")" \ + "$(__cdist_remote_object_parameter_dir "$__object")" + + # Execute explorers cdist-run-remote "$__cdist_target_host" \ - "__object=\"$__object\" __object_id=\"$__object_id\"" \ + "__object=\"$(__cdist_remote_object_dir "$__object")\"" \ + "__object_id=\"$__object_id\"" \ cdist-remote-explorer-run \ "$__cdist_name_var_type_explorer" \ "$(__cdist_remote_type_explorer_dir "$__cdist_type")" \ From 66610155ae18f429570a279ac3e1945241146948 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 00:55:06 +0100 Subject: [PATCH 0429/6109] add some debug to md5sum explorer Signed-off-by: Nico Schottelius --- conf/type/__file/explorer/md5sum | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/conf/type/__file/explorer/md5sum b/conf/type/__file/explorer/md5sum index a4e7c335..ddfcc0f3 100755 --- a/conf/type/__file/explorer/md5sum +++ b/conf/type/__file/explorer/md5sum @@ -21,17 +21,21 @@ # Retrieve the md5sum of a file to be created, if it is already existing. # -################################################################################ -# New code -# -if [ -f parameters/destination ]; then - destination="$(cat parameters/destination)" +exec 3>&1 +exec 1>&2 + +set -x + +if [ -f "$__object/parameter/destination" ]; then + destination="$(cat "$__object/parameter/destination")" else - destination="$1" + destination="$__object_id" fi # No output if file does not exist - does definitely not match the md5sum :-) if [ -e "$destination" ]; then - md5sum "$destination" + md5sum "$destination" >&3 +else + echo "NO FILE NOT FOUND, NO CHECKSUM CALCULATED." >&3 fi From e4377f7532fcc11d346930cb7585c3fd89590c39 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 00:58:38 +0100 Subject: [PATCH 0430/6109] remove debug Signed-off-by: Nico Schottelius --- conf/type/__file/explorer/md5sum | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/conf/type/__file/explorer/md5sum b/conf/type/__file/explorer/md5sum index ddfcc0f3..f755c769 100755 --- a/conf/type/__file/explorer/md5sum +++ b/conf/type/__file/explorer/md5sum @@ -21,12 +21,6 @@ # Retrieve the md5sum of a file to be created, if it is already existing. # - -exec 3>&1 -exec 1>&2 - -set -x - if [ -f "$__object/parameter/destination" ]; then destination="$(cat "$__object/parameter/destination")" else @@ -35,7 +29,7 @@ fi # No output if file does not exist - does definitely not match the md5sum :-) if [ -e "$destination" ]; then - md5sum "$destination" >&3 + md5sum "$destination" else - echo "NO FILE NOT FOUND, NO CHECKSUM CALCULATED." >&3 + echo "NO FILE NOT FOUND, NO CHECKSUM CALCULATED." fi From ea39e137f3986019b276d6e11b6b50e698544ac3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 01:06:02 +0100 Subject: [PATCH 0431/6109] re-integrate cdist-object-codegen-all Signed-off-by: Nico Schottelius --- bin/cdist-config | 5 +++++ bin/cdist-deploy-to | 6 ++++-- bin/cdist-object-codegen-all | 12 ++++-------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 16aef65b..372aa2d7 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -193,6 +193,11 @@ __cdist_remote_object_dir() echo "${__cdist_remote_out_object_base_dir}/$1" } +__cdist_object_code() +{ + echo "$(__cdist_object_dir "$1")/${__cdist_name_code}" +} + __cdist_object_parameter_dir() { echo "$(__cdist_object_dir "$1")/${__cdist_name_parameter}" diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index b0b70220..f8b5553a 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -55,9 +55,11 @@ cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" # Run explorer of each type for every object of types with explorer cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" -exit 2 +# Generate code for all objects +cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_object_dir" \ + "$__cdist_out_code_dir" -cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_object_dir" "$__cdist_out_execs" +exit 2 cdist-exec-transfer "$__cdist_target_host" "$__cdist_out_execs" cdist-exec-run "$__cdist_target_host" diff --git a/bin/cdist-object-codegen-all b/bin/cdist-object-codegen-all index 2e7a5bab..98d4d9e0 100755 --- a/bin/cdist-object-codegen-all +++ b/bin/cdist-object-codegen-all @@ -25,26 +25,22 @@ . cdist-config if [ $# -ne 3 ]; then - __cdist_usage " " + __cdist_usage " " fi set -eu __cdist_target_host="$1"; shift __cdist_object_base_dir="$1"; shift -__cdist_exec_dir="$1"; shift __cdist_object_list "$__cdist_object_base_dir" > "$__cdist_tmp_file" while read object; do - outdir="$__cdist_exec_dir/${object}" - outfile="${outdir}/${__cdist_name_exec}" - - mkdir -p "${outdir}" + code="$(__cdist_object_code "$object")" cdist-object-codegen "$__cdist_target_host" \ "$__cdist_object_base_dir" \ - "$object" > "${outfile}" + "$object" > "${code}" - chmod u+x "${outfile}" + chmod u+x "${code}" done < "$__cdist_tmp_file" From 12ba5dd9eba7f132a2954c1e848ac301d579589d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 01:07:32 +0100 Subject: [PATCH 0432/6109] cleanup cdist-deploy-to Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index f8b5553a..a8d77334 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -56,19 +56,9 @@ cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" # Generate code for all objects -cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_object_dir" \ - "$__cdist_out_code_dir" +cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_object_dir" exit 2 + cdist-exec-transfer "$__cdist_target_host" "$__cdist_out_execs" cdist-exec-run "$__cdist_target_host" - -# FIXME: Create new cache from results: -# cdist-cache-copy "$__cdist_target_host" __cdist_out_explorers __cdist_out_object_dir __cdist_out_execs -# or similar, better with one directory -# -# echo rm -rf "$(__cdist_cache_host)" -# mkdir -p "$(__cdist_cache_host)" -# mv "$__cdist_out_explorers" "$__cdist_out_object_dir" "$(__cdist_cache_host)" -# Also save last code fragment -# mv "$tmp_code" "$(__cdist_cache_host)" From 5433befd4a813d8a17cd4d43a121e61ae8be314c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 01:17:32 +0100 Subject: [PATCH 0433/6109] adjust bin/cdist-object-codegen to new style with env Signed-off-by: Nico Schottelius --- bin/cdist-object-codegen | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/bin/cdist-object-codegen b/bin/cdist-object-codegen index ce0c1073..9b5405e7 100755 --- a/bin/cdist-object-codegen +++ b/bin/cdist-object-codegen @@ -26,24 +26,24 @@ [ $# -eq 3 ] || __cdist_usage "" "" "" set -eu -export __cdist_target_host="$1"; shift -export __cdist_object_base_dir="$1"; shift -export __cdist_object="$1"; shift +__cdist_target_host="$1"; shift +__cdist_object_base_dir="$1"; shift +__cdist_object="$1"; shift -# Full path to object -export __cdist_object_dir="${__cdist_object_base_dir}/${__cdist_object}" - -# Get type from object path -export __cdist_type="${__cdist_object%%/*}" - -# Get id from object path (i.e no type prefix) -export __cdist_object_id="${__cdist_object#*/}" +__cdist_object_dir="$(__cdist_object_dir "$__cdist_object")" +__cdist_type="$(__cdist_type_from_object "$__cdist_object")" +__cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")" # Full path to where the executable of the type should exist, if the type has one gencode="$(__cdist_type_gencode "$__cdist_type")" -cd "$__cdist_object_dir" +# export variables for gencode +export __object_id="$__cdist_object_id" +export __object="$__cdist_object_dir" +cd "$__cdist_local_base_dir" + +echo "Generating code for $__cdist_object ..." cat << eof # # The following code is imported from output of $gencode @@ -52,7 +52,7 @@ cat << eof eof if [ -x "$gencode" ]; then - __cdist_exec_fail_on_error "$gencode" "$__cdist_object_id" + __cdist_exec_fail_on_error "$gencode" else if [ -f "$gencode" ]; then echo "$gencode" exists, but is not executable >&2 From 8aa560d111e289685d4a326ffba7c20d3e0bc82e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 01:17:48 +0100 Subject: [PATCH 0434/6109] save a variable Signed-off-by: Nico Schottelius --- bin/cdist-config | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 372aa2d7..d84c88df 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -159,9 +159,7 @@ __cdist_remote_type_explorer_dir() __cdist_type_gencode() { - local type="$1" - - echo "${__cdist_type_dir}/${type}/${__cdist_name_gencode}" + echo "${__cdist_type_dir}/$1/${__cdist_name_gencode}" } __cdist_type_param_file() From 9ce7d55a294e523ecbd5b5041e2f3a58ccb31018 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 01:18:02 +0100 Subject: [PATCH 0435/6109] tell user which codegen block is executed Signed-off-by: Nico Schottelius --- bin/cdist-object-codegen-all | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cdist-object-codegen-all b/bin/cdist-object-codegen-all index 98d4d9e0..204659dc 100755 --- a/bin/cdist-object-codegen-all +++ b/bin/cdist-object-codegen-all @@ -24,7 +24,7 @@ . cdist-config -if [ $# -ne 3 ]; then +if [ $# -ne 2 ]; then __cdist_usage " " fi @@ -37,6 +37,7 @@ __cdist_object_list "$__cdist_object_base_dir" > "$__cdist_tmp_file" while read object; do code="$(__cdist_object_code "$object")" + echo "Generating code for $object ..." cdist-object-codegen "$__cdist_target_host" \ "$__cdist_object_base_dir" \ From 1a718e7c2393423f23ec664459d5b2c5d97197b3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 01:20:34 +0100 Subject: [PATCH 0436/6109] adjust gencode of type __file Signed-off-by: Nico Schottelius --- conf/type/__file/gencode | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/type/__file/gencode b/conf/type/__file/gencode index ed1fae90..ca8f88a2 100755 --- a/conf/type/__file/gencode +++ b/conf/type/__file/gencode @@ -22,13 +22,13 @@ # example for typewrites later # -type="$(cat parameters/type)" +type="$(cat "$__object/parameter/type")" # If destination was specified, do not use the id -if [ -f parameters/destination ]; then - destination="$(cat parameters/destination)" +if [ -f "$__object/parameter/destination" ]; then + destination="$(cat "$__object/parameter/destination")" else - destination="$1" + destination="$__object_id" fi case "$type" in @@ -46,7 +46,7 @@ case "$type" in ;; esac -if [ -f parameters/mode ]; then - mode="$(cat parameters/mode)" +if [ -f "$__object/parameter/mode" ]; then + mode="$(cat "$__object/parameters/mode")" echo chmod \"$mode\" \"$destination\" fi From 6460f1914d818af63ee6751bf80c883804fae83f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 01:22:40 +0100 Subject: [PATCH 0437/6109] better explain what is going on Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index dcd5222d..90ecabfc 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -56,7 +56,7 @@ while [ "$__cdist_new_objects_created" = "y" ]; do __cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")" if [ ! -f "${__cdist_cur_object_dir}/$__cdist_name_object_finished" ]; then - echo "Working on object ${__cdist_object} ..." + echo "Checking manifest for ${__cdist_object} ..." __cdist_type="$(__cdist_type_from_object "$__cdist_object")" __cdist_manifest="$__cdist_type_dir/${__cdist_type}/${__cdist_name_manifest}" From 65e84f4b4b60d83c802935bc0fca2551d286434a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 01:25:58 +0100 Subject: [PATCH 0438/6109] use cdist-dir to push results to target Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 6 +++++- bin/cdist-exec-transfer | 38 -------------------------------------- 2 files changed, 5 insertions(+), 39 deletions(-) delete mode 100755 bin/cdist-exec-transfer diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index a8d77334..71f6ef0c 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -58,7 +58,11 @@ cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" # Generate code for all objects cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_object_dir" +# Transfer all objects including code +cdist-dir push "$__cdist_target_host" "$__cdist_out_object_dir" \ + "${__cdist_remote_out_object_base_dir}" + exit 2 -cdist-exec-transfer "$__cdist_target_host" "$__cdist_out_execs" + cdist-exec-run "$__cdist_target_host" diff --git a/bin/cdist-exec-transfer b/bin/cdist-exec-transfer deleted file mode 100755 index d1ba128d..00000000 --- a/bin/cdist-exec-transfer +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -# -# 2010-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 . -# -# -# Transfer executables -# - -. cdist-config - -[ $# -eq 2 ] || __cdist_usage " " -set -e - -export __cdist_target_host="$1"; shift -export __cdist_exec_dir="$1"; shift - - -# re-create basedir so it's clean -ssh "root@${__cdist_target_host}" "rm -rf \"${__cdist_remote_cache_exec}\" && mkdir -p \"${__cdist_remote_cache_exec}\"" - -# FIXME: enable -q as soon as the code is cleaned up -scp -r "${__cdist_exec_dir}"/* \ - "root@${__cdist_target_host}:${__cdist_remote_cache_exec}" From 12ff8d66ec88528d2c07dd9c80a0234db10d1b41 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 01:28:50 +0100 Subject: [PATCH 0439/6109] add template for cdist-remote-code-run Signed-off-by: Nico Schottelius --- bin/{cdist-exec-run => cdist-code-run} | 0 bin/cdist-remote-code-run | 74 ++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) rename bin/{cdist-exec-run => cdist-code-run} (100%) create mode 100755 bin/cdist-remote-code-run diff --git a/bin/cdist-exec-run b/bin/cdist-code-run similarity index 100% rename from bin/cdist-exec-run rename to bin/cdist-code-run diff --git a/bin/cdist-remote-code-run b/bin/cdist-remote-code-run new file mode 100755 index 00000000..7064a323 --- /dev/null +++ b/bin/cdist-remote-code-run @@ -0,0 +1,74 @@ +#!/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 . +# +# +# This binary is executed on the remote side to execute explorers +# +# It supports different variables names to be used, so __explorers +# and __type_explorers can be submitted :-) +# + +. cdist-config +if [ $# -ne 3 ]; then + __cdist_usage " " +fi +set -ue + +# Variable that defines the home of the explorers +__cdist_variable_name="$1"; shift + +# Find explorers here +__cdist_explorer_dir="$1"; shift + +# Write output here +__cdist_my_out_dir="$1"; shift + +# cd to this dir +__cdist_work_dir="$__cdist_remote_base_dir" + +# Setup environment +export $__cdist_variable_name="$__cdist_explorer_dir" +cd "${__cdist_work_dir}" +mkdir -p "$__cdist_my_out_dir" + +# Ensure there is at least one explorer +num="$(ls -1 "$__cdist_explorer_dir" | wc -l)" +if [ "$num" -lt 1 ]; then + __cdist_exit_err "${__cdist_explorer_dir}: Contains no explorers" +fi + +# Execute all explorers +for explorer in "$__cdist_explorer_dir/"*; do + explorer_name="${explorer##*/}" + + if [ -f "$explorer" ]; then + if [ ! -x "$explorer" ]; then + echo "Explorer \"$explorer\" exists, but is not executable." + continue + fi + + # Execute explorers and save results in remote destination directory + "$explorer" "$@" > "${__cdist_my_out_dir}/$explorer_name" + else + if [ -e "$explorer" ]; then + echo "Explorer \"$explorer\" exists, but is not a file." + continue + fi + fi +done From cd70c2ecee69f6e5f48ca9aacddd2f79174f7258 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 01:42:13 +0100 Subject: [PATCH 0440/6109] cleanups + finish: we're able to run code remotely Signed-off-by: Nico Schottelius --- bin/{cdist-code-run => cdist-code-run-all} | 10 ++- bin/cdist-deploy-to | 6 +- bin/cdist-object-codegen | 1 - bin/cdist-remote-code-run | 74 ---------------------- bin/cdist-remote-code-run-all | 54 ++++++++++++++++ 5 files changed, 60 insertions(+), 85 deletions(-) rename bin/{cdist-code-run => cdist-code-run-all} (75%) delete mode 100755 bin/cdist-remote-code-run create mode 100755 bin/cdist-remote-code-run-all diff --git a/bin/cdist-code-run b/bin/cdist-code-run-all similarity index 75% rename from bin/cdist-code-run rename to bin/cdist-code-run-all index 598b3c5d..27935ee3 100755 --- a/bin/cdist-code-run +++ b/bin/cdist-code-run-all @@ -18,16 +18,14 @@ # along with cdist. If not, see . # # -# Exec executables on the remote side +# Exec code on the remote side # . cdist-config [ $# -eq 1 ] || __cdist_usage "" set -e -export __cdist_target_host="$1"; shift +__cdist_target_host="$1"; shift - -# Run executables - no order, no dependencies yet -ssh "root@${__cdist_target_host}" \ - "find \"${__cdist_remote_cache_exec}\" -type f -name \"${__cdist_name_exec}\" -exec {} \\;" +cdist-run-remote "$__cdist_target_host" \ + "cdist-remote-code-run-all" "${__cdist_remote_out_object_base_dir}" diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 71f6ef0c..2cb9d303 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -62,7 +62,5 @@ cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_object_dir" cdist-dir push "$__cdist_target_host" "$__cdist_out_object_dir" \ "${__cdist_remote_out_object_base_dir}" -exit 2 - - -cdist-exec-run "$__cdist_target_host" +# And finally - execute the code +cdist-code-run-all "$__cdist_target_host" diff --git a/bin/cdist-object-codegen b/bin/cdist-object-codegen index 9b5405e7..b9bdae72 100755 --- a/bin/cdist-object-codegen +++ b/bin/cdist-object-codegen @@ -43,7 +43,6 @@ export __object="$__cdist_object_dir" cd "$__cdist_local_base_dir" -echo "Generating code for $__cdist_object ..." cat << eof # # The following code is imported from output of $gencode diff --git a/bin/cdist-remote-code-run b/bin/cdist-remote-code-run deleted file mode 100755 index 7064a323..00000000 --- a/bin/cdist-remote-code-run +++ /dev/null @@ -1,74 +0,0 @@ -#!/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 . -# -# -# This binary is executed on the remote side to execute explorers -# -# It supports different variables names to be used, so __explorers -# and __type_explorers can be submitted :-) -# - -. cdist-config -if [ $# -ne 3 ]; then - __cdist_usage " " -fi -set -ue - -# Variable that defines the home of the explorers -__cdist_variable_name="$1"; shift - -# Find explorers here -__cdist_explorer_dir="$1"; shift - -# Write output here -__cdist_my_out_dir="$1"; shift - -# cd to this dir -__cdist_work_dir="$__cdist_remote_base_dir" - -# Setup environment -export $__cdist_variable_name="$__cdist_explorer_dir" -cd "${__cdist_work_dir}" -mkdir -p "$__cdist_my_out_dir" - -# Ensure there is at least one explorer -num="$(ls -1 "$__cdist_explorer_dir" | wc -l)" -if [ "$num" -lt 1 ]; then - __cdist_exit_err "${__cdist_explorer_dir}: Contains no explorers" -fi - -# Execute all explorers -for explorer in "$__cdist_explorer_dir/"*; do - explorer_name="${explorer##*/}" - - if [ -f "$explorer" ]; then - if [ ! -x "$explorer" ]; then - echo "Explorer \"$explorer\" exists, but is not executable." - continue - fi - - # Execute explorers and save results in remote destination directory - "$explorer" "$@" > "${__cdist_my_out_dir}/$explorer_name" - else - if [ -e "$explorer" ]; then - echo "Explorer \"$explorer\" exists, but is not a file." - continue - fi - fi -done diff --git a/bin/cdist-remote-code-run-all b/bin/cdist-remote-code-run-all new file mode 100755 index 00000000..6f21a99d --- /dev/null +++ b/bin/cdist-remote-code-run-all @@ -0,0 +1,54 @@ +#!/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 . +# +# +# This binary is executed on the remote side to execute explorers +# +# It supports different variables names to be used, so __explorers +# and __type_explorers can be submitted :-) +# + +. cdist-config +if [ $# -ne 1 ]; then + __cdist_usage "" +fi +set -ue + +__cdist_object_base_dir="$1"; shift + +__cdist_object_list "$__cdist_object_base_dir" > "$__cdist_tmp_file" + +# FIXME post 1.0: add dependencies +while read object; do + code="$(__cdist_object_code "$object")" + echo "Running code for $object ..." + if [ -e "$code" ]; then + if [ -f "$code" ]; then + if [ -x "$code" ]; then + "$code" + else + __cdist_exit_err "$code exists, but is not executable." + fi + else + __cdist_exit_err "$code exists, but is not a file." + fi + else + __cdist_exit_err "Missing code for ${object}." + fi +done < "$__cdist_tmp_file" From 66bfe35a464706c8a5b6b1f123ab635b8c451a77 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 01:48:18 +0100 Subject: [PATCH 0441/6109] add user information Signed-off-by: Nico Schottelius --- bin/cdist-bin-transfer | 3 +++ bin/cdist-config | 7 +++---- bin/cdist-deploy-to | 2 ++ bin/cdist-explorer-run-init | 2 ++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/cdist-bin-transfer b/bin/cdist-bin-transfer index ae204b13..d7a1dbe3 100755 --- a/bin/cdist-bin-transfer +++ b/bin/cdist-bin-transfer @@ -32,6 +32,9 @@ __cdist_my_remote_out_dir="$1"; shift __cdist_conf_dir_path=$(which cdist-config) __cdist_src_base=${__cdist_conf_dir_path%config} +# Help the user +echo "Transferring cdist binaries ..." + # re-create basedir so it's clean ssh "${__cdist_remote_user}@${__cdist_target_host}" \ "rm -rf \"${__cdist_my_remote_out_dir}\" && mkdir -p \"${__cdist_my_remote_out_dir}\"" diff --git a/bin/cdist-config b/bin/cdist-config index d84c88df..c63a0199 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -18,14 +18,13 @@ # along with cdist. If not, see . # # -# Print configuration directories - helper for all other scripts -# # Fail if something bogus is going on and export all variables -# The export is mainly needed for remote knowledge set -u -# Values can be overriden from outside, so you can +__cdist_version="1.0.0" + +# Most values can be overriden from outside, so you can # customise paths as you like (for distributors, geeks and hackers) # Names / Constants diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 2cb9d303..b0f5934e 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -34,6 +34,8 @@ export $__cdist_name_var_target_host="$__cdist_target_host" # See cdist-stages(7) # +echo "cdist $__cdist_version: Configuring $__cdist_target_host" + # Init base mkdir -p "$__cdist_local_base_dir" diff --git a/bin/cdist-explorer-run-init b/bin/cdist-explorer-run-init index a6774d11..492c70d0 100755 --- a/bin/cdist-explorer-run-init +++ b/bin/cdist-explorer-run-init @@ -28,6 +28,8 @@ set -ue __cdist_target_host="$1"; shift __cdist_my_out_dir="$1"; shift +echo "Running general explorers ..." + # copy the explorers cdist-dir push "$__cdist_target_host" \ "${__cdist_explorer_dir}" "${__cdist_remote_explorer_dir}" From d44fd92dbdfafdde324c7b1c7beb8c282458377f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 01:50:24 +0100 Subject: [PATCH 0442/6109] inform user, if run was successful Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index b0f5934e..fdda1646 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -66,3 +66,5 @@ 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." From 771d1f9e6fa10145a460c511cfb67c8a40e8f255 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 01:52:10 +0100 Subject: [PATCH 0443/6109] much less todo Signed-off-by: Nico Schottelius --- TODO-1.0 | 8 ++++---- doc/dev/todo/niconext | 5 ----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/TODO-1.0 b/TODO-1.0 index 8c6c92fd..315f1191 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -2,8 +2,9 @@ This document defines how to continue work on cdist: x general stuff x Define configuration paths (doc/internal/config-layout) - - check whether remote and local view of objects can be the same, + x check whether remote and local view of objects can be the same, i.e. local:/outdir == remote:/var/lib/cdist + x similar, but not the same x get information from target (stage 1) x Define how to get information from targets @@ -24,8 +25,8 @@ x be able to run manifest of types (stage 3) x rename $__object_dir to $__object_base_dir x use $type/manifest instead of $type/init x find $object_id in recursive runner (before merge) - - move attributes of object to subdir attributes - - run explorers for every object + x move parameters of object to subdir parameter + x run explorers for every object x generate code to be executed on clients (stage 4) x for one object @@ -77,4 +78,3 @@ x execute code on client (stage 5) --> create cdist-variables document? - include generation in makefile - diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 21b3883a..e69de29b 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,5 +0,0 @@ -add explorers per type/object - - change exec directory for all stages - - create cdist-remote-explorer-run that sets - - iterate over all stages again - - ensure discussed variables are in place From 91127357e7d50638337e1f38f3547f9b36efc4e3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 01:53:29 +0100 Subject: [PATCH 0444/6109] 3 steps needed until 1.0 Signed-off-by: Nico Schottelius --- TODO-1.0 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/TODO-1.0 b/TODO-1.0 index 315f1191..df5638ca 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -1,3 +1,11 @@ +Steps needed until 1.0: + + - finish type __file + - finish type __package + - cleanup documentation (see below) + +-------------------------------------------------------------------------------- + This document defines how to continue work on cdist: x general stuff @@ -35,9 +43,6 @@ x generate code to be executed on clients (stage 4) x execute code on client (stage 5) - Other stuff pre 1.0: - - Write some basic types - - file (with directory) - - package - doc cleanup for 1.0: - ensure every file in bin/ has a correspondent manpage - cdist manpage (main manpage) From 45429c2ca032f3a2d4da31a666109fbde28723a8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 02:13:11 +0100 Subject: [PATCH 0445/6109] Allow ids to contain slashes Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 +- conf/manifest/init | 2 ++ conf/type/__file/gencode | 13 ++++++++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index c63a0199..9ec1adac 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -67,7 +67,7 @@ __cdist_version="1.0.0" : ${__cdist_type_dir:=$__cdist_conf_dir/$__cdist_name_type} # Used for IDs -__cdist_sane_regexp='[A-Za-z0-9]*[-A-Za-z0-9_]*' +__cdist_sane_regexp='[A-Za-z0-9/]*[-A-Za-z0-9_/]*' # Default remote user : ${__cdist_remote_user:=root} diff --git a/conf/manifest/init b/conf/manifest/init index 260fb490..16e27adf 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -6,6 +6,8 @@ echo "Running initial manifest for $__target_host" echo "We could access other manifests in $__manifest" +__file /etc/configured-via-cdist --type file + case "$__target_host" in localhost) __issue iddoesnotmatterhere diff --git a/conf/type/__file/gencode b/conf/type/__file/gencode index ca8f88a2..c7307f2b 100755 --- a/conf/type/__file/gencode +++ b/conf/type/__file/gencode @@ -28,9 +28,20 @@ type="$(cat "$__object/parameter/type")" if [ -f "$__object/parameter/destination" ]; then destination="$(cat "$__object/parameter/destination")" else - destination="$__object_id" + # If no destination has been supplied, the id is the destination + # Prepend /, which got lost in the object id (and relative paths + # don't make sense) + destination="/$__object_id" fi +# Ensure we have an absolute path +if ! $(echo "$destination" | grep -q ^/); then + echo "Error: Destination ($destination) of $__object_id is not absolute." >&2 + exit 1 +fi + +# FIXME: Add file copying part here + case "$type" in directory) echo mkdir \"$destination\" From 918bb8bb5ab55927727cd1872e38f0eef2962242 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 18:33:12 +0100 Subject: [PATCH 0446/6109] in theory, finish __file/gencode (with debug) Signed-off-by: Nico Schottelius --- conf/type/__file/gencode | 47 +++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/conf/type/__file/gencode b/conf/type/__file/gencode index c7307f2b..4e54bfb5 100755 --- a/conf/type/__file/gencode +++ b/conf/type/__file/gencode @@ -40,22 +40,43 @@ if ! $(echo "$destination" | grep -q ^/); then exit 1 fi -# FIXME: Add file copying part here +# Copy source if existing +if [ -f "$__object/parameter/source" ]; then + source="$(cat "$__object/parameter/source")" -case "$type" in - directory) - echo mkdir \"$destination\" - ;; + exec 3>&1 + exec 1>&2 - file) - echo touch \"$destination\" - ;; + set -x + md5sum="$(md5sum "$source")" + remote_md5sum="$(cat "$__object/explorer/md5sum")" - *) - echo "Unsupported type: \"$type\"" >&2 - exit 1 - ;; -esac + # Is md5sum the right approach? + if [ "$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 + +# No source? Create empty file/dir +else + case "$type" in + directory) + echo mkdir \"$destination\" + ;; + + file) + echo touch \"$destination\" + ;; + + *) + echo "Unsupported type: \"$type\"" >&2 + exit 1 + ;; + esac +fi if [ -f "$__object/parameter/mode" ]; then mode="$(cat "$__object/parameters/mode")" From fe90f33ff77e245edb822f8763e6beb0b6c19199 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 18:34:00 +0100 Subject: [PATCH 0447/6109] singletons better described Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.0 | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index b61ccde1..99ea4dee 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -1,5 +1,6 @@ Core: - Support singletons (see types/issue for a good reason) + - probably name them only_once and use that as the internal id! - extend cdist_tree_wrapper to look for optional/mandority parameters for types - gives "good" database, which contains only valid objects - use ssh with master socket? From 8760579c7b7c5dc11387eab534f7dd4b7b60bd5f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 18:37:14 +0100 Subject: [PATCH 0448/6109] -x test similar as the others Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index a24144b8..f236f199 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -43,10 +43,7 @@ cdist-type-build-emulation || __cdist_exit_err "Failed to build type emulation b PATH="${__cdist_out_type_bin_dir}:$PATH" # Force -x, so the user is aware the file is executed -if [ ! -x "${__cdist_manifest}" ]; then - __cdist_exit_err "${__cdist_manifest} needs to be executable." -fi - +[ -x "${__cdist_manifest}" ] || __cdist_exit_err "${__cdist_manifest} needs to be executable." mkdir -p "${__cdist_output_dir}" || __cdist_exit_err "Cannot create output dir ${__cdist_output_dir}" cd "$__cdist_work_dir" || __cdist_exit_err "Cannot change to work dir \"$__cdist_work_dir\"." From 3b7bbb0756b6be4bc743b50a320195e012278eb6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 18:39:21 +0100 Subject: [PATCH 0449/6109] replace __cdist_type_mydir with __cdist_type_dir 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 9ec1adac..36319265 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -141,9 +141,9 @@ __cdist_type_has_explorer() fi } -__cdist_type_mydir() +__cdist_type_dir() { - echo "${__cdist_type_dir}/${__cdist_type_current}" + echo "${__cdist_type_dir}/$1" } __cdist_type_explorer_dir() From 06a56ab6d2ddfcd4f64e858bc0eb21bd0c4ad378 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 18:42:38 +0100 Subject: [PATCH 0450/6109] AR Steven: DOC: manifest can access $__type (implement $__type ;-) Signed-off-by: Nico Schottelius --- bin/cdist-config | 1 + bin/cdist-manifest-run-all | 1 + conf/type/__issue/manifest | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 36319265..98d8abf7 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -57,6 +57,7 @@ __cdist_version="1.0.0" : ${__cdist_name_var_target_host:=__$__cdist_name_target_host} : ${__cdist_name_var_object:=__$__cdist_name_object} : ${__cdist_name_var_object_id:=__$__cdist_name_object_id} +: ${__cdist_name_var_type:=__$__cdist_name_type} # Base diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 90ecabfc..df4548bf 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -70,6 +70,7 @@ while [ "$__cdist_new_objects_created" = "y" ]; do # Make variables available to non-core export $__cdist_name_var_object="$__cdist_cur_object_dir" export $__cdist_name_var_object_id="$__cdist_object_id" + export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" \ "$__cdist_new_objects_dir" diff --git a/conf/type/__issue/manifest b/conf/type/__issue/manifest index 73df3dee..a4cb703b 100755 --- a/conf/type/__issue/manifest +++ b/conf/type/__issue/manifest @@ -24,10 +24,10 @@ os="$(cat "out/explorer/os")" case "$os" in archlinux) - source="$(pwd -P)/files/archlinux" + source="$__type/files/archlinux" ;; *) - source="$(pwd -P)/files/default" + source="$__type/files/default" ;; esac From 1dc963ea4bcea152bfb93838f67a58ad4b2568b7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Feb 2011 18:45:11 +0100 Subject: [PATCH 0451/6109] more todo post 1.0 (not much) Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.0 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index 99ea4dee..dcecc1cd 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -6,6 +6,8 @@ Core: - use ssh with master socket? - saves connection delay for new connections: -M - hint: http://protempore.net/~calvins/howto/ssh-connection-sharing/ + - remove remote_base_dir at beginning - otherwise fragments from + previous runs may still be existing! Type handler: - add dependency parameters to core available for every type From 30b1f2632af69a6f099f46894d17fdc6cf87ceb3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 10:32:16 +0100 Subject: [PATCH 0452/6109] pass out dir to bin/cdist-type-build-emulation because __cdist_out_type_bin_dir is script specific Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run | 16 ++++++++++------ bin/cdist-type-build-emulation | 12 +++++++----- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index f236f199..894bc296 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -24,7 +24,7 @@ . cdist-config [ $# -eq 3 ] || __cdist_usage " " -set -u +set -ux __cdist_target_host="$1"; shift __cdist_manifest="$1"; shift @@ -37,14 +37,18 @@ __cdist_work_dir="$__cdist_local_base_dir" export __cdist_output_dir __cdist_manifest # Ensure binaries exist and are up-to-date -cdist-type-build-emulation || __cdist_exit_err "Failed to build type emulation binaries" +cdist-type-build-emulation "${__cdist_out_type_bin_dir}" \ + || __cdist_exit_err "Failed to build type emulation binaries" # prepend our path, so all cdist tools come before other tools -PATH="${__cdist_out_type_bin_dir}:$PATH" +export PATH="${__cdist_out_type_bin_dir}:$PATH" # Force -x, so the user is aware the file is executed -[ -x "${__cdist_manifest}" ] || __cdist_exit_err "${__cdist_manifest} needs to be executable." -mkdir -p "${__cdist_output_dir}" || __cdist_exit_err "Cannot create output dir ${__cdist_output_dir}" -cd "$__cdist_work_dir" || __cdist_exit_err "Cannot change to work dir \"$__cdist_work_dir\"." +[ -x "${__cdist_manifest}" ] \ + || __cdist_exit_err "${__cdist_manifest} needs to be executable." +mkdir -p "${__cdist_output_dir}" \ + || __cdist_exit_err "Cannot create output dir ${__cdist_output_dir}" +cd "$__cdist_work_dir" \ + || __cdist_exit_err "Cannot change to work dir \"$__cdist_work_dir\"." __cdist_exec_fail_on_error "${__cdist_manifest}" "$@" diff --git a/bin/cdist-type-build-emulation b/bin/cdist-type-build-emulation index e5def2bd..9a207e33 100755 --- a/bin/cdist-type-build-emulation +++ b/bin/cdist-type-build-emulation @@ -21,12 +21,14 @@ # . cdist-config -set -aeu +[ $# -eq 1 ] || __cdist_usage "" +set -eu + +__cdist_output_dir="$1"; shift -# FIXME: load this from the cdist-core library __cdist_type_emulator="$(which cdist-type-emulator)" -if [ ! -d ${__cdist_type_dir} ]; then +if [ ! -d "${__cdist_type_dir}" ]; then __cdist_exit_err "$__cdist_type_dir must exist and contain available types" fi @@ -35,7 +37,7 @@ cd "${__cdist_type_dir}" ls -1 > "${__cdist_tmp_file}" # Create binaries -mkdir -p "${__cdist_out_type_bin_dir}" +mkdir -p "${__cdist_output_dir}" while read type; do - ln -sf "${__cdist_type_emulator}" "${__cdist_out_type_bin_dir}/${type}" + ln -sf "${__cdist_type_emulator}" "${__cdist_output_dir}/${type}" done < "${__cdist_tmp_file}" From 3ab8f8d9649a4e0fbf0998797c94a9e1002723ee Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 10:32:53 +0100 Subject: [PATCH 0453/6109] -debug Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 894bc296..d10cba02 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -24,7 +24,7 @@ . cdist-config [ $# -eq 3 ] || __cdist_usage " " -set -ux +set -u __cdist_target_host="$1"; shift __cdist_manifest="$1"; shift From 1ed0b6d4749553f46ef7996df19fa844c02bb584 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 10:42:06 +0100 Subject: [PATCH 0454/6109] export __cdist_local_base_dir in cdist-deploy-to for others Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 3 +++ conf/type/__file/gencode | 2 +- conf/type/__issue/manifest | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index fdda1646..b376912a 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -30,6 +30,9 @@ __cdist_target_host="$1" # Make target host available for non-core export $__cdist_name_var_target_host="$__cdist_target_host" +# Export variables for core, which others do not reset +export __cdist_local_base_dir + ################################################################################ # See cdist-stages(7) # diff --git a/conf/type/__file/gencode b/conf/type/__file/gencode index 4e54bfb5..e0398877 100755 --- a/conf/type/__file/gencode +++ b/conf/type/__file/gencode @@ -41,6 +41,7 @@ if ! $(echo "$destination" | grep -q ^/); then fi # Copy source if existing +# FIXME: directory handling not supported - add recursive flag? if [ -f "$__object/parameter/source" ]; then source="$(cat "$__object/parameter/source")" @@ -59,7 +60,6 @@ if [ -f "$__object/parameter/source" ]; then # Probably describe it in cdist-quickstart... scp "$source" "root@${__target_host}:${destination}" fi - # No source? Create empty file/dir else case "$type" in diff --git a/conf/type/__issue/manifest b/conf/type/__issue/manifest index a4cb703b..cdaeefc2 100755 --- a/conf/type/__issue/manifest +++ b/conf/type/__issue/manifest @@ -22,6 +22,8 @@ destination=/etc/issue os="$(cat "out/explorer/os")" +set -x + case "$os" in archlinux) source="$__type/files/archlinux" @@ -32,4 +34,4 @@ case "$os" in esac # FIXME: replace id with $destination post-1.0 -__file etc-issue --source "$source" --destination "$destination" --type file +__file "$destination" --source "$source" --type file From c27d0528903355a37586b95514cea408bade7deb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 10:44:50 +0100 Subject: [PATCH 0455/6109] cleanup issue Signed-off-by: Nico Schottelius --- conf/type/__issue/manifest | 3 --- 1 file changed, 3 deletions(-) diff --git a/conf/type/__issue/manifest b/conf/type/__issue/manifest index cdaeefc2..a79544ee 100755 --- a/conf/type/__issue/manifest +++ b/conf/type/__issue/manifest @@ -22,8 +22,6 @@ destination=/etc/issue os="$(cat "out/explorer/os")" -set -x - case "$os" in archlinux) source="$__type/files/archlinux" @@ -33,5 +31,4 @@ case "$os" in ;; esac -# FIXME: replace id with $destination post-1.0 __file "$destination" --source "$source" --type file From ea46e6aeec1186d7e5e374c1c74722e52c1d2c4f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 11:04:23 +0100 Subject: [PATCH 0456/6109] remove old internal documentation, update READMEs Signed-off-by: Nico Schottelius --- REAL_README | 14 ++++++++++++++ doc/dev/todo/post-1.0 | 9 ++++++--- doc/internal.REMOVE_PRE_1.0/puppet-missing | 20 -------------------- 3 files changed, 20 insertions(+), 23 deletions(-) delete mode 100644 doc/internal.REMOVE_PRE_1.0/puppet-missing diff --git a/REAL_README b/REAL_README index 15ec6507..57d252c8 100644 --- a/REAL_README +++ b/REAL_README @@ -26,6 +26,20 @@ it ticks differently: * User defines configuration in shell scripts (called ***manifests***) * Cdist generates internal configuration (cconfig style) and afterwards applies configuration +### Features + +Stuff that should probably be included in every configuration management, +but is not. Or: The reason why I began to write cdist. + + * Speed + * Elegant code + * Clean design + * Good documentation (man pages) + * Meaningful error messages + * No surprise factor + * Consistency in behaviour, naming and documentation + * Easy integration nacked installations + ## Requirements ### Server diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index dcecc1cd..f6466de3 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -3,9 +3,6 @@ Core: - probably name them only_once and use that as the internal id! - extend cdist_tree_wrapper to look for optional/mandority parameters for types - gives "good" database, which contains only valid objects - - use ssh with master socket? - - saves connection delay for new connections: -M - - hint: http://protempore.net/~calvins/howto/ssh-connection-sharing/ - remove remote_base_dir at beginning - otherwise fragments from previous runs may still be existing! @@ -29,3 +26,9 @@ Types to be written: - delete_line_from_file - regexp replace (can probably cover all?) +Documentation: + - Multi master setups + - use ssh with master socket? + - saves connection delay for new connections: -M + - hint: http://protempore.net/~calvins/howto/ssh-connection-sharing/ + - Describe pull architecture and requirements diff --git a/doc/internal.REMOVE_PRE_1.0/puppet-missing b/doc/internal.REMOVE_PRE_1.0/puppet-missing deleted file mode 100644 index 443b414b..00000000 --- a/doc/internal.REMOVE_PRE_1.0/puppet-missing +++ /dev/null @@ -1,20 +0,0 @@ -What do I miss from puppet? - - - speed - - elegance - - clean design - - documentation - - the "no surprise" factor - - easy to use "data memory" (i.e. external ressources) - - easy integration into installation process - - copy identity to master - - multi master setups - - development configurations / tests - - editing of configuration files - - similar to cfengine - - replace bug squasher with bug avoidance - - qmail did not need one either - - push infrastructure - - real / meaningful error messages - - From b2def229fd5984f12dd2949023fb2402eb831af8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 11:04:59 +0100 Subject: [PATCH 0457/6109] rename logfile Signed-off-by: Nico Schottelius --- doc/dev/logs/{stevens_ideas => 2011-02-04.steven} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/dev/logs/{stevens_ideas => 2011-02-04.steven} (100%) diff --git a/doc/dev/logs/stevens_ideas b/doc/dev/logs/2011-02-04.steven similarity index 100% rename from doc/dev/logs/stevens_ideas rename to doc/dev/logs/2011-02-04.steven From be7b68815a5d60b1a6c398cf076cd5417105a4ab Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 11:08:07 +0100 Subject: [PATCH 0458/6109] --todo, begin cleanup of cdist-language.text Signed-off-by: Nico Schottelius --- REAL_README | 1 + TODO-1.0 | 3 ++- doc/dev/todo/niconext | 1 + doc/man/cdist-language.text | 5 ----- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/REAL_README b/REAL_README index 57d252c8..7792ef01 100644 --- a/REAL_README +++ b/REAL_README @@ -39,6 +39,7 @@ but is not. Or: The reason why I began to write cdist. * No surprise factor * Consistency in behaviour, naming and documentation * Easy integration nacked installations + * Simple and well-known DSL: posix shell ## Requirements diff --git a/TODO-1.0 b/TODO-1.0 index df5638ca..1d3b7ce8 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -1,6 +1,6 @@ Steps needed until 1.0: - - finish type __file + x finish type __file - finish type __package - cleanup documentation (see below) @@ -81,5 +81,6 @@ x execute code on client (stage 5) - DOC document that $type/manifest is executed for every object/instance - DOC: types can always access __cdist_out_objects, __cdist_out_explorers, __cdist_out_execs --> create cdist-variables document? + - cleanup READMEs - include generation in makefile diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index e69de29b..e39803b1 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -0,0 +1 @@ +Prepare documentation for 1.0.0. diff --git a/doc/man/cdist-language.text b/doc/man/cdist-language.text index d3544474..d3d7ab77 100644 --- a/doc/man/cdist-language.text +++ b/doc/man/cdist-language.text @@ -40,11 +40,6 @@ The three stages are used to seperate configurations: - "manifests" (use the same name here?) will be run/sourced - inheritance possible via sourcing - cdist-lib always preloaded - - library == functions? - - - matching on explored items, not only on host name? - - match function in host? [optional] - - explorer ran before! - document exported variables! use __ prefix instead of __cdist (shorter writing, __ is defined as sytem anyway) From 13dc45e1def87528de6b8f00958edf0e5e32bf7d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 11:11:00 +0100 Subject: [PATCH 0459/6109] already did stuff that was scheduled for post 1.0 Signed-off-by: Nico Schottelius --- TODO-1.0 | 1 + doc/dev/todo/post-1.0 | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/TODO-1.0 b/TODO-1.0 index 1d3b7ce8..dba148ba 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -82,5 +82,6 @@ x execute code on client (stage 5) - DOC: types can always access __cdist_out_objects, __cdist_out_explorers, __cdist_out_execs --> create cdist-variables document? - cleanup READMEs + - Check all references in manpages, ensure all manpages exist - include generation in makefile diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index f6466de3..9d314012 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! - - extend cdist_tree_wrapper to look for optional/mandority parameters for types - - gives "good" database, which contains only valid objects - remove remote_base_dir at beginning - otherwise fragments from previous runs may still be existing! From 2b20d9914f3a676c49edbba3ac6a6faa80f4f358 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 11:19:43 +0100 Subject: [PATCH 0460/6109] cdist-language cleanup Signed-off-by: Nico Schottelius --- TODO-1.0 | 7 +++++-- doc/dev/todo/post-1.0 | 3 +++ doc/man/cdist-language.text | 25 ----------------------- doc/man/cdist.text | 40 +++++++++++++++++++++---------------- 4 files changed, 31 insertions(+), 44 deletions(-) diff --git a/TODO-1.0 b/TODO-1.0 index dba148ba..50901585 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -57,6 +57,8 @@ x execute code on client (stage 5) - install packages only if not existent - copy file only if different - cdist [IMPORTANT] + - explain the general approach + - give right pointers - cdist-explorers - add terminology - define steps within configuration apply @@ -79,8 +81,9 @@ x execute code on client (stage 5) - cdist-type integration! - DOC document "cd $__object_dir, before running manifest" in doc/man/cdist-types.text - DOC document that $type/manifest is executed for every object/instance - - DOC: types can always access __cdist_out_objects, __cdist_out_explorers, __cdist_out_execs - --> create cdist-variables document? + - DOC: exported variables: + __type, __explorer, __type_explorer, __object, __object_id + - cleanup READMEs - Check all references in manpages, ensure all manpages exist diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index 9d314012..84ee7820 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -3,6 +3,9 @@ Core: - probably name them only_once and use that as the internal id! - remove remote_base_dir at beginning - otherwise fragments from previous runs may still be existing! + -> probably also local_base_dir! + - 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 diff --git a/doc/man/cdist-language.text b/doc/man/cdist-language.text index d3d7ab77..a0073cdb 100644 --- a/doc/man/cdist-language.text +++ b/doc/man/cdist-language.text @@ -16,31 +16,6 @@ A cdist configuration consists of the following parts: - library (cdist-language-library(7)) - modules (cdist-language-modules(7)) -In short the configuration is built as follows: - -- conf/hosts/init is executed, the resulting output is used for module loading -- the appropriate modules are loaded and executed, which -- use library functions. - -The three stages are used to seperate configurations: - -- hosts contain mappings to created modules -- modules create (probably site specific) configurations using library collections -- the library is shipped with cdist, but can be extendet locally - - - - DSL: Shell! - - gives if, else and EVEN elsif for free! - - and case - - and and and - - and there's no os (solaris doesn't count) without a usable /bin/sh - - cdist defines what you can use - - you _can_ use os specific stuff - - but it's ugly and you shoot into your own foot - - "manifests" (use the same name here?) will be run/sourced - - inheritance possible via sourcing - - cdist-lib always preloaded - - document exported variables! use __ prefix instead of __cdist (shorter writing, __ is defined as sytem anyway) diff --git a/doc/man/cdist.text b/doc/man/cdist.text index 677a727a..ac12c8f7 100644 --- a/doc/man/cdist.text +++ b/doc/man/cdist.text @@ -8,35 +8,41 @@ NAME cdist - Configuration management system +NEW DESCRIPTION +----------- +- is cm +- quickstart - cdist-quickstart +- configured in shell dsl - pointers to posix and problems (sh != bash), os specific +- how to apply - cdist-deploy-to +- how to write - cdist-manifest, cdist-type +- + + DESCRIPTION ----------- -Cdist allows you to centrally define a configurations for -UNIX systems and apply them. Cdist generally uses the push -approach (a server pushes out the configuration to the clients), -but can also be used the pull way (see cdist-push-pull(7)). +Cdist is a very simple, elegant, cleanly designed configuration management +system. Cdist allows you to centrally define configurations for UNIX systems +Cdist generally uses the push approach (a server pushes out the +configuration to the clients), but can also be used the pull way. -Cdist-deploy-to(1) is the main command to be used to deploy -configurations to a host. +Cdist-deploy-to is the main command to be used to configure a host. -The mapping of configurations to hosts is defined -in so called manifests, which are written in shell -script language (see cdist-manifest(7)). +The mapping of configurations to hosts is defined in so called manifests, +which are written in shell script language. -Logical units of files and directives are called "types" in cdist jargon -(see cdist-types(7)). Cdist ships with some types, which you can change -or create new ones or even submit your types for inclusion into mainstream -(see cdist-type-inclusion(7)). +Logical units of functionality are called "types" in cdist jargon. Cdist ships +with some types, which you can change or create new ones or even submit your +types for inclusion into cdist. -The fastest way to get a host configured using cdist is probably -cdist-quickstart(7). +The fastest way to get a host configured using cdist is probably using +cdist-quickstart. SEE ALSO -------- Website: http://www.nico.schottelius.org/cdist/[], cdist-push-pull(7), cdist-deploy-to(1), cdist-manifest(7), cdist-types(7), cdist-type-inclusion(7), -cdist-quickstart(7) - +cdist-quickstart(1) COPYING ------- From bc86f8c23a1637bbfa86d8e8321ae7330521757c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 11:20:10 +0100 Subject: [PATCH 0461/6109] remove section: __var was already defined in cdist-language months ago :-) Signed-off-by: Nico Schottelius --- doc/man/cdist-language.text | 3 --- 1 file changed, 3 deletions(-) diff --git a/doc/man/cdist-language.text b/doc/man/cdist-language.text index a0073cdb..e5812a5d 100644 --- a/doc/man/cdist-language.text +++ b/doc/man/cdist-language.text @@ -16,9 +16,6 @@ A cdist configuration consists of the following parts: - library (cdist-language-library(7)) - modules (cdist-language-modules(7)) -- document exported variables! - use __ prefix instead of __cdist (shorter writing, __ is defined as sytem anyway) - - library vs. modules? Requirements: From 0945b0fdb9dade19d872f5ba4429059b636de68e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 11:21:49 +0100 Subject: [PATCH 0462/6109] remove now unneeded cdist-language Signed-off-by: Nico Schottelius --- REAL_README | 6 +++++ doc/man/cdist-language.text | 44 ------------------------------------- 2 files changed, 6 insertions(+), 44 deletions(-) delete mode 100644 doc/man/cdist-language.text diff --git a/REAL_README b/REAL_README index 7792ef01..ced5f597 100644 --- a/REAL_README +++ b/REAL_README @@ -19,6 +19,9 @@ it ticks differently: * cdist is written in POSIX shell * No special requirements like high level interpreters needed on server or target +MAIN AIM: It MUST be incredible easy/dumb to add new types. + + ### Architecture * Push mode (server pushes configuration) @@ -40,6 +43,9 @@ but is not. Or: The reason why I began to write cdist. * Consistency in behaviour, naming and documentation * Easy integration nacked installations * Simple and well-known DSL: posix shell + * It is very easy to + * extend cdist + * debug cdist-core and cdist-types ## Requirements diff --git a/doc/man/cdist-language.text b/doc/man/cdist-language.text deleted file mode 100644 index e5812a5d..00000000 --- a/doc/man/cdist-language.text +++ /dev/null @@ -1,44 +0,0 @@ -cdist-language(7) -================= -Nico Schottelius - - -NAME ----- -cdist-language - Cdist Configuration language - - -DESCRIPTION ------------ -A cdist configuration consists of the following parts: - -- manifests (cdist-manifests(7)) -- library (cdist-language-library(7)) -- modules (cdist-language-modules(7)) - -- library vs. modules? - -Requirements: - It MUST be incredible easy/dumb to add new types. - => growable default types - - - how to write a module - - module function autoloading via *.sh - - module "manifest"? - - create functions in *.sh - - name functions "modulename_function" - module hellow - function kitty - => hellow_kitty - - - you are advised (not forced) to put files - to a subdirectory named "files" - -SEE ALSO --------- - - -COPYING -------- -Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). From 0792e5aae32076791418d20708df22ea1a5fc584 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 11:27:53 +0100 Subject: [PATCH 0463/6109] cleanup and remove cdist-design.text Signed-off-by: Nico Schottelius --- REAL_README | 12 +++++- TODO-1.0 | 5 +-- doc/dev/todo/post-1.0 | 2 + doc/man/cdist-design.text | 86 --------------------------------------- 4 files changed, 14 insertions(+), 91 deletions(-) delete mode 100644 doc/man/cdist-design.text diff --git a/REAL_README b/REAL_README index ced5f597..8ca21a9c 100644 --- a/REAL_README +++ b/REAL_README @@ -46,6 +46,10 @@ but is not. Or: The reason why I began to write cdist. * It is very easy to * extend cdist * debug cdist-core and cdist-types + * Focus on reuse of existing functionality + * ssh + * sh + * find, rm, ... ## Requirements @@ -61,7 +65,13 @@ but is not. Or: The reason why I began to write cdist. * SSH-Client (for pull architecture) * SSH-Server (for push architecture) -## How to get cdist +## Installation + +### Get cdist + +Operation on the server is run as "cdist" user. +Operation on the client is run as "root" user. + git clone git://git.schottelius.org/cdist diff --git a/TODO-1.0 b/TODO-1.0 index 50901585..5b4cf069 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -47,8 +47,6 @@ x execute code on client (stage 5) - ensure every file in bin/ has a correspondent manpage - cdist manpage (main manpage) - cleanup following man + their tree: - - cdist-language [CLEANUP AND REMOVE] - - cdist-design.text [CLEANUP AND REMOVE] - cdist-push-pull [WRITE] - cdist-quickstart [WRITE] - how to write a minimal host manifest @@ -81,8 +79,7 @@ x execute code on client (stage 5) - cdist-type integration! - DOC document "cd $__object_dir, before running manifest" in doc/man/cdist-types.text - DOC document that $type/manifest is executed for every object/instance - - DOC: exported variables: - __type, __explorer, __type_explorer, __object, __object_id + - DOC: exported variables: __type, __explorer, __type_explorer, __object, __object_id - cleanup READMEs - Check all references in manpages, ensure all manpages exist diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index 84ee7820..98bf6ed7 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -33,3 +33,5 @@ Documentation: - saves connection delay for new connections: -M - hint: http://protempore.net/~calvins/howto/ssh-connection-sharing/ - Describe pull architecture and requirements + - cdist-trigger after first run from /var/lib/cdist/out/bin? + - Different environments (production, integration, development) diff --git a/doc/man/cdist-design.text b/doc/man/cdist-design.text deleted file mode 100644 index a0cb60aa..00000000 --- a/doc/man/cdist-design.text +++ /dev/null @@ -1,86 +0,0 @@ -cdist-design(7) -=============== -Nico Schottelius - - -NAME ----- -cdist-design - Design ideas for cdist - -DESCRIPTION ------------ - -When using cdist with the push principle, the execution tree looks likes this: - --------------------------------------------------------------------------------- -% server - cdist-deploy-to(1) # main tool for deployment - cdist-config(1) # setup environment - cdist-build(1) # coordinates build process / dummy otherwise - cdist-preprocess(1) # fills up variables with content - cdist-explore(1) % client # explores client configuration - cdist-compile(1) # parses configuration, - # creates internal state in cconfig format, - # verifies configuration - cdist-link(1) # uses cconfig output, creates executable - cdist-remote-exec(1) # coordinates remote execution, dummy otherwise - cdist-transfer(1) # transfer executable to client - cdist-execute(1) % client # execute resulting executable --------------------------------------------------------------------------------- - -Operation on the server is run as "cdist" user. -Operation on the client is run as "root" user. - -When using cdist with the pull principle (configuration triggered by client): - --------------------------------------------------------------------------------- -% client - cdist-trigger(1) # connects to server - cdist-deploy-to(1) % server: see above --------------------------------------------------------------------------------- - - -MERGE INTO ABOVE..... -## How cdist works - -### Exploring your system - -cdist analyses the system to apply the configuration on and -selects the right backends. You can use ***cdist-explore*** to -the results of the explore functions. - -### Applying the configuration - -cdist looks for the configuration to apply on the local host -and applies it using ***cdist-apply***. - -### Managing many hosts - -Whereas ***cdist-apply*** manages one host, ***cdist-deploy*** -applies the configuration on enabled hosts. - - - version control via git - - file distribution via ssh - - authentication via ssh - - - dumb clients, similar to manifest compile in puppet - - clients just execute commands - - dependencies via make? - - how to ensure sigletons / conflicting definitions? - file { "/a": - ensure => present, - file { "/a": - ensure => absent, - =>=>>>>>>>>>>>>>>>> via cconfig - - -SEE ALSO --------- -cdist(7), website: http://www.nico.schottelius.org/cdist/[] - - -COPYING -------- -Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). - From 250dedc1c8c96a0bb40c153c2d31abc7fefafeac Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 11:33:19 +0100 Subject: [PATCH 0464/6109] cleanup todo lists Signed-off-by: Nico Schottelius --- TODO-1.0 | 55 ++++++++++++++----------------------------- doc/dev/todo/post-1.0 | 15 +++++++----- 2 files changed, 27 insertions(+), 43 deletions(-) diff --git a/TODO-1.0 b/TODO-1.0 index 5b4cf069..5f4229a1 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -42,46 +42,27 @@ x generate code to be executed on clients (stage 4) x execute code on client (stage 5) -- Other stuff pre 1.0: - - doc cleanup for 1.0: - - ensure every file in bin/ has a correspondent manpage - - cdist manpage (main manpage) - - cleanup following man + their tree: - - cdist-push-pull [WRITE] - - cdist-quickstart [WRITE] - - how to write a minimal host manifest - - cdist-types [IMPORTANT] - - only do necessary work [TYPE IMPLEMENTATION HINTS] - - install packages only if not existent - - copy file only if different - - cdist [IMPORTANT] - - explain the general approach - - give right pointers - - cdist-explorers - - add terminology - - define steps within configuration apply - - detect impossible/unsafe things: - - creating a file twice - - installing and removing a package - - and report location of occurence - - parse afterwards? - - multi master setups - - templating - - how to define templates - - variable substitution from shell may be problematic - - SHELL SCRIPTS! (executables? do not support?) - - stdout == output of template == what will be used - - cleanup website - - remove HACKERS_README - - create doc/dev/HACKERS_README - - Add install target to Makefile - - create cdist-config-init to create basic tree - - cdist-type integration! +- Last doc stuff for 1.0.0: + - ensure every file in bin/ has a correspondent manpage + - cdist-quickstart [WRITE] + - how to write a minimal host manifest + - cdist-type [IMPORTANT] + - only do necessary work [TYPE IMPLEMENTATION HINTS] + - install packages only if not existent + - copy file only if different + - cdist-type-integration + - cdist [IMPORTANT] + - explain the general approach + - give right pointers + - cdist-explorer + - DOC document "cd $__object_dir, before running manifest" in doc/man/cdist-types.text - DOC document that $type/manifest is executed for every object/instance - DOC: exported variables: __type, __explorer, __type_explorer, __object, __object_id - - cleanup READMEs + - Cleanup READMEs - Check all references in manpages, ensure all manpages exist - - include generation in makefile +- Makefile: + - Add install target + - Include manpage generation diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index 98bf6ed7..484a527d 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -18,20 +18,23 @@ Stage 5 (code execution): - dependencies -Types to be written: - - ssh-keys (host/user) - - services - - user management - - file editing +Types to be written/extended: + - __ssh-keys (host/user) + - __service + - __user + - __file_edit - add_line_to_file_if_not_existing - delete_line_from_file - regexp replace (can probably cover all?) + - __file: + - template == [shell script] stdout Documentation: - - Multi master setups + - Describe Multi master setups - use ssh with master socket? - saves connection delay for new connections: -M - hint: http://protempore.net/~calvins/howto/ssh-connection-sharing/ - Describe pull architecture and requirements - cdist-trigger after first run from /var/lib/cdist/out/bin? - Different environments (production, integration, development) + - via version control From 45cc072d212503560dad6fc03b922ced890ee805 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 11:38:01 +0100 Subject: [PATCH 0465/6109] remove cdist-environment, merge into HACKERS_README, update that as well Signed-off-by: Nico Schottelius --- HACKERS_README | 12 +++++++++--- TODO-1.0 | 1 + doc/man/cdist-environment.text | 32 -------------------------------- 3 files changed, 10 insertions(+), 35 deletions(-) delete mode 100644 doc/man/cdist-environment.text diff --git a/HACKERS_README b/HACKERS_README index 004b8612..4d194e0d 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -11,13 +11,19 @@ Do not believe anything written in cdist, besides what's written in this file -- Nico, 20101201 -What you can do so far: (executed from top level directory) +## Conventions -The following code will get executed if you run this README, -I usually do it like this: +- All variables exported by cdist are prefixed with a double underscore (__) +- All cdist-internal variables are prefixed with __cdist_ and are generally not exported. + +## Running cdist when developing + +This file is suitable for execution and saving the objects and +explorers from cdist. I usually do it like this: % rm -rf /tmp/localhost && ./HACKERS_README +################################################################################ eof # Tell the user what we do, so this script makes sense during execution diff --git a/TODO-1.0 b/TODO-1.0 index 5f4229a1..19b32ec7 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -43,6 +43,7 @@ x generate code to be executed on clients (stage 4) x execute code on client (stage 5) - Last doc stuff for 1.0.0: + - remove old documentation from doc/man/! - ensure every file in bin/ has a correspondent manpage - cdist-quickstart [WRITE] - how to write a minimal host manifest diff --git a/doc/man/cdist-environment.text b/doc/man/cdist-environment.text deleted file mode 100644 index 4e8109ae..00000000 --- a/doc/man/cdist-environment.text +++ /dev/null @@ -1,32 +0,0 @@ -cdist-environment(7) -==================== -Nico Schottelius - - -NAME ----- -cdist-environment - Which environment cdist sets up - - -DESCRIPTION ------------ - -PREFIXES --------- - -These prefixes are supposed to be used. If you write a new type, you -should stick to these conventions. - -- __: All variables setup by cdist are prefixed with a double _ -- __cdist_: Variables setup by the cdist core -- ___: Variable setup by type - - -EXAPMLES --------- - - -COPYING -------- -Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). From 39a2ab4a72419b95ed3e9527a28f73cba55e54d9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 11:39:13 +0100 Subject: [PATCH 0466/6109] be even more verbose in HACKERS_README Signed-off-by: Nico Schottelius --- HACKERS_README | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/HACKERS_README b/HACKERS_README index 4d194e0d..6ba3fbf9 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -26,8 +26,8 @@ explorers from cdist. I usually do it like this: ################################################################################ eof -# Tell the user what we do, so this script makes sense during execution set -x +# Tell the user what we do, so this script makes sense during execution # prepare use (only from top level directory) export PATH="$PATH:$(pwd -P)/bin" @@ -35,7 +35,11 @@ export __cdist_conf_dir="$(pwd -P)/conf" export __cdist_local_base_dir=/tmp/localhost +# Allow user to suply hostname target="${1:-localhost}" + +# Run the real script cdist-deploy-to "$target" +# Display results find "${__cdist_local_base_dir}" From 96fbffeaa1415bc972bd753ef030d792e6a430f1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 11:40:18 +0100 Subject: [PATCH 0467/6109] makefile: +clean target Signed-off-by: Nico Schottelius --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index e56f62c8..8125519e 100644 --- a/Makefile +++ b/Makefile @@ -37,3 +37,6 @@ man: echo $(MANSRC) a2x -f manpage --no-xmllint doc/man/cdist-stages.text echo man ./doc/man/cdist-stages.7 + +clean: + rm -f doc/man/*.html doc/man/*.[1-9] From f8c5c03e77b79ef96890eac2ddc0e500465847d8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 11:46:52 +0100 Subject: [PATCH 0468/6109] prepare manpage generation in makefile Signed-off-by: Nico Schottelius --- .gitignore | 1 + Makefile | 30 ++++++++++++------- ...ist-explorers.text => cdist-explorer.text} | 0 ...ist-manifests.text => cdist-manifest.text} | 0 doc/man/{cdist-types.text => cdist-type.text} | 0 5 files changed, 20 insertions(+), 11 deletions(-) rename doc/man/{cdist-explorers.text => cdist-explorer.text} (100%) rename doc/man/{cdist-manifests.text => cdist-manifest.text} (100%) rename doc/man/{cdist-types.text => cdist-type.text} (100%) diff --git a/.gitignore b/.gitignore index b4ec3d44..099d7de3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .*.swp doc/man/*.[1-9] +doc/man/.marker diff --git a/Makefile b/Makefile index 8125519e..888f6561 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,22 @@ +# General PREFIX=/usr BINDIR=$(PREFIX}/bin +A2X=a2x -f manpage --no-xmllint + +# Developer only WEBDIR=$$HOME/niconetz WEBPAGE=software/cdist.mdwn -MANSRC=doc/man/cdist-config-layout.text doc/man/cdist-config.text \ - doc/man/cdist-deploy-to.text doc/man/cdist-design.text \ - doc/man/cdist-environment.text doc/man/cdist-explorers.text \ - doc/man/cdist-language.text doc/man/cdist-manifests.text \ - doc/man/cdist-quickstart.text doc/man/cdist-stages.text \ - doc/man/cdist-terms.text doc/man/cdist.text \ - doc/man/cdist-types.text +MANSRC=doc/man/cdist-config-layout.text \ + doc/man/cdist-config.text \ + doc/man/cdist-deploy-to.text \ + doc/man/cdist-explorer.text \ + doc/man/cdist-manifest.text \ + doc/man/cdist-quickstart.text \ + doc/man/cdist-stages.text \ + doc/man/cdist-terms.text \ + doc/man/cdist.text \ + doc/man/cdist-type.text # FIXME: some distro nerd, can you make this more beautiful? @@ -33,10 +40,11 @@ web: pub: git push --mirror -man: - echo $(MANSRC) - a2x -f manpage --no-xmllint doc/man/cdist-stages.text - echo man ./doc/man/cdist-stages.7 +man: doc/man/.marker + +doc/man/.marker: $(MANSRC) + for man in $(MANSRC); do $(A2X) $$man; done + touch $@ clean: rm -f doc/man/*.html doc/man/*.[1-9] diff --git a/doc/man/cdist-explorers.text b/doc/man/cdist-explorer.text similarity index 100% rename from doc/man/cdist-explorers.text rename to doc/man/cdist-explorer.text diff --git a/doc/man/cdist-manifests.text b/doc/man/cdist-manifest.text similarity index 100% rename from doc/man/cdist-manifests.text rename to doc/man/cdist-manifest.text diff --git a/doc/man/cdist-types.text b/doc/man/cdist-type.text similarity index 100% rename from doc/man/cdist-types.text rename to doc/man/cdist-type.text From 73ebe77022df006673b762c27a628c2ee44aa3df Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 11:51:59 +0100 Subject: [PATCH 0469/6109] begin to redefine installation process Signed-off-by: Nico Schottelius --- Makefile | 22 ++++++++++++++-------- REAL_README | 26 ++++++++++++++++---------- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 888f6561..b0157148 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,20 @@ MANSRC=doc/man/cdist-config-layout.text \ install: cp bin/* $(BINDIR) -sync: +man: doc/man/.marker + +doc/man/.marker: $(MANSRC) + for man in $(MANSRC); do $(A2X) $$man; done + touch $@ + +clean: + rm -f doc/man/*.html doc/man/*.[1-9] + +################################################################################ +# Developer targets +# + +test: # ubuntu .rsync lyni@tablett:cdist # redhat @@ -40,11 +53,4 @@ web: pub: git push --mirror -man: doc/man/.marker -doc/man/.marker: $(MANSRC) - for man in $(MANSRC); do $(A2X) $$man; done - touch $@ - -clean: - rm -f doc/man/*.html doc/man/*.[1-9] diff --git a/REAL_README b/REAL_README index 8ca21a9c..5b950519 100644 --- a/REAL_README +++ b/REAL_README @@ -67,21 +67,23 @@ but is not. Or: The reason why I began to write cdist. ## Installation -### Get cdist +Cdist stable always in master + + * Create a new unpriviliged user (probably "cdist") + * Become that user, execute the following code: + +git clone git://git.schottelius.org/cdist +cd cdist +export PATH=$PATH:$(pwd -P)/bin + +That's it. Operation on the server is run as "cdist" user. Operation on the client is run as "root" user. +## Update - git clone git://git.schottelius.org/cdist - -## How to install cdist - - make install - -## How to use cdist - - man cdist +git pull && make install ## Support @@ -94,3 +96,7 @@ 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). + +## Commercial Support + +To be done. From d963f931e7758132ec90b28caf985ae99ed6f626 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 19:37:15 +0100 Subject: [PATCH 0470/6109] finish install-man target Signed-off-by: Nico Schottelius --- Makefile | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index b0157148..5edca67a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ # General PREFIX=/usr -BINDIR=$(PREFIX}/bin +BINDIR=$(PREFIX)/bin +MANDIR=$(PREFIX)/share/man A2X=a2x -f manpage --no-xmllint # Developer only @@ -18,11 +19,11 @@ MANSRC=doc/man/cdist-config-layout.text \ doc/man/cdist.text \ doc/man/cdist-type.text +################################################################################ +# User targets +# -# FIXME: some distro nerd, can you make this more beautiful? -# I'm just a hacker, I don't really care... -install: - cp bin/* $(BINDIR) +all: man man: doc/man/.marker @@ -33,6 +34,19 @@ doc/man/.marker: $(MANSRC) clean: rm -f doc/man/*.html doc/man/*.[1-9] +################################################################################ +# Install targets +# + +# FIXME: some distro nerd, can you make this more beautiful? +# Like integrating install, ... +# I'm just a hacker, I don't really care... +install: + cp bin/* $(BINDIR) + +install-man: + for p in doc/man/*.[1-9]; do n=$${p##*.}; cp $$p $(MANDIR)/man$$n/; done + ################################################################################ # Developer targets # @@ -52,5 +66,3 @@ web: pub: git push --mirror - - From 48058925d64db639c715417a6c1cea4efe8d06ec Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 20:01:51 +0100 Subject: [PATCH 0471/6109] finished cdist.text, mark all other manpages to be checked Signed-off-by: Nico Schottelius --- Makefile | 2 +- doc/man/cdist.text | 34 +++++++------------ .../{ => to_check}/cdist-config-layout.text | 0 doc/man/{ => to_check}/cdist-config.text | 0 doc/man/{ => to_check}/cdist-deploy-to.text | 0 doc/man/{ => to_check}/cdist-explorer.text | 0 doc/man/{ => to_check}/cdist-manifest.text | 0 doc/man/{ => to_check}/cdist-quickstart.text | 0 doc/man/{ => to_check}/cdist-stages.text | 0 doc/man/{ => to_check}/cdist-terms.text | 0 .../{ => to_check}/cdist-type-manifest.text | 0 doc/man/{ => to_check}/cdist-type.text | 0 12 files changed, 13 insertions(+), 23 deletions(-) rename doc/man/{ => to_check}/cdist-config-layout.text (100%) rename doc/man/{ => to_check}/cdist-config.text (100%) rename doc/man/{ => to_check}/cdist-deploy-to.text (100%) rename doc/man/{ => to_check}/cdist-explorer.text (100%) rename doc/man/{ => to_check}/cdist-manifest.text (100%) rename doc/man/{ => to_check}/cdist-quickstart.text (100%) rename doc/man/{ => to_check}/cdist-stages.text (100%) rename doc/man/{ => to_check}/cdist-terms.text (100%) rename doc/man/{ => to_check}/cdist-type-manifest.text (100%) rename doc/man/{ => to_check}/cdist-type.text (100%) diff --git a/Makefile b/Makefile index 5edca67a..02c585a1 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ clean: # FIXME: some distro nerd, can you make this more beautiful? # Like integrating install, ... # I'm just a hacker, I don't really care... -install: +install: install-man cp bin/* $(BINDIR) install-man: diff --git a/doc/man/cdist.text b/doc/man/cdist.text index ac12c8f7..099e01b5 100644 --- a/doc/man/cdist.text +++ b/doc/man/cdist.text @@ -8,34 +8,23 @@ NAME cdist - Configuration management system -NEW DESCRIPTION ------------ -- is cm -- quickstart - cdist-quickstart -- configured in shell dsl - pointers to posix and problems (sh != bash), os specific -- how to apply - cdist-deploy-to -- how to write - cdist-manifest, cdist-type -- - - DESCRIPTION ----------- Cdist is a very simple, elegant, cleanly designed configuration management -system. Cdist allows you to centrally define configurations for UNIX systems -Cdist generally uses the push approach (a server pushes out the -configuration to the clients), but can also be used the pull way. - -Cdist-deploy-to is the main command to be used to configure a host. +system. The easiest way to get started with cdist is to run cdist-quickstart. +Cdist configurations are written in the shell scripting language. The mapping of configurations to hosts is defined in so called manifests, -which are written in shell script language. +logical units of functionality are called "types" in cdist jargon. +Cdist ships with some types included. You can use or change them, create new +ones or even submit your types for inclusion into cdist. -Logical units of functionality are called "types" in cdist jargon. Cdist ships -with some types, which you can change or create new ones or even submit your -types for inclusion into cdist. - -The fastest way to get a host configured using cdist is probably using -cdist-quickstart. +The main command is cdist-deploy-to, which runs several stages to push +configurations to a host. If you want to deeply understand cdist, reading +the source of cdist-deploy-to is recommended. +Cdist currently uses the push approach (a server pushes out the +configuration to the clients), but future version will also support the +pull mechanism (client requests configuration). SEE ALSO @@ -44,6 +33,7 @@ Website: http://www.nico.schottelius.org/cdist/[], cdist-push-pull(7), cdist-deploy-to(1), cdist-manifest(7), cdist-types(7), cdist-type-inclusion(7), cdist-quickstart(1) + COPYING ------- Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is diff --git a/doc/man/cdist-config-layout.text b/doc/man/to_check/cdist-config-layout.text similarity index 100% rename from doc/man/cdist-config-layout.text rename to doc/man/to_check/cdist-config-layout.text diff --git a/doc/man/cdist-config.text b/doc/man/to_check/cdist-config.text similarity index 100% rename from doc/man/cdist-config.text rename to doc/man/to_check/cdist-config.text diff --git a/doc/man/cdist-deploy-to.text b/doc/man/to_check/cdist-deploy-to.text similarity index 100% rename from doc/man/cdist-deploy-to.text rename to doc/man/to_check/cdist-deploy-to.text diff --git a/doc/man/cdist-explorer.text b/doc/man/to_check/cdist-explorer.text similarity index 100% rename from doc/man/cdist-explorer.text rename to doc/man/to_check/cdist-explorer.text diff --git a/doc/man/cdist-manifest.text b/doc/man/to_check/cdist-manifest.text similarity index 100% rename from doc/man/cdist-manifest.text rename to doc/man/to_check/cdist-manifest.text diff --git a/doc/man/cdist-quickstart.text b/doc/man/to_check/cdist-quickstart.text similarity index 100% rename from doc/man/cdist-quickstart.text rename to doc/man/to_check/cdist-quickstart.text diff --git a/doc/man/cdist-stages.text b/doc/man/to_check/cdist-stages.text similarity index 100% rename from doc/man/cdist-stages.text rename to doc/man/to_check/cdist-stages.text diff --git a/doc/man/cdist-terms.text b/doc/man/to_check/cdist-terms.text similarity index 100% rename from doc/man/cdist-terms.text rename to doc/man/to_check/cdist-terms.text diff --git a/doc/man/cdist-type-manifest.text b/doc/man/to_check/cdist-type-manifest.text similarity index 100% rename from doc/man/cdist-type-manifest.text rename to doc/man/to_check/cdist-type-manifest.text diff --git a/doc/man/cdist-type.text b/doc/man/to_check/cdist-type.text similarity index 100% rename from doc/man/cdist-type.text rename to doc/man/to_check/cdist-type.text From c5eadb8e5b7c19da96d7e9c5078ad666ce6ff35f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 20:09:34 +0100 Subject: [PATCH 0472/6109] sort manpage references Signed-off-by: Nico Schottelius --- doc/man/cdist.text | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/man/cdist.text b/doc/man/cdist.text index 099e01b5..b6fd808b 100644 --- a/doc/man/cdist.text +++ b/doc/man/cdist.text @@ -29,9 +29,12 @@ pull mechanism (client requests configuration). SEE ALSO -------- -Website: http://www.nico.schottelius.org/cdist/[], cdist-push-pull(7), -cdist-deploy-to(1), cdist-manifest(7), cdist-types(7), cdist-type-inclusion(7), -cdist-quickstart(1) +Website: http://www.nico.schottelius.org/cdist/[], +cdist-deploy-to(1), +cdist-manifest(7), +cdist-quickstart(1), +cdist-type(7), +cdist-type-inclusion(7) COPYING From a07aafdc8806f77e3b5b0291ee286d25297386e6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 20:41:33 +0100 Subject: [PATCH 0473/6109] finish cdist-manifest.text Signed-off-by: Nico Schottelius --- Makefile | 8 ++-- doc/man/cdist-deploy-to.text | 42 ++++++++++++++++++++ doc/man/cdist-manifest.text | 56 +++++++++++++++++++++++++++ doc/man/to_check/cdist-deploy-to.text | 37 ------------------ doc/man/to_check/cdist-manifest.text | 51 ------------------------ 5 files changed, 103 insertions(+), 91 deletions(-) create mode 100644 doc/man/cdist-deploy-to.text create mode 100644 doc/man/cdist-manifest.text delete mode 100644 doc/man/to_check/cdist-deploy-to.text delete mode 100644 doc/man/to_check/cdist-manifest.text diff --git a/Makefile b/Makefile index 02c585a1..476bc89a 100644 --- a/Makefile +++ b/Makefile @@ -10,15 +10,17 @@ WEBPAGE=software/cdist.mdwn MANSRC=doc/man/cdist-config-layout.text \ doc/man/cdist-config.text \ - doc/man/cdist-deploy-to.text \ doc/man/cdist-explorer.text \ - doc/man/cdist-manifest.text \ doc/man/cdist-quickstart.text \ doc/man/cdist-stages.text \ doc/man/cdist-terms.text \ - doc/man/cdist.text \ doc/man/cdist-type.text +MANSRC=doc/man/cdist.text \ + doc/man/cdist-deploy-to.text \ + doc/man/cdist-manifest.text \ + + ################################################################################ # User targets # diff --git a/doc/man/cdist-deploy-to.text b/doc/man/cdist-deploy-to.text new file mode 100644 index 00000000..e09cba0a --- /dev/null +++ b/doc/man/cdist-deploy-to.text @@ -0,0 +1,42 @@ +cdist-deploy-to(1) +================== +Nico Schottelius + + +NAME +---- +cdist-deploy-to - Deploy configuration to host + + +SYNOPSIS +-------- +cdist-deploy-to HOSTNAME + + +DESCRIPTION +----------- +Deploy configurations to the specified host, as configured in the initial +manifest. This script triggers the execution of several other scripts, in so +called stages. It is intented to run either from the command line or from cron. + + +ENVIRONMENT +----------- +If the environment variable **__cdist_conf_dir** is not set, the +configuration is read from /etc/cdist. The local output directory can +be changed by the variable **__cdist_local_base_dir**. All environment +variables are handled by cdist-config. + + +SEE ALSO +-------- +cdist(7), +cdist-config(1), +cdist-config-layout(7), +cdist-stages(7) + + +COPYING +------- +Copyright \(C) 2010-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/doc/man/cdist-manifest.text b/doc/man/cdist-manifest.text new file mode 100644 index 00000000..39551cec --- /dev/null +++ b/doc/man/cdist-manifest.text @@ -0,0 +1,56 @@ +cdist-manifest(7) +================= +Nico Schottelius + + +NAME +---- +cdist-manifest - Define types to be used + + +DESCRIPTION +----------- +Manifests exist to define which configurations should be applied to a specific +host as well as to define which configurations should be applied within a +type. Manifests are executed locally and the resulting objects are stored in +an internal database. + +In general, manifests are used to define which types are used depending +on given conditions + +EXAMPLE +------- +The initial manifest may for instance contain the following code: + +-------------------------------------------------------------------------------- +# Always create this file, so other sysadmins know cdist is used. +__file /etc/cdist-configured --type file + +case "$__target_host" in + my.server.name) + __file /root/bin/ --type directory + __file /etc/issue.net --type file --source "$__manifest/issue.net + ;; +esac +-------------------------------------------------------------------------------- + +The manifest of the type "nologin" may look like this: + + +-------------------------------------------------------------------------------- +__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) + + +COPYING +------- +Copyright \(C) 2010-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/doc/man/to_check/cdist-deploy-to.text b/doc/man/to_check/cdist-deploy-to.text deleted file mode 100644 index fdb3dd93..00000000 --- a/doc/man/to_check/cdist-deploy-to.text +++ /dev/null @@ -1,37 +0,0 @@ -cdist-deploy-to(1) -================== -Nico Schottelius - - -NAME ----- -cdist-deploy-to - Deploy configuration to host - -SYNOPSIS --------- -cdist-deploy-to HOSTNAME - - -DESCRIPTION ------------ -Cdist-deploy-to deploys the configuration to the specified host. -It triggers the execution of several other scripts, which are -explained (or referenced) in cdist-stages(7). -It is intented to run either from the command line or from cron. - - -REQUIREMENTS ------------- -Cdist-deploy-to requires an enabled ssh-server and a posix shell on the target -host and a ssh-client and posix shell on the server. - - -SEE ALSO --------- -cdist(7), cdist-stages(7) - - -COPYING -------- -Copyright \(C) 2010-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/doc/man/to_check/cdist-manifest.text b/doc/man/to_check/cdist-manifest.text deleted file mode 100644 index 852de7ec..00000000 --- a/doc/man/to_check/cdist-manifest.text +++ /dev/null @@ -1,51 +0,0 @@ -cdist-manifests(7) -================== -Nico Schottelius - - -NAME ----- -cdist-manifests - Map configuration to hosts - - -DESCRIPTION ------------ -Using the available types and shell language, you can create mappings of what -should be configured on a host. - -ENTRYPOINT: $prefix/manifests/init - -unsorted: cache / objects - - - If cdist encounters type in manifest, - a wrapper script is run, that creates a - new entry in the cconfig database and adds - attribute values. This defines a cconfig - tree, that may look as follows: - - - ///: - - myhost/__file/cdist_bin/source - myhost/__file/cdist_bin/destination - ... - --------------------------------------------------------------------------------- - - -ENVIRONMENT ------------ -The following variables are available in manifests: - -- __{explorer|fact}_{name} -- __core_hostname: Hostname that we are deploying to -- __core_localhostname: Hostname that we are deploying from - -EXAPMLES --------- - - -COPYING -------- -Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). From dcaf0f619b9f052611b270d65a1a7b044e3ccc78 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 20:43:30 +0100 Subject: [PATCH 0474/6109] move marker file to be /etc/cdist-configured Signed-off-by: Nico Schottelius --- conf/manifest/init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/manifest/init b/conf/manifest/init index 16e27adf..6b32edb5 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -6,7 +6,7 @@ echo "Running initial manifest for $__target_host" echo "We could access other manifests in $__manifest" -__file /etc/configured-via-cdist --type file +__file /etc/cdist-configured --type file case "$__target_host" in localhost) From 31eb98f3cf566856af9b8efbb4991be64003fa50 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 20:43:44 +0100 Subject: [PATCH 0475/6109] todo update Signed-off-by: Nico Schottelius --- TODO-1.0 | 12 ++++++++---- doc/dev/todo/niconext | 3 +++ doc/dev/todo/post-1.0 | 1 + 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/TODO-1.0 b/TODO-1.0 index 19b32ec7..a8874914 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -43,10 +43,13 @@ x generate code to be executed on clients (stage 4) x execute code on client (stage 5) - Last doc stuff for 1.0.0: - - remove old documentation from doc/man/! + x remove old documentation from doc/man/! + - Check all references in manpages, ensure all manpages exist + - cdist + - cdist-deploy-to + - cdist-manifest + - cdist-quickstart: how to get started - ensure every file in bin/ has a correspondent manpage - - cdist-quickstart [WRITE] - - how to write a minimal host manifest - cdist-type [IMPORTANT] - only do necessary work [TYPE IMPLEMENTATION HINTS] - install packages only if not existent @@ -62,7 +65,8 @@ x execute code on client (stage 5) - DOC: exported variables: __type, __explorer, __type_explorer, __object, __object_id - Cleanup READMEs - - Check all references in manpages, ensure all manpages exist + - Ensure manpages are formatted correctly + - Ensure html output of manpages are published on the web - Makefile: - Add install target diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index e39803b1..d92277c8 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1 +1,4 @@ Prepare documentation for 1.0.0. + - Check all references in manpages + - cdist.text, cdist-quickstart + - write cdist-quickstart diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index 484a527d..c60e9ecd 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -38,3 +38,4 @@ 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 From 998be2025bafb04a466ab7dda389b44a22ef92e5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Feb 2011 20:57:04 +0100 Subject: [PATCH 0476/6109] begin to create cdist-quickstart Signed-off-by: Nico Schottelius --- bin/cdist-quickstart | 33 +++++++++++++++++++++++++++++---- doc/man/cdist-manifest.text | 3 +-- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/bin/cdist-quickstart b/bin/cdist-quickstart index 08868582..9fc65641 100755 --- a/bin/cdist-quickstart +++ b/bin/cdist-quickstart @@ -24,17 +24,42 @@ . cdist-config set -eu +banner="cdist-quickstart>" +continue="Press enter to continue or ctrl-c to abort." + __prompt() { - echo "Press enter to continue or ctrl-c to abort" - echo "[Enter]" + echo -n "$banner" "$@" read answer } cat << eof +$banner cdist version $__cdist_version -Welcome to cdist-quickstart, the interactive guide to cdist! +Welcome to the interactive guide to cdist! +This is the interactive tutorial and beginners help for cdist. -After you press enter, I'll create the basic directories for you. eof +__prompt "$continue" + +cat << eof + +To make any use of cdist, we need to create the configuration base, which +can normally be found below ${__cdist_conf_dir}: + +${__cdist_explorer_dir}: Contains explorer, which explore the target +${__cdist_manifest_dir}: Contains manifests which define types being used +${__cdist_manifest_init}: The first manifest executed (i.e. cdist entry point) +${__cdist_type_dir}: Contains types + +eof +__prompt "$continue" + +set -x +mkdir ${__cdist_conf_dir} +mkdir ${__cdist_explorer_dir} +mkdir ${__cdist_manifest_dir} +touch ${__cdist_manifest_init} +mkdir ${__cdist_type_dir} +set +x diff --git a/doc/man/cdist-manifest.text b/doc/man/cdist-manifest.text index 39551cec..40ab2c4e 100644 --- a/doc/man/cdist-manifest.text +++ b/doc/man/cdist-manifest.text @@ -36,7 +36,6 @@ esac The manifest of the type "nologin" may look like this: - -------------------------------------------------------------------------------- __file /etc/nologin --type file --source "$__type/files/default.nologin" -------------------------------------------------------------------------------- @@ -46,7 +45,7 @@ SEE ALSO -------- cdist-manifest-run(1), cdist-manifest-run-all(1), -cdist-manifest-run-init(1) +cdist-manifest-run-init(1), cdist-type(7) From 097e2cb303139d281e6ae4b3f8e6c61871460136 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 27 Feb 2011 14:27:23 +0100 Subject: [PATCH 0477/6109] continue on cdist-quickstart Signed-off-by: Nico Schottelius --- bin/cdist-quickstart | 91 +++++++++++++++++++++++++++++++++++++------ doc/dev/todo/niconext | 1 + 2 files changed, 81 insertions(+), 11 deletions(-) diff --git a/bin/cdist-quickstart b/bin/cdist-quickstart index 9fc65641..08122a39 100755 --- a/bin/cdist-quickstart +++ b/bin/cdist-quickstart @@ -26,6 +26,7 @@ set -eu banner="cdist-quickstart>" continue="Press enter to continue or ctrl-c to abort." +create_continue="Press enter to create the described files/directories" __prompt() { @@ -33,33 +34,101 @@ __prompt() read answer } +################################################################################ +# Intro +# cat << eof $banner cdist version $__cdist_version Welcome to the interactive guide to cdist! This is the interactive tutorial and beginners help for cdist. +If you would like to run this tutorial completly without root priveliges, +setup the variables __cdist_conf_dir to point to a writable locaction +(i.e. $HOME/cdist-config). eof __prompt "$continue" +################################################################################ +# /etc/cdist via root +# cat << eof - To make any use of cdist, we need to create the configuration base, which -can normally be found below ${__cdist_conf_dir}: +can normally be found below ${__cdist_conf_dir}. As cdist does not need +any root priveliges normally, it is recommended that you create this +directory as root and change the owner to a dedicated user (for instance +cdist). -${__cdist_explorer_dir}: Contains explorer, which explore the target -${__cdist_manifest_dir}: Contains manifests which define types being used -${__cdist_manifest_init}: The first manifest executed (i.e. cdist entry point) -${__cdist_type_dir}: Contains types +MANUAL STEP: + + - Become root: su - + - Create ${__cdist_conf_dir}: mkdir ${__cdist_conf_dir} + - Change owner to $USER: chown $USER ${__cdist_conf_dir} eof __prompt "$continue" +################################################################################ +# Basic directories +# +cat << eof +Now we need to create some basic directories: + + - ${__cdist_explorer_dir}: Contains explorer, which explore the target + - ${__cdist_manifest_dir}: Contains manifests which define types being used + - ${__cdist_type_dir}: Contains types + +eof +__prompt "$create_continue" + set -x -mkdir ${__cdist_conf_dir} -mkdir ${__cdist_explorer_dir} -mkdir ${__cdist_manifest_dir} -touch ${__cdist_manifest_init} -mkdir ${__cdist_type_dir} +mkdir -p ${__cdist_explorer_dir} +mkdir -p ${__cdist_manifest_dir} +mkdir -p ${__cdist_type_dir} set +x + +################################################################################ +# create manifest/init +# +cat << eof +At the beginning of a configuration deployment the first file cdist reads is +${__cdist_manifest_init}, which defines the types to be created on +a specific host. + +We'll create the initial manifest and add some example types to it. + +eof +__prompt "$create_continue" + +set -x +cat << eof > "${__cdist_manifest_init}" +# Always create a marker +__file /etc/cdist-configured --type file + +case "\$__target_host" in + $(hostname)*) + __file /tmp/cdist-quickstart --type file + ;; +esac + +eof +set +x + +################################################################################ +# show generated manifest/niit +# +cat << eof +Let's have a look how the initial manifest looks like currently: +-------------------------------------------------------------------------------- +eof +cat "${__cdist_manifest_init}" +cat << eof +-------------------------------------------------------------------------------- +eof + +__prompt "$continue" + +################################################################################ +# add type file +# diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index d92277c8..ccfaf288 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -2,3 +2,4 @@ Prepare documentation for 1.0.0. - Check all references in manpages - cdist.text, cdist-quickstart - write cdist-quickstart + - redefine installation + configuration base? From 5b1dc4416a5ee40f0ebe05837c83e33e89c63c23 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 27 Feb 2011 16:39:43 +0100 Subject: [PATCH 0478/6109] +cron == todo Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.0 | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index c60e9ecd..379fa214 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -28,6 +28,7 @@ Types to be written/extended: - regexp replace (can probably cover all?) - __file: - template == [shell script] stdout + - cron Documentation: - Describe Multi master setups From b66479d23b2783e83d48d4bcff27c65b8fb8858c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Mar 2011 18:34:44 +0100 Subject: [PATCH 0479/6109] +logfile Signed-off-by: Nico Schottelius --- doc/dev/logs/2011-02-27 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/dev/logs/2011-02-27 diff --git a/doc/dev/logs/2011-02-27 b/doc/dev/logs/2011-02-27 new file mode 100644 index 00000000..52dbb11e --- /dev/null +++ b/doc/dev/logs/2011-02-27 @@ -0,0 +1,15 @@ +Cdist installation / configuring / types +-------------------------------------------------------------------------------- + +problems: + - types are not in /etc/cdist/type by default + - types should be updatable + - cdist should be easily updateable + - make configuration version control able easily + +solution: + - require a special user ("cdist") + - always git clone from specific branch + - better version-1.0 or 1.0 or similar + - conf/manifests mv example? + - upstream types get updated From 5594669b861aadebda41d1047175ebcd3cddfb4b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Mar 2011 18:37:15 +0100 Subject: [PATCH 0480/6109] add template for __package_apt Signed-off-by: Nico Schottelius --- conf/type/__package_apt/gencode | 23 ++++++++++++++++++++++ conf/type/__package_apt/parameter/optional | 2 ++ conf/type/__package_apt/parameter/required | 1 + 3 files changed, 26 insertions(+) create mode 100755 conf/type/__package_apt/gencode create mode 100644 conf/type/__package_apt/parameter/optional create mode 100644 conf/type/__package_apt/parameter/required diff --git a/conf/type/__package_apt/gencode b/conf/type/__package_apt/gencode new file mode 100755 index 00000000..24cb5686 --- /dev/null +++ b/conf/type/__package_apt/gencode @@ -0,0 +1,23 @@ +#!/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 . +# +# +# Manage packages on Debian and co. +# + diff --git a/conf/type/__package_apt/parameter/optional b/conf/type/__package_apt/parameter/optional new file mode 100644 index 00000000..a52167d3 --- /dev/null +++ b/conf/type/__package_apt/parameter/optional @@ -0,0 +1,2 @@ +name +version diff --git a/conf/type/__package_apt/parameter/required b/conf/type/__package_apt/parameter/required new file mode 100644 index 00000000..ff72b5c7 --- /dev/null +++ b/conf/type/__package_apt/parameter/required @@ -0,0 +1 @@ +state From 173c6b0d4e48223518d68b7f51ef469b4217d48d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Mar 2011 18:40:13 +0100 Subject: [PATCH 0481/6109] use __package_apt on ikq* Signed-off-by: Nico Schottelius --- conf/manifest/init | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conf/manifest/init b/conf/manifest/init index 6b32edb5..dde07bf3 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -14,6 +14,10 @@ case "$__target_host" in __file test --type file --destination /tmp/cdist-testfile ;; + ikq*) + __package_apt zsh --state installed + ;; + icarus) __package tree --ensure installed ;; From 7c34ccde99806531091af945cf1b5f8034130eda Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Mar 2011 18:54:31 +0100 Subject: [PATCH 0482/6109] update gencode to contain something useful Signed-off-by: Nico Schottelius --- conf/type/__package_apt/gencode | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/conf/type/__package_apt/gencode b/conf/type/__package_apt/gencode index 24cb5686..63ce3daa 100755 --- a/conf/type/__package_apt/gencode +++ b/conf/type/__package_apt/gencode @@ -21,3 +21,20 @@ # Manage packages on Debian and co. # +if [ -f "$__object/parameter/name" ]; then + name="$__object/parameter/name" +else + name="$__object_id" +fi + +state=$(cat "$__object/parameter/state") + +case "$state" in + installed) + echo apt-get --quiet --yes install \"$name\" + ;; + deinstalled) + echo apt-get --quiet --yes remove \"$name\" + ;; +esac + From b5e7ee07727646220b31ec906b83dacbd74e6348 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Mar 2011 18:58:16 +0100 Subject: [PATCH 0483/6109] __cdist_local_base_dir depending on hostname in HACKERS_README Signed-off-by: Nico Schottelius --- HACKERS_README | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index 6ba3fbf9..04a09d53 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -33,11 +33,12 @@ set -x export PATH="$PATH:$(pwd -P)/bin" export __cdist_conf_dir="$(pwd -P)/conf" -export __cdist_local_base_dir=/tmp/localhost - -# Allow user to suply hostname +# Allow user to supply hostname target="${1:-localhost}" +# And use hostname as basedir (dangerous, but hackers know what they do) +export __cdist_local_base_dir="/tmp/$target" + # Run the real script cdist-deploy-to "$target" From c90ae945a8d583d1693e87640762d40a4e1dfdd5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Mar 2011 19:14:32 +0100 Subject: [PATCH 0484/6109] add explorer for apt to find out pkg_status Signed-off-by: Nico Schottelius --- conf/type/__package_apt/explorer/pkg_status | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 conf/type/__package_apt/explorer/pkg_status diff --git a/conf/type/__package_apt/explorer/pkg_status b/conf/type/__package_apt/explorer/pkg_status new file mode 100755 index 00000000..e13f8f5c --- /dev/null +++ b/conf/type/__package_apt/explorer/pkg_status @@ -0,0 +1,30 @@ +#!/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 . +# +# +# Retrieve the status of a package - parsed dpkg output +# + +if [ -f "$__object/parameter/name" ]; then + name="$(cat "$__object/parameter/name")" +else + name="$__object_id" +fi + +dpkg -l "$name" 2>/dev/null | awk '{ print $1 }' From 3a104751510a84b91f6f4edca72842bf5dc5dc43 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Mar 2011 19:21:15 +0100 Subject: [PATCH 0485/6109] only install/deinstall apt packages if necessary Signed-off-by: Nico Schottelius --- conf/type/__package_apt/gencode | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/conf/type/__package_apt/gencode b/conf/type/__package_apt/gencode index 63ce3daa..8523e01e 100755 --- a/conf/type/__package_apt/gencode +++ b/conf/type/__package_apt/gencode @@ -27,14 +27,18 @@ else name="$__object_id" fi -state=$(cat "$__object/parameter/state") +state="$(cat "$__object/parameter/state")" case "$state" in installed) - echo apt-get --quiet --yes install \"$name\" + pkg_status="$(cat "$__object/explorer/pkg_status")" + if [ "$pkg_status" != "ii" ]; then + echo apt-get --quiet --yes install \"$name\" + fi ;; deinstalled) - echo apt-get --quiet --yes remove \"$name\" + if [ "$pkg_status" != "un" ]; then + echo apt-get --quiet --yes remove \"$name\" + fi ;; esac - From ddbcaf5152dd92c789d33879e8a2da2ad1d0e7be Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Mar 2011 21:15:03 +0100 Subject: [PATCH 0486/6109] add template for __package_pacman Signed-off-by: Nico Schottelius --- .../type/__package_pacman/explorer/pkg_status | 30 +++++++++++++ conf/type/__package_pacman/gencode | 44 +++++++++++++++++++ conf/type/__package_pacman/parameter/optional | 2 + conf/type/__package_pacman/parameter/required | 1 + 4 files changed, 77 insertions(+) create mode 100755 conf/type/__package_pacman/explorer/pkg_status create mode 100755 conf/type/__package_pacman/gencode create mode 100644 conf/type/__package_pacman/parameter/optional create mode 100644 conf/type/__package_pacman/parameter/required diff --git a/conf/type/__package_pacman/explorer/pkg_status b/conf/type/__package_pacman/explorer/pkg_status new file mode 100755 index 00000000..e13f8f5c --- /dev/null +++ b/conf/type/__package_pacman/explorer/pkg_status @@ -0,0 +1,30 @@ +#!/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 . +# +# +# Retrieve the status of a package - parsed dpkg output +# + +if [ -f "$__object/parameter/name" ]; then + name="$(cat "$__object/parameter/name")" +else + name="$__object_id" +fi + +dpkg -l "$name" 2>/dev/null | awk '{ print $1 }' diff --git a/conf/type/__package_pacman/gencode b/conf/type/__package_pacman/gencode new file mode 100755 index 00000000..8523e01e --- /dev/null +++ b/conf/type/__package_pacman/gencode @@ -0,0 +1,44 @@ +#!/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 . +# +# +# Manage packages on Debian and co. +# + +if [ -f "$__object/parameter/name" ]; then + name="$__object/parameter/name" +else + name="$__object_id" +fi + +state="$(cat "$__object/parameter/state")" + +case "$state" in + installed) + pkg_status="$(cat "$__object/explorer/pkg_status")" + if [ "$pkg_status" != "ii" ]; then + echo apt-get --quiet --yes install \"$name\" + fi + ;; + deinstalled) + if [ "$pkg_status" != "un" ]; then + echo apt-get --quiet --yes remove \"$name\" + fi + ;; +esac diff --git a/conf/type/__package_pacman/parameter/optional b/conf/type/__package_pacman/parameter/optional new file mode 100644 index 00000000..a52167d3 --- /dev/null +++ b/conf/type/__package_pacman/parameter/optional @@ -0,0 +1,2 @@ +name +version diff --git a/conf/type/__package_pacman/parameter/required b/conf/type/__package_pacman/parameter/required new file mode 100644 index 00000000..ff72b5c7 --- /dev/null +++ b/conf/type/__package_pacman/parameter/required @@ -0,0 +1 @@ +state From 34fa8260f59574569047a91b7c93e50567e91806 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Mar 2011 21:23:43 +0100 Subject: [PATCH 0487/6109] finish __package_pacman Signed-off-by: Nico Schottelius --- .../explorer/{pkg_status => pkg_version} | 2 +- conf/type/__package_pacman/gencode | 16 ++++++++++------ conf/type/__package_pacman/parameter/optional | 1 - 3 files changed, 11 insertions(+), 8 deletions(-) rename conf/type/__package_pacman/explorer/{pkg_status => pkg_version} (94%) diff --git a/conf/type/__package_pacman/explorer/pkg_status b/conf/type/__package_pacman/explorer/pkg_version similarity index 94% rename from conf/type/__package_pacman/explorer/pkg_status rename to conf/type/__package_pacman/explorer/pkg_version index e13f8f5c..4f612423 100755 --- a/conf/type/__package_pacman/explorer/pkg_status +++ b/conf/type/__package_pacman/explorer/pkg_version @@ -27,4 +27,4 @@ else name="$__object_id" fi -dpkg -l "$name" 2>/dev/null | awk '{ print $1 }' +pacman -Q "$name" 2>/dev/null | awk '{ print $2 }' diff --git a/conf/type/__package_pacman/gencode b/conf/type/__package_pacman/gencode index 8523e01e..078ee067 100755 --- a/conf/type/__package_pacman/gencode +++ b/conf/type/__package_pacman/gencode @@ -18,9 +18,11 @@ # along with cdist. If not, see . # # -# Manage packages on Debian and co. +# Manage packages with Pacman (mostly archlinux) # +pacopts="--noconfirm --noprogressbar" + if [ -f "$__object/parameter/name" ]; then name="$__object/parameter/name" else @@ -31,14 +33,16 @@ state="$(cat "$__object/parameter/state")" case "$state" in installed) - pkg_status="$(cat "$__object/explorer/pkg_status")" - if [ "$pkg_status" != "ii" ]; then - echo apt-get --quiet --yes install \"$name\" + pkg_version="$(cat "$__object/explorer/pkg_version")" + + # Empty? Not installed. + if [ -z "$pkg_version" ]; then + echo pacman "$pacopts" -S \"$name\" fi ;; deinstalled) - if [ "$pkg_status" != "un" ]; then - echo apt-get --quiet --yes remove \"$name\" + if [ "$pkg_version" ]; then + echo pacman "$pacopts" -R \"$name\" fi ;; esac diff --git a/conf/type/__package_pacman/parameter/optional b/conf/type/__package_pacman/parameter/optional index a52167d3..f121bdbf 100644 --- a/conf/type/__package_pacman/parameter/optional +++ b/conf/type/__package_pacman/parameter/optional @@ -1,2 +1 @@ name -version From 508ecacb85b528c38ba210de961cfd1c529939aa Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Mar 2011 23:17:37 +0100 Subject: [PATCH 0488/6109] +logs: 20101201 Signed-off-by: Nico Schottelius --- doc/dev/logs/20101201/SCAN0000.PDF | Bin 0 -> 200415 bytes doc/dev/logs/20101201/SCAN0001.PDF | Bin 0 -> 208607 bytes doc/dev/logs/20101201/SCAN0002.PDF | Bin 0 -> 177887 bytes doc/dev/logs/20101201/SCAN0003.PDF | Bin 0 -> 165343 bytes doc/dev/logs/20101201/SCAN0004.PDF | Bin 0 -> 171743 bytes 5 files changed, 0 insertions(+), 0 deletions(-) create mode 100755 doc/dev/logs/20101201/SCAN0000.PDF create mode 100755 doc/dev/logs/20101201/SCAN0001.PDF create mode 100755 doc/dev/logs/20101201/SCAN0002.PDF create mode 100755 doc/dev/logs/20101201/SCAN0003.PDF create mode 100755 doc/dev/logs/20101201/SCAN0004.PDF diff --git a/doc/dev/logs/20101201/SCAN0000.PDF b/doc/dev/logs/20101201/SCAN0000.PDF new file mode 100755 index 0000000000000000000000000000000000000000..f5c83f68d5b897b90c4edb7dce2790ce178269da GIT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TJ&>qURFcTtVj$okLUxP#HjFptlUX`5hzjpMdbi zOjbmIZx{}IWB7&OjPXP~^l3;mnMs=2z15^^>sMbHI0l3-VFlq$!4?|M!UETI_-r?v z5#B8VM|Hz3#~D*dGYr8FM7*h?$qX`{G=qXSnPG(Y55pPQ6Y*a&aPy#%KRh!uB6Mal zrTeTiyS9L{x~*OoVBqSzBmf8gj|d27;Yr|+G@Jn~fXRrA@DE_(DQ`D81uPEsoy}O~ z4V~VYVmt#}1le!~aUssYh7ryJhcdmP+o9nXLYLol+t9(#$-${yBN+bl0G79b>({mh z_F>?hvklw=R1^vV4~^mO%5k1YFJAX?%YRt0DpdaYQ_ch$FuH z!Ot`{HZsNs;ybq)5={*a!Fiw`eE9oqreLUE+ek)WMtW|8zLUVj_1p#|&6M=fcqSC% zkGGi`0U_yiEal^Ero@>&&dZAM4PF`$0X*v$Fj#nKmb%2* WH-gnU3E)1B3{7!bT2vQX-2VYxdbOhf literal 0 HcmV?d00001 diff --git a/doc/dev/logs/20101201/SCAN0002.PDF b/doc/dev/logs/20101201/SCAN0002.PDF new file mode 100755 index 0000000000000000000000000000000000000000..b3571cbee494fa4288861bd816d97e1312790263 GIT binary patch literal 177887 zcmeFa2Urx@wl-W%1_4261SE=NQKFJ1NY1gb36h~fK%xZ65^RwSDgq)jIV(9R29ipS zA|OeSq#{8D#cwx?Iy26hnRCuPXYPN0pQoN`sybBdTI*f!de_=pcI}gjd;&*=N!TYp zZmbHk@UysBI*>?89@Y0bYje~{%hJKd%7f&no~NY;_JE3$g`Ew_Q3T4`!=6P@_?R%s zQDqyHoxKN(kg)JElB04c4|i=FH+dJQvo6jy&K@kHBuC|4&bYYgowcyCIeOB@3uR@a zt0YHqR1tN?!^X|{=t+6~lQvc^);6Xj;57DywuPIMyRoFCv@|%RZsTkReo6#fm@bL5 zG>N;1n~jAN$>-tE6A*=}qKYB}1OE=g4nxrAXOKLEM?gSMKte%IM!t`df{K=lo|cA& zR)CG2kxN`iN>WTn^tg<&i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ff --git a/doc/dev/logs/20101201/SCAN0003.PDF b/doc/dev/logs/20101201/SCAN0003.PDF new file mode 100755 index 0000000000000000000000000000000000000000..fd7de16433c167c8acbb4beb93c2131379409dd2 GIT binary patch literal 165343 zcmeEu2Uru`x^6-!f`|f%(m|0fJt!bm3{_evQJNGf0qGs3iC7{} z+QyAd6b?U0A$SJu=Bj1sqTp!nAO8DN1ESt{z=J#m0zL*Jq6R~#!C&e?tRN7WgmATBFzD+amJBjyXd`0wW&mV?R^$9ER*z zI4)}La*dqg@DVzC1`bXxZXRB^*vV7k5|RpM5sFI6DyllVditpI7Yr;eSz1}!plw~< z+&w(KynTYM2j94P>o(?IWK?uaY+O7xH7z|OGb=kM_wf^4aY<=edBuy`y84F3m#>;S zyYSsTy?t-`KMaqIj*U-DPE9W^Ew8Mut$*6sB#a9Tg6s|J`^bJXE^1(0M8w1pVlu+G zz(k(F2B9VUwHq`B|Fph(_-_Z#|BXY{v>`W7X@}GL}FD6va&f)wytu@*Zdv z4w~j;7}3S_T`KWQ=u!0wqo*Qz^#ydbXF4ibPI8ksxVo($${Ye-%^8WeYVAsJf0$rE zR1eigf)P-y{|y_l+~ujR4PBfro42o|KQ9Q2;gh*CIk&SMvPq>5f%A~pTkzvcS*J%p z{@!0eFR&$~CRQ#xwSjVXH2oQvAm!CZup#uBvqj;4>NZL=FNAW*Ix|x!S8&?RmTh_Z zH&y>QRuN|ao?+p(jb7=Y&-!06PycOesiLMLw;utG0wFsPAgJ~qY`PA^!ZBe# zc;#8}v&2!_2)2LNkIy)(8NI9YxI9M}mcN84YmD!sl57y`5hFitRv|WPm(iPgjQfq# zNujxRooxwQHk>~5#c{DtO;DL}dV;l-XTcO6S51DR0|A?W!p1k}mhuOjR3aEDCzw#_ zdW@CaA0sbi)BDc&=!|+2C6**p+MEoiEt2YaoT3pxk%hKflan)-mxA=;c&+)W>n+%k z3D3#<{VZwEYQyH!H$!Gj!2Pj<#|*g)(F&+E`2XTaImU;i%4{R;-co9Om< z)&-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JY3%$#f`bn3*1RRtOEQ(_{)9SkF|?+{{dG=0X~g2p0x-AZ!7A zmg+wv2>$9eV=jD?G}w&Db8z&7*_X&&jZpNX!qI9d4soH)44sUYjQ^LR`@s7(yBT3K z<}H|m)^QG84Qm;je?mmatl5fYdL%PNGwy$S!z?V!E%avVVegTKlgx*~QPF>TLEQJq zBv@5}_l6FGb>)2zJtx7!@xBL=W@XXxcxF~D-ZQfr-r~C?Ga>Jhta#2F7BYi2Z&nDp xwNzT Date: Wed, 2 Mar 2011 23:34:19 +0100 Subject: [PATCH 0489/6109] ensure no conf/conf is created (ln -s src dst/conf createst dst/conf/src if conf exists as a dir) Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index b376912a..68c86be9 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -42,6 +42,9 @@ echo "cdist $__cdist_version: Configuring $__cdist_target_host" # Init base mkdir -p "$__cdist_local_base_dir" +# Ensure there is no old link, otherwise the new link is created below the old +rm -f "$__cdist_local_base_dir/$__cdist_name_conf_dir" + # Link configuration source directory - consistent with remote ln -sf "$__cdist_conf_dir" "$__cdist_local_base_dir/$__cdist_name_conf_dir" From 643c618a9f578a035ef8b5b56ded7d15bbb295a1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Mar 2011 23:34:34 +0100 Subject: [PATCH 0490/6109] add archlinux test Signed-off-by: Nico Schottelius --- conf/manifest/init | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/conf/manifest/init b/conf/manifest/init index dde07bf3..be9d10c5 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -14,6 +14,13 @@ case "$__target_host" in __file test --type file --destination /tmp/cdist-testfile ;; + # Alias in /etc/hosts for localhost + cdist-archlinux) + __package_pacman django --state deinstalled + __package_pacman wireshark-cli --state installed + __package_pacman zsh --state installed + ;; + ikq*) __package_apt zsh --state installed ;; From ae4ff8b4974f6e08f84492c1102b9ce9ea4d5e98 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 2 Mar 2011 23:58:44 +0100 Subject: [PATCH 0491/6109] -debug + fix Signed-off-by: Nico Schottelius --- conf/type/__package_pacman/gencode | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/conf/type/__package_pacman/gencode b/conf/type/__package_pacman/gencode index 078ee067..9702aa8e 100755 --- a/conf/type/__package_pacman/gencode +++ b/conf/type/__package_pacman/gencode @@ -21,6 +21,10 @@ # Manage packages with Pacman (mostly archlinux) # +# Debug +# exec >&2 +# set -x + pacopts="--noconfirm --noprogressbar" if [ -f "$__object/parameter/name" ]; then @@ -30,10 +34,10 @@ else fi state="$(cat "$__object/parameter/state")" +pkg_version="$(cat "$__object/explorer/pkg_version")" case "$state" in installed) - pkg_version="$(cat "$__object/explorer/pkg_version")" # Empty? Not installed. if [ -z "$pkg_version" ]; then From 4c447b59acb2d431dd74a90ac94669b9b8cb8061 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 3 Mar 2011 08:28:24 +0100 Subject: [PATCH 0492/6109] need value from file not file itself Signed-off-by: Steven Armstrong --- 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 8523e01e..cfb7a9d6 100755 --- a/conf/type/__package_apt/gencode +++ b/conf/type/__package_apt/gencode @@ -22,7 +22,7 @@ # if [ -f "$__object/parameter/name" ]; then - name="$__object/parameter/name" + name="$(cat "$__object/parameter/name")" else name="$__object_id" fi From fe5e0c75410271cc2e42bcf5c0b0edaf38a3c5a3 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 3 Mar 2011 08:33:14 +0100 Subject: [PATCH 0493/6109] update to work with new variables Signed-off-by: Steven Armstrong --- conf/type/__package/hints | 7 ------- conf/type/__package/manifest | 27 ++++++++++++++++---------- conf/type/__package/parameter/optional | 1 + conf/type/__package/parameter/required | 2 +- 4 files changed, 19 insertions(+), 18 deletions(-) delete mode 100644 conf/type/__package/hints diff --git a/conf/type/__package/hints b/conf/type/__package/hints deleted file mode 100644 index 86282e3b..00000000 --- a/conf/type/__package/hints +++ /dev/null @@ -1,7 +0,0 @@ -install/pacman: -pacman --noconfirm --noprogressbar -S --------------------------------------------------------------------------------- - -ensure: What state the package should be in: present | absent | latest | versionstring (1.0.3) -name: The package name as used by the packaging system - diff --git a/conf/type/__package/manifest b/conf/type/__package/manifest index 5ac1ae7b..89b3f179 100755 --- a/conf/type/__package/manifest +++ b/conf/type/__package/manifest @@ -23,21 +23,28 @@ # system. # -. cdist-config - -object_id="$1"; shift - -if [ -f type ]; then - type="$(cat type)" +type="$__object/parameter/type" +if [ -f "$type" ]; then + type="$(cat "$type")" else - # Default to value taken from explorer - type="$(cat $__cdist_out_explorers/pkg_system)" + # By default determine package manager based on operating system + os="$(cat "out/explorer/os")" + case "$os" in + archlinux) type="pacman" ;; + debian|ubuntu) type="apt" ;; + gentoo) type="emerge" ;; + *) + echo "Don't know how to manage packages on: $os" >&2 + exit 1 + ;; + esac fi -set -- "$@" "$object_id" +set -- "$@" "$__object_id" +cd "$__object/parameter" for property in $(ls .); do if [ "$property" != "type" ]; then - set -- "$@" "--$property" "$(cat $property)" + set -- "$@" "--$property" "$(cat "$property")" fi done diff --git a/conf/type/__package/parameter/optional b/conf/type/__package/parameter/optional index d3598a51..712ea892 100644 --- a/conf/type/__package/parameter/optional +++ b/conf/type/__package/parameter/optional @@ -1,2 +1,3 @@ name +version type diff --git a/conf/type/__package/parameter/required b/conf/type/__package/parameter/required index 5f0c1c12..ff72b5c7 100644 --- a/conf/type/__package/parameter/required +++ b/conf/type/__package/parameter/required @@ -1 +1 @@ -ensure +state From 0d88bccead426bb9ddfaa9e8512aa646470e5365 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 3 Mar 2011 08:39:37 +0100 Subject: [PATCH 0494/6109] update to work with new tree layout and variables Signed-off-by: Steven Armstrong --- conf/type/__package_emerge/gencode | 24 ++++++++----- conf/type/__package_emerge/hints | 7 ---- conf/type/__package_emerge/manifest | 36 +++++++++++++++++++ conf/type/__package_emerge/parameter/optional | 1 + conf/type/__package_emerge/parameter/required | 2 +- 5 files changed, 53 insertions(+), 17 deletions(-) delete mode 100644 conf/type/__package_emerge/hints create mode 100755 conf/type/__package_emerge/manifest diff --git a/conf/type/__package_emerge/gencode b/conf/type/__package_emerge/gencode index e4313c5c..ee95b823 100755 --- a/conf/type/__package_emerge/gencode +++ b/conf/type/__package_emerge/gencode @@ -21,18 +21,24 @@ # Manage packages on gentoo. # -. cdist-config - -object_id="$1"; shift - -if [ -f name ]; then - name="$(cat name)" +if [ -f "$__object/parameter/name" ]; then + name="$(cat "$__object/parameter/name")" else - name="$object_id" + name="$__object_id" fi +state="$(cat "$__object/parameter/state")" -# FIXME: super simple proof of concept -echo "emerge -q \"$name\"" +case "$state" in + installed) + # FIXME: only install if not already installed + echo "emerge -q \"$name\"" + ;; + deinstalled) + # FIXME: only uninstall if currently installed + # FIXME: rename deinstalled to uninstalled + echo "emerge -q -C \"$name\"" + ;; +esac exit 0 diff --git a/conf/type/__package_emerge/hints b/conf/type/__package_emerge/hints deleted file mode 100644 index 86282e3b..00000000 --- a/conf/type/__package_emerge/hints +++ /dev/null @@ -1,7 +0,0 @@ -install/pacman: -pacman --noconfirm --noprogressbar -S --------------------------------------------------------------------------------- - -ensure: What state the package should be in: present | absent | latest | versionstring (1.0.3) -name: The package name as used by the packaging system - diff --git a/conf/type/__package_emerge/manifest b/conf/type/__package_emerge/manifest new file mode 100755 index 00000000..178fa510 --- /dev/null +++ b/conf/type/__package_emerge/manifest @@ -0,0 +1,36 @@ +#!/bin/sh +# +# 2011 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 . +# +# +# __package is an abstract type which dispatches to the lower level +# __package_$name types which do the actual interaction with the packaging +# system. +# + +# TODO: depend on package gentoolkit for qpkg + +# TODO: +# if /var/cache/eix is older then /usr/portage/metadata/timestamp +# then run /usr/bin/eix-update +# +# check if package is installed: +# +# get currently installed version: +# + diff --git a/conf/type/__package_emerge/parameter/optional b/conf/type/__package_emerge/parameter/optional index f121bdbf..a52167d3 100644 --- a/conf/type/__package_emerge/parameter/optional +++ b/conf/type/__package_emerge/parameter/optional @@ -1 +1,2 @@ name +version diff --git a/conf/type/__package_emerge/parameter/required b/conf/type/__package_emerge/parameter/required index 5f0c1c12..ff72b5c7 100644 --- a/conf/type/__package_emerge/parameter/required +++ b/conf/type/__package_emerge/parameter/required @@ -1 +1 @@ -ensure +state From cda7664e1375e3f34aeb12a8a7fcff228cb77295 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 3 Mar 2011 08:40:54 +0100 Subject: [PATCH 0495/6109] removed obsolete explorer Signed-off-by: Steven Armstrong --- conf/explorer/pkg_system | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100755 conf/explorer/pkg_system diff --git a/conf/explorer/pkg_system b/conf/explorer/pkg_system deleted file mode 100755 index fad2a9f0..00000000 --- a/conf/explorer/pkg_system +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# -# 2010 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 . -# -# - -os="$("$__explorer/os")" - -case "$os" in - archlinux) echo pacman ;; - debian|ubuntu) echo apt ;; - gentoo) echo emerge ;; - *) - echo "Unknown OS: $os" >&2 - exit 1 - ;; -esac From c441f68c9c566658f2e93299c666b406a7404daf Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 3 Mar 2011 08:44:03 +0100 Subject: [PATCH 0496/6109] more /etc/hosts magic to ease development Signed-off-by: Steven Armstrong --- conf/manifest/init | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/conf/manifest/init b/conf/manifest/init index be9d10c5..0b4d99e5 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -20,13 +20,14 @@ case "$__target_host" in __package_pacman wireshark-cli --state installed __package_pacman zsh --state installed ;; + cdist-gentoo) + __package tree --ensure installed + ;; + # Real machines ikq*) __package_apt zsh --state installed ;; - icarus) - __package tree --ensure installed - ;; esac From dde0878ffc8b01aaf43ec6583cddaa0fbe66c242 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 3 Mar 2011 08:44:58 +0100 Subject: [PATCH 0497/6109] /ensure/state/ Signed-off-by: Steven Armstrong --- conf/manifest/init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/manifest/init b/conf/manifest/init index 0b4d99e5..f6d973f8 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -21,7 +21,7 @@ case "$__target_host" in __package_pacman zsh --state installed ;; cdist-gentoo) - __package tree --ensure installed + __package tree --state installed ;; # Real machines From 45d267158f5478acffd1434667fa33c1e0c4a44f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 08:55:02 +0100 Subject: [PATCH 0498/6109] cleanup manifest/init Signed-off-by: Nico Schottelius --- conf/manifest/init | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conf/manifest/init b/conf/manifest/init index f6d973f8..81b8061c 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -9,6 +9,7 @@ echo "We could access other manifests in $__manifest" __file /etc/cdist-configured --type file case "$__target_host" in + # Everybody has this localhost) __issue iddoesnotmatterhere __file test --type file --destination /tmp/cdist-testfile @@ -28,6 +29,4 @@ case "$__target_host" in ikq*) __package_apt zsh --state installed ;; - - esac From 442a175755d88ec5e0a74ccec4561cbaa1a01e63 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 09:12:55 +0100 Subject: [PATCH 0499/6109] update explorer for __package_apt and install only if not already installed (same for deinstall) Signed-off-by: Nico Schottelius --- conf/manifest/init | 1 + conf/type/__package_apt/explorer/pkg_status | 3 ++- conf/type/__package_apt/gencode | 9 ++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/conf/manifest/init b/conf/manifest/init index 81b8061c..30037481 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -28,5 +28,6 @@ case "$__target_host" in # Real machines ikq*) __package_apt zsh --state installed + __package_apt apache2 --state deinstalled ;; esac diff --git a/conf/type/__package_apt/explorer/pkg_status b/conf/type/__package_apt/explorer/pkg_status index e13f8f5c..86b94825 100755 --- a/conf/type/__package_apt/explorer/pkg_status +++ b/conf/type/__package_apt/explorer/pkg_status @@ -27,4 +27,5 @@ else name="$__object_id" fi -dpkg -l "$name" 2>/dev/null | awk '{ print $1 }' +# Except dpkg failing, if package is not known / installed +dpkg -s "$name" 2>/dev/null || exit 0 diff --git a/conf/type/__package_apt/gencode b/conf/type/__package_apt/gencode index cfb7a9d6..b451eb9f 100755 --- a/conf/type/__package_apt/gencode +++ b/conf/type/__package_apt/gencode @@ -29,15 +29,18 @@ fi state="$(cat "$__object/parameter/state")" +is_installed="$(grep "^Status: install ok installed" "$__object/explorer/pkg_status")" + case "$state" in installed) - pkg_status="$(cat "$__object/explorer/pkg_status")" - if [ "$pkg_status" != "ii" ]; then + # Install only if non-existent + if [ -z "$is_installed" ]; then echo apt-get --quiet --yes install \"$name\" fi ;; deinstalled) - if [ "$pkg_status" != "un" ]; then + # Remove only if existent + if [ -n "$is_installed" ]; then echo apt-get --quiet --yes remove \"$name\" fi ;; From f75f2a0de5bf3bd976ee68c336fca530a74a06d9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 09:43:04 +0100 Subject: [PATCH 0500/6109] Cleanup local and remote base_dir before execution Signed-off-by: Nico Schottelius --- bin/cdist-config | 16 ++++++++++++++++ bin/cdist-deploy-to | 14 ++++---------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 98d8abf7..e56cd77a 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -128,6 +128,22 @@ __cdist_usage() __cdist_exit_err "$__cdist_myname: $@" } +__cdist_init_deploy() +{ + echo "Creating clean directory structur ..." + + # Ensure there is no old stuff, neither local nor remote + rm -rf "$__cdist_local_base_dir" + ssh "${__cdist_remote_user}@$1" "rm -rf ${__cdist_remote_base_dir}" + + # Init base + mkdir -p "$__cdist_local_base_dir" + ssh "${__cdist_remote_user}@$1" "mkdir -p ${__cdist_remote_base_dir}" + + # Link configuration source directory - consistent with remote + ln -sf "$__cdist_conf_dir" "$__cdist_local_base_dir/$__cdist_name_conf_dir" +} + # __cdist_cache_host() # { # echo "${__cdist_cache_hosts}/${__cdist_target_host}" diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 68c86be9..5c78f695 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -33,20 +33,14 @@ export $__cdist_name_var_target_host="$__cdist_target_host" # Export variables for core, which others do not reset export __cdist_local_base_dir +echo "cdist $__cdist_version: Configuring $__cdist_target_host" + ################################################################################ # See cdist-stages(7) # -echo "cdist $__cdist_version: Configuring $__cdist_target_host" - -# Init base -mkdir -p "$__cdist_local_base_dir" - -# Ensure there is no old link, otherwise the new link is created below the old -rm -f "$__cdist_local_base_dir/$__cdist_name_conf_dir" - -# Link configuration source directory - consistent with remote -ln -sf "$__cdist_conf_dir" "$__cdist_local_base_dir/$__cdist_name_conf_dir" +# Prepare local and remote directories +__cdist_init_deploy "$__cdist_target_host" # Transfer cdist "binaries" cdist-bin-transfer "$__cdist_target_host" "$__cdist_remote_bin_dir" From 8bb3a5b416a48f371c7f9f09b2058e305d7396be Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 09:47:02 +0100 Subject: [PATCH 0501/6109] beautify output Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 +- bin/cdist-manifest-run-init | 1 + bin/cdist-object-codegen-all | 2 +- conf/manifest/init | 1 - 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index e56cd77a..d1adf760 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -130,7 +130,7 @@ __cdist_usage() __cdist_init_deploy() { - echo "Creating clean directory structur ..." + echo "Creating clean directory structure ..." # Ensure there is no old stuff, neither local nor remote rm -rf "$__cdist_local_base_dir" diff --git a/bin/cdist-manifest-run-init b/bin/cdist-manifest-run-init index 79329252..a775d5a5 100755 --- a/bin/cdist-manifest-run-init +++ b/bin/cdist-manifest-run-init @@ -31,4 +31,5 @@ __cdist_output_dir="$1"; shift eval export $__cdist_name_var_manifest=\"\$__cdist_manifest_dir\" +echo "Running initial manifest for $__cdist_target_host ..." cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest_init" "$__cdist_output_dir" diff --git a/bin/cdist-object-codegen-all b/bin/cdist-object-codegen-all index 204659dc..67f05186 100755 --- a/bin/cdist-object-codegen-all +++ b/bin/cdist-object-codegen-all @@ -37,7 +37,7 @@ __cdist_object_list "$__cdist_object_base_dir" > "$__cdist_tmp_file" while read object; do code="$(__cdist_object_code "$object")" - echo "Generating code for $object ..." + echo "Generating code for $object ..." cdist-object-codegen "$__cdist_target_host" \ "$__cdist_object_base_dir" \ diff --git a/conf/manifest/init b/conf/manifest/init index 30037481..17ba0e92 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -3,7 +3,6 @@ # # This is debug and should not be in a production environment -echo "Running initial manifest for $__target_host" echo "We could access other manifests in $__manifest" __file /etc/cdist-configured --type file From 2c42f927969c8622a97ca7545aecd471477ac869 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 09:49:19 +0100 Subject: [PATCH 0502/6109] hackers readme does not need rm -rf anymore Signed-off-by: Nico Schottelius --- HACKERS_README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HACKERS_README b/HACKERS_README index 04a09d53..7f42b3fa 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -21,7 +21,7 @@ Do not believe anything written in cdist, besides what's written in this file This file is suitable for execution and saving the objects and explorers from cdist. I usually do it like this: - % rm -rf /tmp/localhost && ./HACKERS_README + % ./HACKERS_README ################################################################################ eof From 2fc28b6deba47b0d569a8efa76fc91dbb7cc465a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 09:50:48 +0100 Subject: [PATCH 0503/6109] cleanup naming in doc Signed-off-by: Nico Schottelius --- .../SCAN0000.PDF | Bin .../SCAN0001.PDF | Bin .../SCAN0002.PDF | Bin .../SCAN0003.PDF | Bin .../SCAN0004.PDF | Bin 5 files changed, 0 insertions(+), 0 deletions(-) rename doc/dev/logs/{20101201 => 2010-12-01.handwritten}/SCAN0000.PDF (100%) rename doc/dev/logs/{20101201 => 2010-12-01.handwritten}/SCAN0001.PDF (100%) rename doc/dev/logs/{20101201 => 2010-12-01.handwritten}/SCAN0002.PDF (100%) rename doc/dev/logs/{20101201 => 2010-12-01.handwritten}/SCAN0003.PDF (100%) rename doc/dev/logs/{20101201 => 2010-12-01.handwritten}/SCAN0004.PDF (100%) diff --git a/doc/dev/logs/20101201/SCAN0000.PDF b/doc/dev/logs/2010-12-01.handwritten/SCAN0000.PDF similarity index 100% rename from doc/dev/logs/20101201/SCAN0000.PDF rename to doc/dev/logs/2010-12-01.handwritten/SCAN0000.PDF diff --git a/doc/dev/logs/20101201/SCAN0001.PDF b/doc/dev/logs/2010-12-01.handwritten/SCAN0001.PDF similarity index 100% rename from doc/dev/logs/20101201/SCAN0001.PDF rename to doc/dev/logs/2010-12-01.handwritten/SCAN0001.PDF diff --git a/doc/dev/logs/20101201/SCAN0002.PDF b/doc/dev/logs/2010-12-01.handwritten/SCAN0002.PDF similarity index 100% rename from doc/dev/logs/20101201/SCAN0002.PDF rename to doc/dev/logs/2010-12-01.handwritten/SCAN0002.PDF diff --git a/doc/dev/logs/20101201/SCAN0003.PDF b/doc/dev/logs/2010-12-01.handwritten/SCAN0003.PDF similarity index 100% rename from doc/dev/logs/20101201/SCAN0003.PDF rename to doc/dev/logs/2010-12-01.handwritten/SCAN0003.PDF diff --git a/doc/dev/logs/20101201/SCAN0004.PDF b/doc/dev/logs/2010-12-01.handwritten/SCAN0004.PDF similarity index 100% rename from doc/dev/logs/20101201/SCAN0004.PDF rename to doc/dev/logs/2010-12-01.handwritten/SCAN0004.PDF From b9ff43c657de458b22d7113e82d1b2c623314756 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 3 Mar 2011 10:37:11 +0100 Subject: [PATCH 0504/6109] use $__global instead of ./out/ Signed-off-by: Steven Armstrong --- conf/type/__package/manifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__package/manifest b/conf/type/__package/manifest index 89b3f179..cf085e2f 100755 --- a/conf/type/__package/manifest +++ b/conf/type/__package/manifest @@ -28,7 +28,7 @@ if [ -f "$type" ]; then type="$(cat "$type")" else # By default determine package manager based on operating system - os="$(cat "out/explorer/os")" + os="$(cat "$__global/explorer/os")" case "$os" in archlinux) type="pacman" ;; debian|ubuntu) type="apt" ;; From cc05c6324c378c2f97428f11456af3921c30be61 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 10:37:11 +0100 Subject: [PATCH 0505/6109] provide __global for manifests and codegen Signed-off-by: Nico Schottelius --- bin/cdist-config | 25 +++++++++++++------------ bin/cdist-manifest-run | 3 +++ bin/cdist-object-codegen | 1 + 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index d1adf760..3f4ab52f 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -33,6 +33,7 @@ __cdist_version="1.0.0" : ${__cdist_name_conf_dir:=conf} : ${__cdist_name_explorer:=explorer} : ${__cdist_name_gencode:=gencode} +: ${__cdist_name_global:=global} : ${__cdist_name_host:=host} : ${__cdist_name_init:=init} : ${__cdist_name_manifest:=manifest} @@ -53,6 +54,7 @@ __cdist_version="1.0.0" # Exported variable names (usable for non core) : ${__cdist_name_var_explorer:=__$__cdist_name_explorer} : ${__cdist_name_var_type_explorer:=__$__cdist_name_type_explorer} +: ${__cdist_name_var_global:=__$__cdist_name_global} : ${__cdist_name_var_manifest:=__$__cdist_name_manifest} : ${__cdist_name_var_target_host:=__$__cdist_name_target_host} : ${__cdist_name_var_object:=__$__cdist_name_object} @@ -60,18 +62,19 @@ __cdist_version="1.0.0" : ${__cdist_name_var_type:=__$__cdist_name_type} -# Base +# Local Base : ${__cdist_conf_dir:=/etc/cdist} : ${__cdist_explorer_dir:=$__cdist_conf_dir/$__cdist_name_explorer} : ${__cdist_manifest_dir:=$__cdist_conf_dir/$__cdist_name_manifest} : ${__cdist_manifest_init:=$__cdist_manifest_dir/$__cdist_name_init} : ${__cdist_type_dir:=$__cdist_conf_dir/$__cdist_name_type} -# Used for IDs -__cdist_sane_regexp='[A-Za-z0-9/]*[-A-Za-z0-9_/]*' - -# Default remote user -: ${__cdist_remote_user:=root} +# Local output base directory +: ${__cdist_local_base_dir:=$__cdist_tmp_dir} +: ${__cdist_out_dir:=$__cdist_local_base_dir/$__cdist_name_out_dir} +: ${__cdist_out_explorer_dir:=$__cdist_out_dir/$__cdist_name_explorer} +: ${__cdist_out_object_dir:=$__cdist_out_dir/$__cdist_name_object} +: ${__cdist_out_type_bin_dir:=$__cdist_out_dir/$__cdist_name_type_bin} # Remote base : ${__cdist_remote_base_dir:=/var/lib/cdist} @@ -91,13 +94,11 @@ __cdist_sane_regexp='[A-Za-z0-9/]*[-A-Za-z0-9_/]*' __cdist_tmp_dir=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX") __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") -# Local output base directory -: ${__cdist_local_base_dir:=$__cdist_tmp_dir} -: ${__cdist_out_dir:=$__cdist_local_base_dir/$__cdist_name_out_dir} -: ${__cdist_out_explorer_dir:=$__cdist_out_dir/$__cdist_name_explorer} -: ${__cdist_out_object_dir:=$__cdist_out_dir/$__cdist_name_object} -: ${__cdist_out_type_bin_dir:=$__cdist_out_dir/$__cdist_name_type_bin} +# Used for IDs +__cdist_sane_regexp='[A-Za-z0-9/]*[-A-Za-z0-9_/]*' +# Default remote user +: ${__cdist_remote_user:=root} ################################################################################ # cconf standard vars prefixed with cdist diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index d10cba02..0b30f2c1 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -36,6 +36,9 @@ __cdist_work_dir="$__cdist_local_base_dir" # Export information for cdist-type-emulator export __cdist_output_dir __cdist_manifest +# Export information for manifests +export __global="$__cdist_out_dir" + # Ensure binaries exist and are up-to-date cdist-type-build-emulation "${__cdist_out_type_bin_dir}" \ || __cdist_exit_err "Failed to build type emulation binaries" diff --git a/bin/cdist-object-codegen b/bin/cdist-object-codegen index b9bdae72..a1092a46 100755 --- a/bin/cdist-object-codegen +++ b/bin/cdist-object-codegen @@ -40,6 +40,7 @@ gencode="$(__cdist_type_gencode "$__cdist_type")" # export variables for gencode export __object_id="$__cdist_object_id" export __object="$__cdist_object_dir" +export __global="$__cdist_out_dir" cd "$__cdist_local_base_dir" From 614ff21f4abb45b05504a36420864a56eab86d5c Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 3 Mar 2011 10:37:49 +0100 Subject: [PATCH 0506/6109] /deinstalled/uninstalled/ Signed-off-by: Steven Armstrong --- conf/manifest/init | 4 ++-- conf/type/__package_apt/gencode | 2 +- conf/type/__package_emerge/gencode | 3 +-- conf/type/__package_pacman/gencode | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/conf/manifest/init b/conf/manifest/init index 17ba0e92..51b06e6f 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -16,7 +16,7 @@ case "$__target_host" in # Alias in /etc/hosts for localhost cdist-archlinux) - __package_pacman django --state deinstalled + __package_pacman django --state uninstalled __package_pacman wireshark-cli --state installed __package_pacman zsh --state installed ;; @@ -27,6 +27,6 @@ case "$__target_host" in # Real machines ikq*) __package_apt zsh --state installed - __package_apt apache2 --state deinstalled + __package_apt apache2 --state uninstalled ;; esac diff --git a/conf/type/__package_apt/gencode b/conf/type/__package_apt/gencode index b451eb9f..c85242e6 100755 --- a/conf/type/__package_apt/gencode +++ b/conf/type/__package_apt/gencode @@ -38,7 +38,7 @@ case "$state" in echo apt-get --quiet --yes install \"$name\" fi ;; - deinstalled) + uninstalled) # Remove only if existent if [ -n "$is_installed" ]; then echo apt-get --quiet --yes remove \"$name\" diff --git a/conf/type/__package_emerge/gencode b/conf/type/__package_emerge/gencode index ee95b823..47e8bc5e 100755 --- a/conf/type/__package_emerge/gencode +++ b/conf/type/__package_emerge/gencode @@ -34,9 +34,8 @@ case "$state" in # FIXME: only install if not already installed echo "emerge -q \"$name\"" ;; - deinstalled) + uninstalled) # FIXME: only uninstall if currently installed - # FIXME: rename deinstalled to uninstalled echo "emerge -q -C \"$name\"" ;; esac diff --git a/conf/type/__package_pacman/gencode b/conf/type/__package_pacman/gencode index 9702aa8e..536b7708 100755 --- a/conf/type/__package_pacman/gencode +++ b/conf/type/__package_pacman/gencode @@ -44,7 +44,7 @@ case "$state" in echo pacman "$pacopts" -S \"$name\" fi ;; - deinstalled) + uninstalled) if [ "$pkg_version" ]; then echo pacman "$pacopts" -R \"$name\" fi From d84ba7682a3ad29d7c8829c51af734334d3dc2d9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 10:40:27 +0100 Subject: [PATCH 0507/6109] more todo for 1.0 Signed-off-by: Nico Schottelius --- TODO-1.0 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/TODO-1.0 b/TODO-1.0 index a8874914..63ccdabb 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -42,12 +42,14 @@ x generate code to be executed on clients (stage 4) x execute code on client (stage 5) +- make cdist run from checkout + - Last doc stuff for 1.0.0: x remove old documentation from doc/man/! - Check all references in manpages, ensure all manpages exist - - cdist + + cdist - cdist-deploy-to - - cdist-manifest + + cdist-manifest - cdist-quickstart: how to get started - ensure every file in bin/ has a correspondent manpage - cdist-type [IMPORTANT] @@ -55,9 +57,6 @@ x execute code on client (stage 5) - install packages only if not existent - copy file only if different - cdist-type-integration - - cdist [IMPORTANT] - - explain the general approach - - give right pointers - cdist-explorer - DOC document "cd $__object_dir, before running manifest" in doc/man/cdist-types.text From c466435cb7e08e7d1bc1951f30649a382af4309f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 10:54:38 +0100 Subject: [PATCH 0508/6109] cleanup todo for documentation Signed-off-by: Nico Schottelius --- TODO-1.0 | 62 +++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 16 deletions(-) diff --git a/TODO-1.0 b/TODO-1.0 index 63ccdabb..6061b6f1 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -44,27 +44,57 @@ x execute code on client (stage 5) - make cdist run from checkout + - Last doc stuff for 1.0.0: + + - = todo + + = in progress -> S|N + x = done + + x remove old documentation from doc/man/! - - Check all references in manpages, ensure all manpages exist + - Check all references in manpages, ensure all manpages exist, generic ones: + cdist - - cdist-deploy-to - + cdist-manifest - - cdist-quickstart: how to get started + + cdist-deploy-to + + cdist-manifest + - cdist-quickstart: how to get started + - cdist-type [IMPORTANT] + - only do necessary work [TYPE IMPLEMENTATION HINTS] + - install packages only if not existent + - copy file only if different + - DOC document that $type/manifest is executed for every object/instance + - cdist-explorer + - exported variables: + - general explorer: __explorer # cdist-explorer + - initial manifest: __manifest, __global # cdist-manifest + - type manifests __object, __object_id, __global # cdist-type + - type explorers: __object, __object_id, __type_explorers # cdist-type + - type codegen: __object, __object_id, __global # cdist-type + - type code: - # cdist-code + - cdist-type-integration + - Ensure available types are documented (!) + - define how to in cdist-type-integration + - referenced on the webpage via cdist-type(7)! - ensure every file in bin/ has a correspondent manpage - - cdist-type [IMPORTANT] - - only do necessary work [TYPE IMPLEMENTATION HINTS] - - install packages only if not existent - - copy file only if different - - cdist-type-integration - - cdist-explorer - - - DOC document "cd $__object_dir, before running manifest" in doc/man/cdist-types.text - - DOC document that $type/manifest is executed for every object/instance - - DOC: exported variables: __type, __explorer, __type_explorer, __object, __object_id - + - cdist-bin-transfer + - cdist-code-run-all + - cdist-config + - cdist-deploy-to + - cdist-dir + - cdist-explorer-run-init + - cdist-manifest-run + - cdist-manifest-run-all + - cdist-manifest-run-init + - cdist-object-codegen + - cdist-object-codegen-all + - cdist-object-explorer-all + - cdist-quickstart + - cdist-remote-code-run-all + - cdist-remote-explorer-run + - cdist-run-remote + - cdist-type-build-emulation + - cdist-type-emulator - Cleanup READMEs - - Ensure manpages are formatted correctly - Ensure html output of manpages are published on the web - Makefile: From 7ac672c7ff98f201622fd05f6ba91edfde489309 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 14:41:07 +0100 Subject: [PATCH 0509/6109] update nexttodo Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index ccfaf288..2d8b28f6 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -3,3 +3,4 @@ Prepare documentation for 1.0.0. - cdist.text, cdist-quickstart - write cdist-quickstart - redefine installation + configuration base? + - make cdist run from checkout by default From 8d3d11ea1b8da25eaffda31082e4b1283a7192c8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 14:49:48 +0100 Subject: [PATCH 0510/6109] cleanup / sort cdist-config Signed-off-by: Nico Schottelius --- bin/cdist-config | 56 +++++++++++++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 20 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 3f4ab52f..3fa7cbb1 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -24,10 +24,24 @@ set -u __cdist_version="1.0.0" +################################################################################ +# cconf standard vars prefixed with cdist +# +__cdist_pwd="$(pwd -P)" +__cdist_mydir="${0%/*}"; +__cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" +__cdist_myname=${0##*/}; +__cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" + + + +################################################################################ +# Names / Constants +# # Most values can be overriden from outside, so you can # customise paths as you like (for distributors, geeks and hackers) +# -# Names / Constants : ${__cdist_name_bin:=bin} : ${__cdist_name_code:=code} : ${__cdist_name_conf_dir:=conf} @@ -50,8 +64,16 @@ __cdist_version="1.0.0" : ${__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_/]*} -# Exported variable names (usable for non core) +# Default remote user +: ${__cdist_remote_user:=root} + + +################################################################################ +# Exported variable names (usable for non core +# : ${__cdist_name_var_explorer:=__$__cdist_name_explorer} : ${__cdist_name_var_type_explorer:=__$__cdist_name_type_explorer} : ${__cdist_name_var_global:=__$__cdist_name_global} @@ -62,52 +84,46 @@ __cdist_version="1.0.0" : ${__cdist_name_var_type:=__$__cdist_name_type} +################################################################################ # Local Base +# : ${__cdist_conf_dir:=/etc/cdist} : ${__cdist_explorer_dir:=$__cdist_conf_dir/$__cdist_name_explorer} : ${__cdist_manifest_dir:=$__cdist_conf_dir/$__cdist_name_manifest} : ${__cdist_manifest_init:=$__cdist_manifest_dir/$__cdist_name_init} : ${__cdist_type_dir:=$__cdist_conf_dir/$__cdist_name_type} -# Local output base directory +################################################################################ +# Local output +# : ${__cdist_local_base_dir:=$__cdist_tmp_dir} : ${__cdist_out_dir:=$__cdist_local_base_dir/$__cdist_name_out_dir} : ${__cdist_out_explorer_dir:=$__cdist_out_dir/$__cdist_name_explorer} : ${__cdist_out_object_dir:=$__cdist_out_dir/$__cdist_name_object} : ${__cdist_out_type_bin_dir:=$__cdist_out_dir/$__cdist_name_type_bin} +################################################################################ # Remote base +# : ${__cdist_remote_base_dir:=/var/lib/cdist} - -# Remote config : ${__cdist_remote_conf_dir:=$__cdist_remote_base_dir/$__cdist_name_conf_dir} : ${__cdist_remote_explorer_dir:=$__cdist_remote_conf_dir/$__cdist_name_explorer} : ${__cdist_remote_bin_dir:=$__cdist_remote_conf_dir/$__cdist_name_bin} : ${__cdist_remote_type_dir:=$__cdist_remote_conf_dir/$__cdist_name_type} -# Remote out +################################################################################ +# Remote output +# : ${__cdist_remote_out_dir:=$__cdist_remote_base_dir/$__cdist_name_out_dir} : ${__cdist_remote_out_explorer_dir:=$__cdist_remote_out_dir/$__cdist_name_explorer} : ${__cdist_remote_out_object_base_dir:=$__cdist_remote_out_dir/$__cdist_name_object} +################################################################################ # Tempfiles +# __cdist_tmp_dir=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX") __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") -# Used for IDs -__cdist_sane_regexp='[A-Za-z0-9/]*[-A-Za-z0-9_/]*' - -# Default remote user -: ${__cdist_remote_user:=root} - -################################################################################ -# cconf standard vars prefixed with cdist -__cdist_pwd="$(pwd -P)" -__cdist_mydir="${0%/*}"; -__cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" -__cdist_myname=${0##*/}; -__cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" - ################################################################################ # Function list # From 88a9700902b1970c41ed309ffdb1cfc39fd19df6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 15:27:09 +0100 Subject: [PATCH 0511/6109] indent __cdist_init_deploy call 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 5c78f695..c576dfd6 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -40,7 +40,7 @@ echo "cdist $__cdist_version: Configuring $__cdist_target_host" # # Prepare local and remote directories -__cdist_init_deploy "$__cdist_target_host" +__cdist_init_deploy "$__cdist_target_host" # Transfer cdist "binaries" cdist-bin-transfer "$__cdist_target_host" "$__cdist_remote_bin_dir" From 3ff0b4a393031e7ab951b10a4bf6e44a09943bc2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 15:27:51 +0100 Subject: [PATCH 0512/6109] Use ../conf as default conf and change remote bin directory (next to conf/) Signed-off-by: Nico Schottelius --- bin/cdist-config | 23 ++++++++++++----------- bin/cdist-manifest-run | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 3fa7cbb1..46a86ecb 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -33,8 +33,6 @@ __cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" __cdist_myname=${0##*/}; __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" - - ################################################################################ # Names / Constants # @@ -84,10 +82,19 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_var_type:=__$__cdist_name_type} +################################################################################ +# Tempfiles +# +__cdist_tmp_dir=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX") +__cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") + ################################################################################ # Local Base # -: ${__cdist_conf_dir:=/etc/cdist} +: ${__cdist_local_base_dir:=$__cdist_tmp_dir} + +: ${__cdist_conf_dir:="$(cd "$__cdist_abs_mydir/../conf" && pwd -P)"} + : ${__cdist_explorer_dir:=$__cdist_conf_dir/$__cdist_name_explorer} : ${__cdist_manifest_dir:=$__cdist_conf_dir/$__cdist_name_manifest} : ${__cdist_manifest_init:=$__cdist_manifest_dir/$__cdist_name_init} @@ -96,7 +103,6 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" ################################################################################ # Local output # -: ${__cdist_local_base_dir:=$__cdist_tmp_dir} : ${__cdist_out_dir:=$__cdist_local_base_dir/$__cdist_name_out_dir} : ${__cdist_out_explorer_dir:=$__cdist_out_dir/$__cdist_name_explorer} : ${__cdist_out_object_dir:=$__cdist_out_dir/$__cdist_name_object} @@ -106,9 +112,10 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" # Remote base # : ${__cdist_remote_base_dir:=/var/lib/cdist} +: ${__cdist_remote_bin_dir:=$__cdist_remote_base_dir/$__cdist_name_bin} : ${__cdist_remote_conf_dir:=$__cdist_remote_base_dir/$__cdist_name_conf_dir} + : ${__cdist_remote_explorer_dir:=$__cdist_remote_conf_dir/$__cdist_name_explorer} -: ${__cdist_remote_bin_dir:=$__cdist_remote_conf_dir/$__cdist_name_bin} : ${__cdist_remote_type_dir:=$__cdist_remote_conf_dir/$__cdist_name_type} ################################################################################ @@ -118,12 +125,6 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_remote_out_explorer_dir:=$__cdist_remote_out_dir/$__cdist_name_explorer} : ${__cdist_remote_out_object_base_dir:=$__cdist_remote_out_dir/$__cdist_name_object} -################################################################################ -# Tempfiles -# -__cdist_tmp_dir=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX") -__cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") - ################################################################################ # Function list # diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 0b30f2c1..7f5cdea7 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -34,7 +34,7 @@ __cdist_output_dir="$1"; shift __cdist_work_dir="$__cdist_local_base_dir" # Export information for cdist-type-emulator -export __cdist_output_dir __cdist_manifest +export __cdist_conf_dir __cdist_output_dir __cdist_manifest # Export information for manifests export __global="$__cdist_out_dir" From 1d133ecb0a5f83f2284a7733050f760b3260a14d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 15:42:09 +0100 Subject: [PATCH 0513/6109] fix type __file: md5sum from stdin (=same name) and prepend / to object_id Signed-off-by: Nico Schottelius --- conf/type/__file/explorer/md5sum | 6 +++--- conf/type/__file/gencode | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/type/__file/explorer/md5sum b/conf/type/__file/explorer/md5sum index f755c769..a8ce6152 100755 --- a/conf/type/__file/explorer/md5sum +++ b/conf/type/__file/explorer/md5sum @@ -24,12 +24,12 @@ if [ -f "$__object/parameter/destination" ]; then destination="$(cat "$__object/parameter/destination")" else - destination="$__object_id" + destination="/$__object_id" fi # No output if file does not exist - does definitely not match the md5sum :-) if [ -e "$destination" ]; then - md5sum "$destination" + md5sum < "$destination" else - echo "NO FILE NOT FOUND, NO CHECKSUM CALCULATED." + echo "NO FILE FOUND, NO CHECKSUM CALCULATED." fi diff --git a/conf/type/__file/gencode b/conf/type/__file/gencode index e0398877..0d2c8478 100755 --- a/conf/type/__file/gencode +++ b/conf/type/__file/gencode @@ -49,7 +49,7 @@ if [ -f "$__object/parameter/source" ]; then exec 1>&2 set -x - md5sum="$(md5sum "$source")" + md5sum="$(md5sum < "$source")" remote_md5sum="$(cat "$__object/explorer/md5sum")" # Is md5sum the right approach? From 56c3ec29e15cc27e6cb2f6fc32c3dbef544238a8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 15:43:24 +0100 Subject: [PATCH 0514/6109] even more logs Signed-off-by: Nico Schottelius --- doc/dev/logs/2011-03-03 | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 doc/dev/logs/2011-03-03 diff --git a/doc/dev/logs/2011-03-03 b/doc/dev/logs/2011-03-03 new file mode 100644 index 00000000..3f900c15 --- /dev/null +++ b/doc/dev/logs/2011-03-03 @@ -0,0 +1,9 @@ +Update on env: + + general explorer: __explorer + initial manifest: __manifest, __global + type manifests __object, __object_id, __global + type explorers: __object, __object_id, __type_explorers + type codegen: __object, __object_id, __global + type code: - + From b739f452b084461054e19113dd50eb58c4c49e13 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 15:43:55 +0100 Subject: [PATCH 0515/6109] -debug Signed-off-by: Nico Schottelius --- conf/type/__file/gencode | 4 ---- 1 file changed, 4 deletions(-) diff --git a/conf/type/__file/gencode b/conf/type/__file/gencode index 0d2c8478..4d4a9a1e 100755 --- a/conf/type/__file/gencode +++ b/conf/type/__file/gencode @@ -45,10 +45,6 @@ fi if [ -f "$__object/parameter/source" ]; then source="$(cat "$__object/parameter/source")" - exec 3>&1 - exec 1>&2 - - set -x md5sum="$(md5sum < "$source")" remote_md5sum="$(cat "$__object/explorer/md5sum")" From c15896f053dcac6ad599f782bdc2a0bff2559abf Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 15:44:25 +0100 Subject: [PATCH 0516/6109] less todo for nico Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 2d8b28f6..d92277c8 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -2,5 +2,3 @@ Prepare documentation for 1.0.0. - Check all references in manpages - cdist.text, cdist-quickstart - write cdist-quickstart - - redefine installation + configuration base? - - make cdist run from checkout by default From 30730a3ccc1903e738a71a018440f8b7b1291e24 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 20:17:05 +0100 Subject: [PATCH 0517/6109] +add suse support to explorer "os" Signed-off-by: Nico Schottelius --- conf/explorer/os | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/explorer/os b/conf/explorer/os index 41d70545..ce2d9c80 100755 --- a/conf/explorer/os +++ b/conf/explorer/os @@ -36,5 +36,7 @@ fi [ -f /etc/redhat-release ] && echo redhat +[ -f /etc/SuSE-release ] && echo suse + # ensure correct exit, otherwise other explorer won't get started exit 0 From a7ab994bc80ec0b14dad4b651121e1bff8b13e62 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 20:24:25 +0100 Subject: [PATCH 0518/6109] make version dynamic from git 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 46a86ecb..ed19e70d 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -22,7 +22,7 @@ # Fail if something bogus is going on and export all variables set -u -__cdist_version="1.0.0" +__cdist_version="$(git describe)" ################################################################################ # cconf standard vars prefixed with cdist From 9fc184721d83b2278f9bf66447b47d4b6602fcc0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 3 Mar 2011 20:26:16 +0100 Subject: [PATCH 0519/6109] import http://svn.apache.org/repos/asf/tcl/websh/trunk/src/unix/config.guess for explorer/os Signed-off-by: Nico Schottelius --- doc/dev/config.guess | 1354 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1354 insertions(+) create mode 100644 doc/dev/config.guess diff --git a/doc/dev/config.guess b/doc/dev/config.guess new file mode 100644 index 00000000..fd30ab03 --- /dev/null +++ b/doc/dev/config.guess @@ -0,0 +1,1354 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002 Free Software Foundation, Inc. + +timestamp='2002-07-23' + +# This file 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 2 of the License, or +# (at your option) any later version. +# +# This program 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 this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# This shell variable is my proudest work .. or something. --bje + +set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; +(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) + || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; +dummy=$tmpdir/dummy ; +files="$dummy.c $dummy.o $dummy.rel $dummy" ; +trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + rm -f $files ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; +unset files' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + eval $set_cc_for_build + cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main +main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `$dummy` in + 0-0) + UNAME_MACHINE="alpha" + ;; + 1-0) + UNAME_MACHINE="alphaev5" + ;; + 1-1) + UNAME_MACHINE="alphaev56" + ;; + 1-101) + UNAME_MACHINE="alphapca56" + ;; + 2-303) + UNAME_MACHINE="alphaev6" + ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; + 2-1307) + UNAME_MACHINE="alphaev68" + ;; + 3-1307) + UNAME_MACHINE="alphaev7" + ;; + esac + fi + rm -f $dummy.s $dummy && rmdir $tmpdir + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy && rmdir $tmpdir + fi ;; + esac + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 + rm -f $dummy.c $dummy && rmdir $tmpdir + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3D:*:*:*) + echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + rm -f $dummy.c && rmdir $tmpdir + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + x86:Interix*:3*) + echo i386-pc-interix3 + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i386-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + rm -f $dummy.c && rmdir $tmpdir + test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + rm -f $dummy.c && rmdir $tmpdir + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit 0 ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit 0 ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + echo `uname -p`-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 +rm -f $dummy.c $dummy && rmdir $tmpdir + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: From 908faea7568095a3b0389f7482545916fd4ba039 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Mar 2011 02:06:13 +0100 Subject: [PATCH 0520/6109] finish cdist-quickstart Signed-off-by: Nico Schottelius --- bin/cdist-quickstart | 226 ++++++++++++++++++++++++++++++++----------- conf/manifest/init | 4 +- 2 files changed, 174 insertions(+), 56 deletions(-) diff --git a/bin/cdist-quickstart b/bin/cdist-quickstart index 08122a39..e853e5ee 100755 --- a/bin/cdist-quickstart +++ b/bin/cdist-quickstart @@ -35,100 +35,216 @@ __prompt() } ################################################################################ -# Intro +# Intro of quickstart # cat << eof $banner cdist version $__cdist_version Welcome to the interactive guide to cdist! -This is the interactive tutorial and beginners help for cdist. +This is the interactive tutorial and beginners help for cdist and here's +our schedule: -If you would like to run this tutorial completly without root priveliges, -setup the variables __cdist_conf_dir to point to a writable locaction -(i.e. $HOME/cdist-config). + - Stages: How cdist operates + - Explorer: Explore facts of the target host + - Manifest: Map configurations to hosts + - Types: Bundled functionality + - Deploy a configuration to the local host! eof __prompt "$continue" ################################################################################ -# /etc/cdist via root +# Stages # cat << eof -To make any use of cdist, we need to create the configuration base, which -can normally be found below ${__cdist_conf_dir}. As cdist does not need -any root priveliges normally, it is recommended that you create this -directory as root and change the owner to a dedicated user (for instance -cdist). -MANUAL STEP: +To deploy configurations to a host, you call - - Become root: su - - - Create ${__cdist_conf_dir}: mkdir ${__cdist_conf_dir} - - Change owner to $USER: chown $USER ${__cdist_conf_dir} + cdist-deploy-to + +which makes calls to other scripts, which realise the so called "stages". +Usually you'll not notice this, but in case you want to debug or hack cdist, +you can run each stage on its own. Besides that, you just need to remember +that the command cdist-deploy-to is the main cdist command. + +See also: + + Source of cdist-deploy-to, cdist-stages(7) eof __prompt "$continue" ################################################################################ -# Basic directories +# Explorer # cat << eof -Now we need to create some basic directories: - - ${__cdist_explorer_dir}: Contains explorer, which explore the target - - ${__cdist_manifest_dir}: Contains manifests which define types being used - - ${__cdist_type_dir}: Contains types +The first thing cdist always does is running different explorers on the +target host. The explorers can be found in the directory + + ${__cdist_explorer_dir} + +An explorer is executed on the target host and its output is saved to a file. +You can use these files later to decide what or how to configure the host. + +For a demonstration, we'll call the OS explorer locally now, but remember: +This is only for demonstration, normally it is run on the target host. +The os explorer will which either displays the detected operating system or +nothing if it does not know your OS. + +See also: + + cdist-explorer(7) eof -__prompt "$create_continue" +explorer="${__cdist_explorer_dir}/os" + +__prompt "Press enter to execute $explorer" set -x -mkdir -p ${__cdist_explorer_dir} -mkdir -p ${__cdist_manifest_dir} -mkdir -p ${__cdist_type_dir} +"$explorer" set +x ################################################################################ -# create manifest/init +# Manifest # cat << eof -At the beginning of a configuration deployment the first file cdist reads is -${__cdist_manifest_init}, which defines the types to be created on -a specific host. -We'll create the initial manifest and add some example types to it. +The initial manifest is the entry point for cdist to find out, what you would +like to have configured. It is located at -eof -__prompt "$create_continue" + ${__cdist_manifest_init} -set -x -cat << eof > "${__cdist_manifest_init}" -# Always create a marker +And can be as simple as + +-------------------------------------------------------------------------------- __file /etc/cdist-configured --type file - -case "\$__target_host" in - $(hostname)*) - __file /tmp/cdist-quickstart --type file - ;; -esac - -eof -set +x - -################################################################################ -# show generated manifest/niit -# -cat << eof -Let's have a look how the initial manifest looks like currently: -------------------------------------------------------------------------------- -eof -cat "${__cdist_manifest_init}" -cat << eof --------------------------------------------------------------------------------- -eof +See also: + + cdist-manifest(7) + +eof +__prompt "$continue" + +cat << eof + +Let's take a deeper look at the initial manifest to understand what it means: + + __file /etc/cdist-configured --type file + | | | \\ + | | The parameter type \\ With the value file + | | + | | + | | This is the object id + | + __file is a so called "type" + + +This essentially looks like a standard command executed in the shell. +eof +__prompt "$continue" + +cat << eof + +And that's exactly true. Manifests are shell snippets that can use +types as commands with arguments. cdist prepends a special path +that contain links to the cdist-type-emulator, to \$PATH, so you +can use your types as a command. + +This is also the reason why types should always be prefixed with +"__", to prevent collisions with existing binaries. + +The object id is unique per type and used to prevent you from creating +the same object twice. + +Parameters are type specific and are always specified as --parameter . + +See also: + + cdist-type-build-emulation(1), cdist-type-emulator(1) + +eof __prompt "$continue" ################################################################################ -# add type file +# Types # +cat << eof + +Types are bundled functionality and are the main component of cdist. +If you want to have a feature x, you write the type __x. Types are stored in + + ${__cdist_type_dir} + +And cdist ships with some types already! + +See also: + + cdist-type(7) + +eof +__prompt "Press enter to see available types" + +set -x +ls ${__cdist_type_dir} +set +x + +cat << eof + +Types consist of the following parts: + + - ${__cdist_name_parameter} (${__cdist_name_parameter_required}/${__cdist_name_parameter_optional} + - ${__cdist_name_manifest} + - ${__cdist_name_explorer} + - ${__cdist_name_gencode} + +eof +__prompt "$continue" + + +cat << eof + +Every type must have a directory named ${__cdist_name_parameter}, which +contains required or optional parameters (in newline seperated files). + +If an object of a specific type was created in the initial manifest, +the manifest of the type is run and may create other objects. + +A type may have ${__cdist_name_explorer}, which are very similar to the +${__cdist_name_explorer} seen above, but with a different purpose: +They are specific to the type and are not relevant for other types. + +You may use them for instance to find out details on the target host, +so you can decide what to do on the target host eventually. + +After the ${__cdist_name_manifest} and the ${__cdist_name_explorer} of +a type have been run, ${__cdist_name_gencode} is executed, which creates +code to be executed on the target on stdout. + +eof +__prompt "$continue" + +################################################################################ +# Deployment +# + +cat << eof + +Now you've got some basic knowledge about cdist, let's configure your localhost! + +Ensure that you have a ssh server running locally and that you can login as root. + +The cdist distribution contains some sensible default initial manifest, which +will create 2 files, /etc/cdist-configured (for every host) and +/tmp/cdist-testfile (only for localhost). + +eof + +cmd="cdist-deploy-to localhost" + +__prompt "Press enter to run \"$cmd\"" + +# No quotes, we need field splitting +$cmd diff --git a/conf/manifest/init b/conf/manifest/init index 17ba0e92..e6cf47d5 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -10,7 +10,6 @@ __file /etc/cdist-configured --type file case "$__target_host" in # Everybody has this localhost) - __issue iddoesnotmatterhere __file test --type file --destination /tmp/cdist-testfile ;; @@ -29,4 +28,7 @@ case "$__target_host" in __package_apt zsh --state installed __package_apt apache2 --state deinstalled ;; + kr) + __issue iddoesnotmatterhere + ;; esac From 7b3cee877d43684717fc7ef24eac9206f9c65230 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Mar 2011 02:08:05 +0100 Subject: [PATCH 0521/6109] next todo Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 +- doc/dev/todo/niconext | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cdist-config b/bin/cdist-config index ed19e70d..21a5c811 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -26,7 +26,7 @@ __cdist_version="$(git describe)" ################################################################################ # cconf standard vars prefixed with cdist -# + __cdist_pwd="$(pwd -P)" __cdist_mydir="${0%/*}"; __cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index d92277c8..5fec3d29 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -2,3 +2,4 @@ Prepare documentation for 1.0.0. - Check all references in manpages - cdist.text, cdist-quickstart - write cdist-quickstart + - fix cdist-config / version on remote! From f3eb9368cd90ea74dc70f1de525be6afa5f33c2e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Mar 2011 09:07:48 +0100 Subject: [PATCH 0522/6109] always chdir to git dir before getting version 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 21a5c811..40dd21b4 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -22,8 +22,6 @@ # Fail if something bogus is going on and export all variables set -u -__cdist_version="$(git describe)" - ################################################################################ # cconf standard vars prefixed with cdist @@ -33,6 +31,8 @@ __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)" + ################################################################################ # Names / Constants # From 1ee4647b2814d9400100e0d05150be9e37052b1c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Mar 2011 09:07:59 +0100 Subject: [PATCH 0523/6109] make version static on remote side Signed-off-by: Nico Schottelius --- bin/cdist-bin-transfer | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/cdist-bin-transfer b/bin/cdist-bin-transfer index d7a1dbe3..51cc5079 100755 --- a/bin/cdist-bin-transfer +++ b/bin/cdist-bin-transfer @@ -41,4 +41,11 @@ ssh "${__cdist_remote_user}@${__cdist_target_host}" \ # Transfer cdist-* to the remote host scp -qr "${__cdist_src_base}"* \ - "root@${__cdist_target_host}:${__cdist_my_remote_out_dir}" + "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_my_remote_out_dir}" + +# Adjust cdist-config to contain static version string +tmp_version="$__cdist_version" +sed "s/^\(__cdist_version=\).*/\1\"$tmp_version\"/" "$(which cdist-config)" | \ + ssh -q "${__cdist_remote_user}@${__cdist_target_host}" \ + "cat > \"${__cdist_my_remote_out_dir}\"/cdist-config" + From 054cb7e6112f1ce44c11fc62c2845d06370569ff Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Mar 2011 09:15:18 +0100 Subject: [PATCH 0524/6109] ensure cdist-type-emulator has __cdist_version set before and does not run git Signed-off-by: Nico Schottelius --- bin/cdist-bin-transfer | 2 +- bin/cdist-config | 2 +- bin/cdist-manifest-run | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cdist-bin-transfer b/bin/cdist-bin-transfer index 51cc5079..7b98de28 100755 --- a/bin/cdist-bin-transfer +++ b/bin/cdist-bin-transfer @@ -45,7 +45,7 @@ scp -qr "${__cdist_src_base}"* \ # Adjust cdist-config to contain static version string tmp_version="$__cdist_version" -sed "s/^\(__cdist_version=\).*/\1\"$tmp_version\"/" "$(which cdist-config)" | \ +sed "s/^: \${\(__cdist_version\):=.*/\1=\"$tmp_version\"/" "$(which cdist-config)" | \ ssh -q "${__cdist_remote_user}@${__cdist_target_host}" \ "cat > \"${__cdist_my_remote_out_dir}\"/cdist-config" diff --git a/bin/cdist-config b/bin/cdist-config index 40dd21b4..fd0ae9ab 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:="$(cd "$__cdist_abs_mydir/.." && git describe)"} ################################################################################ # Names / Constants diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 7f5cdea7..240d446b 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -34,7 +34,7 @@ __cdist_output_dir="$1"; shift __cdist_work_dir="$__cdist_local_base_dir" # Export information for cdist-type-emulator -export __cdist_conf_dir __cdist_output_dir __cdist_manifest +export __cdist_conf_dir __cdist_output_dir __cdist_manifest __cdist_version # Export information for manifests export __global="$__cdist_out_dir" From f227f1bba2a908339afaa18de6fbfcad100a1405 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Mar 2011 10:58:26 +0100 Subject: [PATCH 0525/6109] update readme Signed-off-by: Nico Schottelius --- REAL_README | 68 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 29 deletions(-) diff --git a/REAL_README b/REAL_README index 5b950519..238baa22 100644 --- a/REAL_README +++ b/REAL_README @@ -1,5 +1,7 @@ [[!meta title="cdist - configuration management"]] +[[!toc levels=2]] + ## Introduction cdist configures your system and is similar to @@ -11,21 +13,20 @@ and [puppet](http://www.puppetlabs.com/), but it ticks differently: * cdist sticks completly to the KISS (keep it simple and stupid) paradigma - * cdist's core is very small (currently around 400 lines of code) + * cdist's core is very small (< 1k lines of code) * There is only one type to extend cdist called ***type***. + * One main development target: ***It must be incredible easy to add new types.*** * cdist is UNIX * It reuses existing tools like cat, find, mv, ... * cdist's documentation is bundled as manpages * cdist is written in POSIX shell * No special requirements like high level interpreters needed on server or target -MAIN AIM: It MUST be incredible easy/dumb to add new types. - ### Architecture * Push mode (server pushes configuration) - * Pull mode (client triggers configuration) + * Pull mode planned (client triggers configuration) * User defines configuration in shell scripts (called ***manifests***) * Cdist generates internal configuration (cconfig style) and afterwards applies configuration @@ -56,35 +57,48 @@ but is not. Or: The reason why I began to write cdist. ### Server * A posix like shell - * SSH-Client (for push architecture) - * SSH-Server (for pull architecture) + * SSH-Client -### Client +### Client ("target host") * A posix like shell - * SSH-Client (for pull architecture) - * SSH-Server (for push architecture) + * SSH-Server -## Installation -Cdist stable always in master +## Getting cdist - * Create a new unpriviliged user (probably "cdist") - * Become that user, execute the following code: +You can clone cdist from git, which gives you the advantage of having +a version control in place for development of your own stuff as well. -git clone git://git.schottelius.org/cdist -cd cdist -export PATH=$PATH:$(pwd -P)/bin +There are at least two branches available: + + * 1.0: stable branch of version 1.0 + * next: preparing next cdist version + +Other branches may be available as well for features or bugfixes, but they +may vanish at any point. + + +### Installation + +To install cdist, execute the following commands: + + git clone git://git.schottelius.org/cdist + cd cdist + export PATH=$PATH:$(pwd -P)/bin + + +### Update + +As the stable branch always contains the stable code, you can upgrade +cdist using + + git pull + +If there are any incompatibilities, at least the minor version (1.0 -> 1.1) +will change and thus a git pull will never break your cdist installation +(in theory). -That's it. - -Operation on the server is run as "cdist" user. -Operation on the client is run as "root" user. - -## Update - -git pull && make install - ## Support ### IRC @@ -96,7 +110,3 @@ 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). - -## Commercial Support - -To be done. From 1b9cc2bb70dda4b72ca751eb857112831d4a14e9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Mar 2011 11:02:28 +0100 Subject: [PATCH 0526/6109] finish cdist-quickstart Signed-off-by: Nico Schottelius --- bin/cdist-quickstart | 15 +++++++++++++++ doc/dev/todo/niconext | 4 +--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/bin/cdist-quickstart b/bin/cdist-quickstart index e853e5ee..781c1b45 100755 --- a/bin/cdist-quickstart +++ b/bin/cdist-quickstart @@ -248,3 +248,18 @@ __prompt "Press enter to run \"$cmd\"" # No quotes, we need field splitting $cmd + +################################################################################ +# End +# + +cat << eof + +That's it, this is the end of the cdist-introduction. + +I hope you've got some impression on how cdist works, here are again some +pointers on where to continue to read: + +cdist(7), cdist-deploy-to(1), cdist-type(7), cdist-stages(7) + +eof diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 5fec3d29..ce5c9c60 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,5 +1,3 @@ Prepare documentation for 1.0.0. - Check all references in manpages - - cdist.text, cdist-quickstart - - write cdist-quickstart - - fix cdist-config / version on remote! + - cdist.text From 969eba2195bacc8f845f650de890926c23a6e567 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Mar 2011 11:05:45 +0100 Subject: [PATCH 0527/6109] pointer to cdist-quickstart on website Signed-off-by: Nico Schottelius --- REAL_README | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/REAL_README b/REAL_README index 238baa22..03c0afc6 100644 --- a/REAL_README +++ b/REAL_README @@ -88,6 +88,10 @@ To install cdist, execute the following commands: export PATH=$PATH:$(pwd -P)/bin +Afterwards you can run ***cdist-quickstart*** to get an impression on +how to use cdist. + + ### Update As the stable branch always contains the stable code, you can upgrade From 33005eb794ba5e6010dbc24a4ebd25d151d2b236 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Mar 2011 11:09:52 +0100 Subject: [PATCH 0528/6109] update hackers readme Signed-off-by: Nico Schottelius --- HACKERS_README | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index 7f42b3fa..fa01666f 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -2,13 +2,16 @@ cat << eof Hey hackers, -cdist has not been published, you're accessing a early in developent -code. +this README is for you, for those who want to dig into cdist, hack it or try +to get a deeper understanding. -Do not believe anything written in cdist, besides what's written in this file -(everything else may be future stuff for the initial release). +A lot of documentation is still missing, but running cdist-quickstart should +give you an impression of how cdist works. - -- Nico, 20101201 +I hope you have a lot of fun with cdist, because it was also a lot of fun to +develop it! + + -- Nico, 20110304 ## Conventions From 0f6bfb304e1f24ae2a459f160c6cd9855141c9e2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Mar 2011 15:02:56 +0100 Subject: [PATCH 0529/6109] master == dev Signed-off-by: Nico Schottelius --- README | 2 +- REAL_README | 35 ++++++++++++++++++++--------------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/README b/README index 585317cb..ace36209 120000 --- a/README +++ b/README @@ -1 +1 @@ -HACKERS_README \ No newline at end of file +REAL_README \ No newline at end of file diff --git a/REAL_README b/REAL_README index 03c0afc6..25e6bb4c 100644 --- a/REAL_README +++ b/REAL_README @@ -70,15 +70,6 @@ but is not. Or: The reason why I began to write cdist. You can clone cdist from git, which gives you the advantage of having a version control in place for development of your own stuff as well. -There are at least two branches available: - - * 1.0: stable branch of version 1.0 - * next: preparing next cdist version - -Other branches may be available as well for features or bugfixes, but they -may vanish at any point. - - ### Installation To install cdist, execute the following commands: @@ -91,18 +82,32 @@ To install cdist, execute the following commands: Afterwards you can run ***cdist-quickstart*** to get an impression on how to use cdist. +### Available versions + +There are at least two branches available: + + * master: the development branch + * 1.0: stable branch of version 1.0 + +Other branches may be available as well for features or bugfixes, but they +may vanish at any point. To select a specific branch use + + # Generic code + git checkout -b origin/ + + # Stay on version 1.0 + git checkout -b 1.0 origin/1.0 ### Update -As the stable branch always contains the stable code, you can upgrade -cdist using +To upgrade cdist in the current branch use git pull -If there are any incompatibilities, at least the minor version (1.0 -> 1.1) -will change and thus a git pull will never break your cdist installation -(in theory). - +The version branches are designed to change if there are incompatibilities. +Or the other way round: As long as you stay on 1.0 and do git pull, nothing +should break. + ## Support ### IRC From 390543ee675db16c93f37516ecedb6e11818d423 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Mar 2011 15:04:52 +0100 Subject: [PATCH 0530/6109] remove install targets - not needed Signed-off-by: Nico Schottelius --- Makefile | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Makefile b/Makefile index 476bc89a..4769d40e 100644 --- a/Makefile +++ b/Makefile @@ -36,19 +36,6 @@ doc/man/.marker: $(MANSRC) clean: rm -f doc/man/*.html doc/man/*.[1-9] -################################################################################ -# Install targets -# - -# FIXME: some distro nerd, can you make this more beautiful? -# Like integrating install, ... -# I'm just a hacker, I don't really care... -install: install-man - cp bin/* $(BINDIR) - -install-man: - for p in doc/man/*.[1-9]; do n=$${p##*.}; cp $$p $(MANDIR)/man$$n/; done - ################################################################################ # Developer targets # From bfaa027452cb6d63374f8594025803d8fa3b3146 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Mar 2011 15:06:00 +0100 Subject: [PATCH 0531/6109] less todo for 1.0.0 Signed-off-by: Nico Schottelius --- TODO-1.0 | 58 +------------------------------------------ doc/dev/todo/post-1.0 | 53 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 57 deletions(-) diff --git a/TODO-1.0 b/TODO-1.0 index 6061b6f1..8245a02c 100644 --- a/TODO-1.0 +++ b/TODO-1.0 @@ -42,61 +42,5 @@ x generate code to be executed on clients (stage 4) x execute code on client (stage 5) -- make cdist run from checkout +x make cdist run from checkout - -- Last doc stuff for 1.0.0: - - - = todo - + = in progress -> S|N - x = done - - - x remove old documentation from doc/man/! - - Check all references in manpages, ensure all manpages exist, generic ones: - + cdist - + cdist-deploy-to - + cdist-manifest - - cdist-quickstart: how to get started - - cdist-type [IMPORTANT] - - only do necessary work [TYPE IMPLEMENTATION HINTS] - - install packages only if not existent - - copy file only if different - - DOC document that $type/manifest is executed for every object/instance - - cdist-explorer - - exported variables: - - general explorer: __explorer # cdist-explorer - - initial manifest: __manifest, __global # cdist-manifest - - type manifests __object, __object_id, __global # cdist-type - - type explorers: __object, __object_id, __type_explorers # cdist-type - - type codegen: __object, __object_id, __global # cdist-type - - type code: - # cdist-code - - cdist-type-integration - - Ensure available types are documented (!) - - define how to in cdist-type-integration - - referenced on the webpage via cdist-type(7)! - - ensure every file in bin/ has a correspondent manpage - - cdist-bin-transfer - - cdist-code-run-all - - cdist-config - - cdist-deploy-to - - cdist-dir - - cdist-explorer-run-init - - cdist-manifest-run - - cdist-manifest-run-all - - cdist-manifest-run-init - - cdist-object-codegen - - cdist-object-codegen-all - - cdist-object-explorer-all - - cdist-quickstart - - cdist-remote-code-run-all - - cdist-remote-explorer-run - - cdist-run-remote - - cdist-type-build-emulation - - cdist-type-emulator - - Cleanup READMEs - - Ensure html output of manpages are published on the web - -- Makefile: - - Add install target - - Include manpage generation diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index 379fa214..e469214e 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -40,3 +40,56 @@ Documentation: - Different environments (production, integration, development) - via version control - Define how to raise errors in types + + - = todo + + = in progress -> S|N + x = done + + + x remove old documentation from doc/man/! + - Check all references in manpages, ensure all manpages exist, generic ones: + + cdist + + cdist-deploy-to + + cdist-manifest + - cdist-quickstart: how to get started + - cdist-type [IMPORTANT] + - only do necessary work [TYPE IMPLEMENTATION HINTS] + - install packages only if not existent + - copy file only if different + - DOC document that $type/manifest is executed for every object/instance + - cdist-explorer + - exported variables: + - general explorer: __explorer # cdist-explorer + - initial manifest: __manifest, __global # cdist-manifest + - type manifests __object, __object_id, __global # cdist-type + - type explorers: __object, __object_id, __type_explorers # cdist-type + - type codegen: __object, __object_id, __global # cdist-type + - type code: - # cdist-code + - cdist-type-integration + - Ensure available types are documented (!) + - define how to in cdist-type-integration + - referenced on the webpage via cdist-type(7)! + - ensure every file in bin/ has a correspondent manpage + - cdist-bin-transfer + - cdist-code-run-all + - cdist-config + - cdist-deploy-to + - cdist-dir + - cdist-explorer-run-init + - cdist-manifest-run + - cdist-manifest-run-all + - cdist-manifest-run-init + - cdist-object-codegen + - cdist-object-codegen-all + - cdist-object-explorer-all + - cdist-quickstart + - cdist-remote-code-run-all + - cdist-remote-explorer-run + - 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 From 62b392e65d1d551264184e91438fe7ea5f5fac86 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Mar 2011 15:11:37 +0100 Subject: [PATCH 0532/6109] use __global in type __package Signed-off-by: Nico Schottelius --- conf/type/__package/manifest | 2 +- doc/dev/todo/niconext | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/conf/type/__package/manifest b/conf/type/__package/manifest index 89b3f179..cf085e2f 100755 --- a/conf/type/__package/manifest +++ b/conf/type/__package/manifest @@ -28,7 +28,7 @@ if [ -f "$type" ]; then type="$(cat "$type")" else # By default determine package manager based on operating system - os="$(cat "out/explorer/os")" + os="$(cat "$__global/explorer/os")" case "$os" in archlinux) type="pacman" ;; debian|ubuntu) type="apt" ;; diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index ce5c9c60..6a7da465 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,3 +1 @@ -Prepare documentation for 1.0.0. - - Check all references in manpages - - cdist.text +Prepare release 1.0.0 From b36f644b90ea7bd67f9b9b59ab9098b5124841b3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 4 Mar 2011 15:18:59 +0100 Subject: [PATCH 0533/6109] remove todo file for 1.0 Signed-off-by: Nico Schottelius --- TODO-1.0 | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 TODO-1.0 diff --git a/TODO-1.0 b/TODO-1.0 deleted file mode 100644 index 8245a02c..00000000 --- a/TODO-1.0 +++ /dev/null @@ -1,46 +0,0 @@ -Steps needed until 1.0: - - x finish type __file - - finish type __package - - cleanup documentation (see below) - --------------------------------------------------------------------------------- - -This document defines how to continue work on cdist: - -x general stuff - x Define configuration paths (doc/internal/config-layout) - x check whether remote and local view of objects can be the same, - i.e. local:/outdir == remote:/var/lib/cdist - x similar, but not the same - -x get information from target (stage 1) - x Define how to get information from targets - x Create shell script that creates code to run on client (cdist-build-explorer) - x Redo explorers (see manpage) -x run initial manifest (stage 2) - x Create configuration tree from manifest - x write binaries, which create the tree when called from manifest (cdist_tree_wrapper) - -x be able to run manifest of types (stage 3) - x Parse configuration tree/objects recursively - x can/may types modify tree? - -> yes, of everything a type created itself! - x may open door for getting information from manifest / other stuff - x Cleanly define paths for object creation, especially recursive calls - x doc/man/cdist-config-layout.text - x cd $__object_dir, before running manifest - x rename $__object_dir to $__object_base_dir - x use $type/manifest instead of $type/init - x find $object_id in recursive runner (before merge) - x move parameters of object to subdir parameter - x run explorers for every object - -x generate code to be executed on clients (stage 4) - x for one object - x for all objects - -x execute code on client (stage 5) - -x make cdist run from checkout - From b08d50db79ef6b1c4db27bc52f3d884a69b77b69 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 5 Mar 2011 11:36:02 +0100 Subject: [PATCH 0534/6109] put manpages into man1, man7, etc., suitable for uusing with MANPATH Signed-off-by: Nico Schottelius --- Makefile | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 4769d40e..23b7962d 100644 --- a/Makefile +++ b/Makefile @@ -8,29 +8,40 @@ A2X=a2x -f manpage --no-xmllint WEBDIR=$$HOME/niconetz WEBPAGE=software/cdist.mdwn -MANSRC=doc/man/cdist-config-layout.text \ - doc/man/cdist-config.text \ - doc/man/cdist-explorer.text \ - doc/man/cdist-quickstart.text \ - doc/man/cdist-stages.text \ - doc/man/cdist-terms.text \ - doc/man/cdist-type.text +MANDIR=doc/man +MANSRC=$(MANDIR)/cdist-config-layout.text \ + $(MANDIR)/cdist-config.text \ + $(MANDIR)/cdist-explorer.text \ + $(MANDIR)/cdist-quickstart.text \ + $(MANDIR)/cdist-stages.text \ + $(MANDIR)/cdist-terms.text \ + $(MANDIR)/cdist-type.text -MANSRC=doc/man/cdist.text \ - doc/man/cdist-deploy-to.text \ - doc/man/cdist-manifest.text \ +MANSRC=$(MANDIR)/cdist.text \ + $(MANDIR)/cdist-deploy-to.text \ + $(MANDIR)/cdist-manifest.text \ ################################################################################ # User targets # -all: man +all: + @echo '' + @echo 'Welcome to cdist!' + @echo '' + @echo 'Here are the possible targets:' + @echo '' + @echo ' man: Build manpages' + @echo ' clean: Remove build stuff' + @echo '' + @echo '' man: doc/man/.marker doc/man/.marker: $(MANSRC) - for man in $(MANSRC); do $(A2X) $$man; done + for mansrc in $(MANSRC); do $(A2X) $$mansrc; done + for manpage in $(MANDIR)/*.[1-9]; do cat=$${manpage##*.}; echo $$cat; mandir=$(MANDIR)/man$$cat; mkdir -p $$mandir; mv $$manpage $$mandir; done touch $@ clean: From 14e7427508d4eba522125bb415b18139e68b120a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 13:32:14 +0100 Subject: [PATCH 0535/6109] add macosx support to explorer/os Signed-off-by: Nico Schottelius --- conf/explorer/os | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/conf/explorer/os b/conf/explorer/os index ce2d9c80..45b72a68 100755 --- a/conf/explorer/os +++ b/conf/explorer/os @@ -28,15 +28,37 @@ if grep -q ^DISTRIB_ID=Ubuntu /etc/lsb-release 2>/dev/null; then exit 0 fi -[ -f /etc/arch-release ] && echo archlinux +if [ -f /etc/arch-release ]; then + echo archlinux + exit 0 +fi -[ -f /etc/debian_version ] && echo debian +if [ -f /etc/debian_version ]; then + echo debian + exit 0 +fi -[ -f /etc/gentoo-release ] && echo gentoo +if [ -f /etc/gentoo-release ]; then + echo gentoo + exit 0 +fi -[ -f /etc/redhat-release ] && echo redhat +if [ -f /etc/redhat-release ]; then + echo redhat + exit 0 +fi -[ -f /etc/SuSE-release ] && echo suse +if [ -f /etc/SuSE-release ]; then + echo suse + exit 0 +fi -# ensure correct exit, otherwise other explorer won't get started -exit 0 +case "$(uname -s)" in + Darwin) + echo macosx + exit 0 + ;; +esac + +echo "Unknown OS" >&2 +exit 1 From e896fc6d4e7149e5d16e5a12664e6bfa3574e56f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 13:56:18 +0100 Subject: [PATCH 0536/6109] explorer/os: add support for *bsd Signed-off-by: Nico Schottelius --- conf/explorer/os | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/conf/explorer/os b/conf/explorer/os index 45b72a68..fc8531e8 100755 --- a/conf/explorer/os +++ b/conf/explorer/os @@ -53,10 +53,24 @@ if [ -f /etc/SuSE-release ]; then exit 0 fi -case "$(uname -s)" in +uname_s="$(uname -s)" + +# Assume there is no tr on the client -> do lower case ourselves +case "$uname_s" in Darwin) echo macosx exit 0 + NetBSD) + echo netbsd + exit 0 + ;; + FreeBSD) + echo freebsd + exit 0 + ;; + OpenBSD) + echo openbsd + exit 0 ;; esac From 81acb39ad61fd87fe2b689579f740b0b9480dc1a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 13:56:29 +0100 Subject: [PATCH 0537/6109] explorer/os: add support for solaris Signed-off-by: Nico Schottelius --- conf/explorer/os | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conf/explorer/os b/conf/explorer/os index fc8531e8..31d5e0a9 100755 --- a/conf/explorer/os +++ b/conf/explorer/os @@ -72,6 +72,10 @@ case "$uname_s" in echo openbsd exit 0 ;; + SunOS) + echo solaris + exit 0 + ;; esac echo "Unknown OS" >&2 From acf65488d6f2f0c49e52ec79ca25a37078c5db41 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 14:13:29 +0100 Subject: [PATCH 0538/6109] readme cleanup Signed-off-by: Nico Schottelius --- REAL_README | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/REAL_README b/REAL_README index 25e6bb4c..10b1b812 100644 --- a/REAL_README +++ b/REAL_README @@ -22,13 +22,14 @@ it ticks differently: * cdist is written in POSIX shell * No special requirements like high level interpreters needed on server or target - ### Architecture * Push mode (server pushes configuration) * Pull mode planned (client triggers configuration) * User defines configuration in shell scripts (called ***manifests***) - * Cdist generates internal configuration (cconfig style) and afterwards applies configuration + * Generates internal configuration (cconfig style) + * Uses ***types*** to generate code be executed on the target + * And finally executes the code on the target / applies the configuration ### Features From 04a876536d4ab2865615abf5eb93fd362ebaaa9b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 14:23:35 +0100 Subject: [PATCH 0539/6109] +roadmap Signed-off-by: Nico Schottelius --- REAL_README | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/REAL_README b/REAL_README index 10b1b812..7cefb29e 100644 --- a/REAL_README +++ b/REAL_README @@ -53,6 +53,14 @@ but is not. Or: The reason why I began to write cdist. * sh * find, rm, ... +### Roadmap + +[[!table data=""" +**Version** | **Objectives** | **Status** +1.0.0 | Initial release | +1.0.1 | Documentation cleanup | +"""]] + ## Requirements ### Server From 4e4e53aebd4a1d2ed7ee78d1d89ea866ea3155c0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 14:25:35 +0100 Subject: [PATCH 0540/6109] +;; (esac) Signed-off-by: Nico Schottelius --- conf/explorer/os | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/explorer/os b/conf/explorer/os index 31d5e0a9..f7481193 100755 --- a/conf/explorer/os +++ b/conf/explorer/os @@ -60,6 +60,7 @@ case "$uname_s" in Darwin) echo macosx exit 0 + ;; NetBSD) echo netbsd exit 0 From 5b2c52b977db9c98672cf7274062be26e7e1eff1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 17:51:34 +0100 Subject: [PATCH 0541/6109] __file: support md5 of macosx Signed-off-by: Nico Schottelius --- conf/type/__file/explorer/md5sum | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/conf/type/__file/explorer/md5sum b/conf/type/__file/explorer/md5sum index a8ce6152..b2867385 100755 --- a/conf/type/__file/explorer/md5sum +++ b/conf/type/__file/explorer/md5sum @@ -27,9 +27,21 @@ else destination="/$__object_id" fi +os="$(cat $__global/explorer/os)" + +case "$os" in + macosx) + md5sum="md5" + ;; + + *) + md5sum="md5sum" + ;; +esac + # No output if file does not exist - does definitely not match the md5sum :-) if [ -e "$destination" ]; then - md5sum < "$destination" + $md5sum < "$destination" else echo "NO FILE FOUND, NO CHECKSUM CALCULATED." fi From d3fe22b28196195306e5b41c448acecbb6d79bdf Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 18:04:59 +0100 Subject: [PATCH 0542/6109] update __file to allow md5 also locally Signed-off-by: Nico Schottelius --- conf/type/__file/gencode | 14 ++++++++++++-- doc/dev/logs/2011-03-07 | 9 +++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 doc/dev/logs/2011-03-07 diff --git a/conf/type/__file/gencode b/conf/type/__file/gencode index 4d4a9a1e..0f3b1bf8 100755 --- a/conf/type/__file/gencode +++ b/conf/type/__file/gencode @@ -40,16 +40,26 @@ if ! $(echo "$destination" | grep -q ^/); then exit 1 fi +case "$os" in + macosx) + md5sum="md5" + ;; + + *) + md5sum="md5sum" + ;; +esac + # Copy source if existing # FIXME: directory handling not supported - add recursive flag? if [ -f "$__object/parameter/source" ]; then source="$(cat "$__object/parameter/source")" - md5sum="$(md5sum < "$source")" + local_md5sum="$($md5sum < "$source")" remote_md5sum="$(cat "$__object/explorer/md5sum")" # Is md5sum the right approach? - if [ "$md5sum" != "$remote_md5sum" ]; then + 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 diff --git a/doc/dev/logs/2011-03-07 b/doc/dev/logs/2011-03-07 new file mode 100644 index 00000000..35dff279 --- /dev/null +++ b/doc/dev/logs/2011-03-07 @@ -0,0 +1,9 @@ +Update on env: + + general explorer: __explorer + initial manifest: __manifest, __global + type manifests __object, __object_id, __global + type explorers: __object, __object_id, __type_explorers, __global + type codegen: __object, __object_id, __global + type code: - + From 3cd90300f130f14bf5dab705495ff4d7fc2e02c2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 18:05:13 +0100 Subject: [PATCH 0543/6109] export __global in cdist-remote-explorer-run Signed-off-by: Nico Schottelius --- bin/cdist-remote-explorer-run | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/cdist-remote-explorer-run b/bin/cdist-remote-explorer-run index 7064a323..0dae3007 100755 --- a/bin/cdist-remote-explorer-run +++ b/bin/cdist-remote-explorer-run @@ -39,12 +39,10 @@ __cdist_explorer_dir="$1"; shift # Write output here __cdist_my_out_dir="$1"; shift -# cd to this dir -__cdist_work_dir="$__cdist_remote_base_dir" - # Setup environment export $__cdist_variable_name="$__cdist_explorer_dir" -cd "${__cdist_work_dir}" +export __global="$__cdist_remote_out_dir" + mkdir -p "$__cdist_my_out_dir" # Ensure there is at least one explorer From 65442ab6822a25d81f71060322052512d1d22e06 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 19:24:29 +0100 Subject: [PATCH 0544/6109] todo for nico Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 3 ++- doc/dev/todo/post-1.0 | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 6a7da465..8a2ba8e3 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1 +1,2 @@ -Prepare release 1.0.0 +Documentation cleanup + - cdist-bin-transfer diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index e469214e..f15b3280 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -1,9 +1,6 @@ Core: - Support singletons (see types/issue for a good reason) - probably name them only_once and use that as the internal id! - - remove remote_base_dir at beginning - otherwise fragments from - previous runs may still be existing! - -> probably also local_base_dir! - cdist-deploy-to: Configure more than one host - plus parallel mode like in ccollect @@ -70,7 +67,6 @@ Documentation: - define how to in cdist-type-integration - referenced on the webpage via cdist-type(7)! - ensure every file in bin/ has a correspondent manpage - - cdist-bin-transfer - cdist-code-run-all - cdist-config - cdist-deploy-to From ca8173b57313a87f8ac7e18206726e89aa2980e0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 19:49:21 +0100 Subject: [PATCH 0545/6109] todos / nico updated Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 6 ++++++ doc/dev/todo/post-1.0 | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 8a2ba8e3..bf9562f0 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,2 +1,8 @@ Documentation cleanup - cdist-bin-transfer + - cdist-type-integration + - Ensure available types are documented (!) + - define how to in cdist-type-integration + - referenced on the webpage via cdist-type(7)! + + diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index f15b3280..68dee6b4 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -62,10 +62,6 @@ Documentation: - type explorers: __object, __object_id, __type_explorers # cdist-type - type codegen: __object, __object_id, __global # cdist-type - type code: - # cdist-code - - cdist-type-integration - - Ensure available types are documented (!) - - define how to in cdist-type-integration - - referenced on the webpage via cdist-type(7)! - ensure every file in bin/ has a correspondent manpage - cdist-code-run-all - cdist-config From 25fc1cfdfefa1eaf8497acb8ff567975fb57d2b3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 19:51:36 +0100 Subject: [PATCH 0546/6109] add template for cdist-bin-transfer.text Signed-off-by: Nico Schottelius --- doc/man/cdist-bin-transfer.text | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 doc/man/cdist-bin-transfer.text diff --git a/doc/man/cdist-bin-transfer.text b/doc/man/cdist-bin-transfer.text new file mode 100644 index 00000000..e09cba0a --- /dev/null +++ b/doc/man/cdist-bin-transfer.text @@ -0,0 +1,42 @@ +cdist-deploy-to(1) +================== +Nico Schottelius + + +NAME +---- +cdist-deploy-to - Deploy configuration to host + + +SYNOPSIS +-------- +cdist-deploy-to HOSTNAME + + +DESCRIPTION +----------- +Deploy configurations to the specified host, as configured in the initial +manifest. This script triggers the execution of several other scripts, in so +called stages. It is intented to run either from the command line or from cron. + + +ENVIRONMENT +----------- +If the environment variable **__cdist_conf_dir** is not set, the +configuration is read from /etc/cdist. The local output directory can +be changed by the variable **__cdist_local_base_dir**. All environment +variables are handled by cdist-config. + + +SEE ALSO +-------- +cdist(7), +cdist-config(1), +cdist-config-layout(7), +cdist-stages(7) + + +COPYING +------- +Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). From dd840ce27845fef427abab555a3b93cd1eb173b6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 20:27:47 +0100 Subject: [PATCH 0547/6109] [DOC] finish cdist-bin-transfer Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 1 - doc/man/cdist-bin-transfer.text | 30 +++++++++--------------------- 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index bf9562f0..91528541 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,5 +1,4 @@ Documentation cleanup - - cdist-bin-transfer - cdist-type-integration - Ensure available types are documented (!) - define how to in cdist-type-integration diff --git a/doc/man/cdist-bin-transfer.text b/doc/man/cdist-bin-transfer.text index e09cba0a..9a9e0a4b 100644 --- a/doc/man/cdist-bin-transfer.text +++ b/doc/man/cdist-bin-transfer.text @@ -1,42 +1,30 @@ -cdist-deploy-to(1) -================== +cdist-bin-transfer(1) +===================== Nico Schottelius NAME ---- -cdist-deploy-to - Deploy configuration to host +cdist-bin-transfer SYNOPSIS -------- -cdist-deploy-to HOSTNAME +cdist-deploy-to HOSTNAME REMOTE_DIR DESCRIPTION ----------- -Deploy configurations to the specified host, as configured in the initial -manifest. This script triggers the execution of several other scripts, in so -called stages. It is intented to run either from the command line or from cron. - - -ENVIRONMENT ------------ -If the environment variable **__cdist_conf_dir** is not set, the -configuration is read from /etc/cdist. The local output directory can -be changed by the variable **__cdist_local_base_dir**. All environment -variables are handled by cdist-config. - +cdist-bin-transfer copies all cdist binaries to the given host HOSTNAME +into the given directory REMOTE_DIR. These binaries will be used in +further stages to retrieve information or apply configurations. SEE ALSO -------- -cdist(7), -cdist-config(1), -cdist-config-layout(7), -cdist-stages(7) +cdist(7) COPYING ------- -Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +Copyright \(C) 2011 Nico Schottelius. Free use of this software is granted under the terms of the GNU General Public License version 3 (GPLv3). From 70494afbca506bc3e63df2c68d5e7c8243543aae Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 20:42:41 +0100 Subject: [PATCH 0548/6109] begin to write cdist-type.text Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 2 +- doc/man/to_check/cdist-type.text | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 91528541..a9bc41ae 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -4,4 +4,4 @@ Documentation cleanup - define how to in cdist-type-integration - referenced on the webpage via cdist-type(7)! - + - how to debug explorer and codegen diff --git a/doc/man/to_check/cdist-type.text b/doc/man/to_check/cdist-type.text index a2e2cc49..db77d345 100644 --- a/doc/man/to_check/cdist-type.text +++ b/doc/man/to_check/cdist-type.text @@ -39,9 +39,10 @@ with a type specific unique id that stores the parameters HOW TO WRITE A NEW TYPE (TODO) ------------------------------ -Assume you want to create the new type named "coffee": +Assume you want to create the new type named "coffee", which creates +files which contain the word "c0ffee". -Create the directory /etc/cdist/types/coffee/ +Create the directory conf/type/coffee/. Create the file /etc/cdist/types/coffee/README containing a description of the type. If your type supports attributes, create the directory /etc/cdist/types/coffee/ From 9e42ce5b4ecee58469ba970559f7211511ad511d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 22:56:27 +0100 Subject: [PATCH 0549/6109] add changelog Signed-off-by: Nico Schottelius --- doc/dev/changelog | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 doc/dev/changelog diff --git a/doc/dev/changelog b/doc/dev/changelog new file mode 100644 index 00000000..bac9d0f3 --- /dev/null +++ b/doc/dev/changelog @@ -0,0 +1,2 @@ +1.0.0: 2011-03-07 + * Initial release From f2cfebd188449071cfe2750863b55be4efe3e4f6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 23:04:15 +0100 Subject: [PATCH 0550/6109] rename *codegen -> gencode (according to manpage and the way types are defined) Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 2 +- bin/{cdist-object-codegen => cdist-object-gencode} | 0 bin/{cdist-object-codegen-all => cdist-object-gencode-all} | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename bin/{cdist-object-codegen => cdist-object-gencode} (100%) rename bin/{cdist-object-codegen-all => cdist-object-gencode-all} (96%) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index c576dfd6..5d06cf96 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -58,7 +58,7 @@ cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" # Generate code for all objects -cdist-object-codegen-all "$__cdist_target_host" "$__cdist_out_object_dir" +cdist-object-gencode-all "$__cdist_target_host" "$__cdist_out_object_dir" # Transfer all objects including code cdist-dir push "$__cdist_target_host" "$__cdist_out_object_dir" \ diff --git a/bin/cdist-object-codegen b/bin/cdist-object-gencode similarity index 100% rename from bin/cdist-object-codegen rename to bin/cdist-object-gencode diff --git a/bin/cdist-object-codegen-all b/bin/cdist-object-gencode-all similarity index 96% rename from bin/cdist-object-codegen-all rename to bin/cdist-object-gencode-all index 67f05186..40c39fd4 100755 --- a/bin/cdist-object-codegen-all +++ b/bin/cdist-object-gencode-all @@ -39,7 +39,7 @@ while read object; do code="$(__cdist_object_code "$object")" echo "Generating code for $object ..." - cdist-object-codegen "$__cdist_target_host" \ + cdist-object-gencode "$__cdist_target_host" \ "$__cdist_object_base_dir" \ "$object" > "${code}" From 2e8043b31a4ac3202df9178e20c17d54372c9b04 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 23:05:43 +0100 Subject: [PATCH 0551/6109] less todo Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.0 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index 68dee6b4..de8919f0 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -48,13 +48,11 @@ Documentation: + cdist + cdist-deploy-to + cdist-manifest - - cdist-quickstart: how to get started - cdist-type [IMPORTANT] - only do necessary work [TYPE IMPLEMENTATION HINTS] - install packages only if not existent - copy file only if different - DOC document that $type/manifest is executed for every object/instance - - cdist-explorer - exported variables: - general explorer: __explorer # cdist-explorer - initial manifest: __manifest, __global # cdist-manifest @@ -62,6 +60,10 @@ Documentation: - type explorers: __object, __object_id, __type_explorers # cdist-type - type codegen: __object, __object_id, __global # cdist-type - type code: - # cdist-code + - 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 From 54b6578d2846bd8fdff62cf837fd564a1076bdce Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 23:06:15 +0100 Subject: [PATCH 0552/6109] finish cdist-stages.text Signed-off-by: Nico Schottelius --- doc/man/{to_check => }/cdist-stages.text | 47 +++++++++++++++++------- 1 file changed, 34 insertions(+), 13 deletions(-) rename doc/man/{to_check => }/cdist-stages.text (70%) diff --git a/doc/man/to_check/cdist-stages.text b/doc/man/cdist-stages.text similarity index 70% rename from doc/man/to_check/cdist-stages.text rename to doc/man/cdist-stages.text index f82f9046..da6f4e02 100644 --- a/doc/man/to_check/cdist-stages.text +++ b/doc/man/cdist-stages.text @@ -16,14 +16,25 @@ Reading the source of the cdist-deploy-to executable shous the scripts responsible for each stage. +STAGE 0: INTERNAL PREPERATION +----------------------------- +Before running the user facing stages, cdist prepares the target host +to contain cdist binaries and creates a clean environment for the +configuration run. + +Related manpages: + - cdist-bin-transfer(1) + + STAGE 1: TARGET INFORMATION RETRIEVAL -------------------------------------- -In this stage information is collected about target using so called explorers. -Every existing explorer is run on the target and the output of all explorers -are copied back into the local cache. The results can be used by manifests and -types. +In this stage information is collected about the target host using so called +explorers. Every existing explorer is run on the target and the output of all +explorers are copied back into the local cache. The results can be used by +manifests and types. -Related manpages are cdist-explorers(7) and cdist-cache(7). +Related manpages: + - cdist-explorer(7) STAGE 2: RUN THE INITIAL MANIFEST @@ -34,8 +45,11 @@ the objects as defined in the manifest for the specific host. In this stage, no conflicts may occur, i.e. no object of the same type with the same id may be created. -Related manpages are cdist-manifest-init(1), cdist-manifests(7) and -cdist-config-layout(7). +Related manpages: + - cdist-manifest-run(1) + - cdist-manifest-run-init(1) + - cdist-manifest(7) + - cdist-config-layout(7) STAGE 3: EXECUTION OF TYPES @@ -46,13 +60,16 @@ may generate and change the created objects. In other words, one type can reuse other types. For instance the object __apache/www.test.ch is of type __apache, which may -contain an manifest script, which creates new objects of type __file. +contain a manifest script, which creates new objects of type __file. The newly created objects are merged back into the existing tree. No conflicts may occur during the merge. A conflict would mean that two different objects try to create the same object, which indicates a broken configuration. -Related manpage are cdist-types(7) and cdist-manifest-run-all(1). +Related manpages: + - cdist-type(7) + - cdist-manifest-run(1) + - cdist-manifest-run-all(1) STAGE 4: CODE GENERATION @@ -63,8 +80,10 @@ be executed. This executable should create code to be executed on the target on stdout. If the gencode executable fails, it must print diagnostic messages on stderr and exit non-zero. -Related manpages are cdist-types-gencode(7), cdist-gencode(1) and -cdist-gencode-all(1). +Related manpages: + - cdist-types-gencode(7) + - cdist-gencode(1) + - cdist-gencode-all(1) STAGE 5: CODE EXECUTION @@ -72,7 +91,9 @@ STAGE 5: CODE EXECUTION The resulting code from the previous stage is transferred to the target host and executed there to apply the configuration changes, -Related manpages are cdist-exec-transfer(1) and cdist-exec-run(1). +Related manpages: + - cdist-exec-transfer(1) + - cdist-exec-run(1) SUMMARY @@ -85,7 +106,7 @@ in correct order. SEE ALSO -------- -cdist(7), cdist-deploy-to(1), cdist-config-layout(7), cdist-manifest-init(1) +cdist(7), cdist-deploy-to(1), cdist-config-layout(7) COPYING From a4ed514a82727f251955e4287dff408f587963dc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 23:35:58 +0100 Subject: [PATCH 0553/6109] begin the "how to write a type" part Signed-off-by: Nico Schottelius --- doc/man/to_check/cdist-type.text | 44 +++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/doc/man/to_check/cdist-type.text b/doc/man/to_check/cdist-type.text index db77d345..50df4d13 100644 --- a/doc/man/to_check/cdist-type.text +++ b/doc/man/to_check/cdist-type.text @@ -1,18 +1,34 @@ -cdist-types(7) -=============== +cdist-type(7) +============== Nico Schottelius NAME ---- -cdist-types - Functionality bundled +cdist-type - Functionality bundled + + +SYNOPSIS +-------- +Other languages name this module or class DESCRIPTION ----------- +Types are the main component of cdist and define functionality. If you +use cdist, you'll write a type for every functionality you would like +to use. + + + +Was man mit cdist type machen kann..... + A cdist type describes some kind of functionality, starting from simple stuff like copying files until complex user auth/ldap/ kerberos infrastructure -designs. The name of every type is prefixed with two underscores (__), because +designs. The name of every type is prefixed with two underscores (__) by convention. + + +, because types will be executed and the two underscores prevent collisions with real binaries (like "file"). In general, types should be written independent of hosts (as in reusable @@ -37,6 +53,26 @@ Every time a type is used, a new object is created of the specific type, with a type specific unique id that stores the parameters +HOW TO WRITE A NEW TYPE +----------------------- +A type consists of + +- parameter (required) +- manifest (optional) +- gencode (optional) +- explorer (optional) + +Types are stored below conf/type/. Their name should always be prefixed with +two underscores (__) to prevent collisions with other binaries in $PATH. + +To begin a new type from a template, execute "cdist-type-template __NAME". + + +DEFINING PARAMETERS +------------------- +Every type consists of optional and + + HOW TO WRITE A NEW TYPE (TODO) ------------------------------ Assume you want to create the new type named "coffee", which creates From 5d6d316947a0b3e653005d0b154acd6626e0eb4a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 23:50:28 +0100 Subject: [PATCH 0554/6109] add template for cdist-type-template Signed-off-by: Nico Schottelius --- bin/cdist-type-template | 51 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 bin/cdist-type-template diff --git a/bin/cdist-type-template b/bin/cdist-type-template new file mode 100755 index 00000000..7b98de28 --- /dev/null +++ b/bin/cdist-type-template @@ -0,0 +1,51 @@ +#!/bin/sh +# +# 2010-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 . +# +# +# Transfer all executables +# + +. cdist-config +[ $# -eq 2 ] || __cdist_usage " " +set -eu + +__cdist_target_host="$1"; shift +__cdist_my_remote_out_dir="$1"; shift + +# Find directory that contains cdist binaries +__cdist_conf_dir_path=$(which cdist-config) +__cdist_src_base=${__cdist_conf_dir_path%config} + +# Help the user +echo "Transferring cdist binaries ..." + +# re-create basedir so it's clean +ssh "${__cdist_remote_user}@${__cdist_target_host}" \ + "rm -rf \"${__cdist_my_remote_out_dir}\" && mkdir -p \"${__cdist_my_remote_out_dir}\"" + +# Transfer cdist-* to the remote host +scp -qr "${__cdist_src_base}"* \ + "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_my_remote_out_dir}" + +# Adjust cdist-config to contain static version string +tmp_version="$__cdist_version" +sed "s/^: \${\(__cdist_version\):=.*/\1=\"$tmp_version\"/" "$(which cdist-config)" | \ + ssh -q "${__cdist_remote_user}@${__cdist_target_host}" \ + "cat > \"${__cdist_my_remote_out_dir}\"/cdist-config" + From 1d234550df376b2da1c4923cbbc4c6961290d312 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Mar 2011 23:55:46 +0100 Subject: [PATCH 0555/6109] add __cdist_type_param_dir Signed-off-by: Nico Schottelius --- bin/cdist-config | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index fd0ae9ab..504970d1 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -196,13 +196,14 @@ __cdist_type_gencode() echo "${__cdist_type_dir}/$1/${__cdist_name_gencode}" } +__cdist_type_param_dir() +{ + echo "$(__cdist_type_dir "$1")/${__cdist_name_parameter}" +} + __cdist_type_param_file() { - # FIXME: local == posix? - local type="$1"; shift - local paramtype="$1"; shift - - echo "${__cdist_type_dir}/${type}/${__cdist_name_parameter}/${paramtype}" + echo "$(__cdist_type_param_dir "$1")/$2" } __cdist_type_from_object() From 0458d7cbbe08d5ff149b3bdbb38db320ebe5d12d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 00:03:20 +0100 Subject: [PATCH 0556/6109] update header Signed-off-by: Nico Schottelius --- doc/dev/header | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/dev/header b/doc/dev/header index 6e673ae2..5c3ce870 100755 --- a/doc/dev/header +++ b/doc/dev/header @@ -1,6 +1,6 @@ #!/bin/sh # -# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -18,3 +18,5 @@ # along with cdist. If not, see . # # +# USEFUL DESCRIPTION +# From ac9d574049053de940375489eec0862c982e78d5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 00:07:28 +0100 Subject: [PATCH 0557/6109] rename param -> parameter Signed-off-by: Nico Schottelius --- bin/cdist-config | 6 +++--- bin/cdist-type-emulator | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 504970d1..7f68ca67 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -196,14 +196,14 @@ __cdist_type_gencode() echo "${__cdist_type_dir}/$1/${__cdist_name_gencode}" } -__cdist_type_param_dir() +__cdist_type_parameter_dir() { echo "$(__cdist_type_dir "$1")/${__cdist_name_parameter}" } -__cdist_type_param_file() +__cdist_type_parameter_file() { - echo "$(__cdist_type_param_dir "$1")/$2" + echo "$(__cdist_type_parameter_dir "$1")/$2" } __cdist_type_from_object() diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 9283052d..69be9405 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -78,14 +78,14 @@ while read required; do fi mv "${tempparameter}/${required}" "${__cdist_parameter_dir}" -done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_parameter_required")" +done < "$(__cdist_type_parameter_file "$__cdist_type" "$__cdist_name_parameter_required")" # Allow optional parameters while read optional; do if [ -f "${tempparameter}/${optional}" ]; then mv "${tempparameter}/${optional}" "${__cdist_parameter_dir}" fi -done < "$(__cdist_type_param_file "$__cdist_type" "$__cdist_name_parameter_optional")" +done < "$(__cdist_type_parameter_file "$__cdist_type" "$__cdist_name_parameter_optional")" # Error out on other paramaters cd "${tempparameter}" From ef7c63bc9898715ad29c6b8c319c11ab59083db0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 00:13:04 +0100 Subject: [PATCH 0558/6109] finish bin/cdist-type-template Signed-off-by: Nico Schottelius --- bin/cdist-type-template | 57 ++++++++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/bin/cdist-type-template b/bin/cdist-type-template index 7b98de28..0391510c 100755 --- a/bin/cdist-type-template +++ b/bin/cdist-type-template @@ -1,6 +1,6 @@ #!/bin/sh # -# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -18,34 +18,49 @@ # along with cdist. If not, see . # # -# Transfer all executables +# Create a new type from scratch # . cdist-config -[ $# -eq 2 ] || __cdist_usage " " +[ $# -eq 1 ] || __cdist_usage "" set -eu -__cdist_target_host="$1"; shift -__cdist_my_remote_out_dir="$1"; shift +__cdist_type="$1"; shift -# Find directory that contains cdist binaries -__cdist_conf_dir_path=$(which cdist-config) -__cdist_src_base=${__cdist_conf_dir_path%config} -# Help the user -echo "Transferring cdist binaries ..." +# Base +mkdir -p "$(__cdist_type_dir "$__cdist_type")" -# re-create basedir so it's clean -ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "rm -rf \"${__cdist_my_remote_out_dir}\" && mkdir -p \"${__cdist_my_remote_out_dir}\"" +# Parameter +mkdir -p "$(__cdist_type_parameter_dir "$__cdist_type")" +touch "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_parameter_required}" +touch "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_parameter_optional}" -# Transfer cdist-* to the remote host -scp -qr "${__cdist_src_base}"* \ - "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_my_remote_out_dir}" +# Manifest +cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_manifest}" -# Adjust cdist-config to contain static version string -tmp_version="$__cdist_version" -sed "s/^: \${\(__cdist_version\):=.*/\1=\"$tmp_version\"/" "$(which cdist-config)" | \ - ssh -q "${__cdist_remote_user}@${__cdist_target_host}" \ - "cat > \"${__cdist_my_remote_out_dir}\"/cdist-config" +# +# This is the manifest, which can be used to create other objects like this: +# __file /path/to/destination --source /from/where/ --type file +# +# To tell cdist to make use of it, you need to make it executable (chmod +x) +# +# +eof + +# Gencode +cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_gencode}" + +# +# This file should generate code on stdout, which will be collected by cdist +# and run on the target. +# +# To tell cdist to make use of it, you need to make it executable (chmod +x) +# +# + +eof + +# Explorer +mkdir -p "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_explorer}" From 7a729483516a73d969e013e4446ccd72e7c88824 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 00:13:57 +0100 Subject: [PATCH 0559/6109] different todos Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 3 +++ doc/man/to_check/cdist-type.text | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index a9bc41ae..ffee7e77 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,4 +1,7 @@ Documentation cleanup + - to_check/cdist-type.text + - add cdist-type-template + - plus manpage - cdist-type-integration - Ensure available types are documented (!) - define how to in cdist-type-integration diff --git a/doc/man/to_check/cdist-type.text b/doc/man/to_check/cdist-type.text index 50df4d13..9e9642a1 100644 --- a/doc/man/to_check/cdist-type.text +++ b/doc/man/to_check/cdist-type.text @@ -65,7 +65,8 @@ A type consists of Types are stored below conf/type/. Their name should always be prefixed with two underscores (__) to prevent collisions with other binaries in $PATH. -To begin a new type from a template, execute "cdist-type-template __NAME". +To begin a new type from a template, execute "cdist-type-template __NAME" +and cd to conf/type/__NAME. DEFINING PARAMETERS From 749bf6adb77bc15ae6427358dca4ec8c80b3fe42 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 00:20:35 +0100 Subject: [PATCH 0560/6109] update manpages to work with asciidoc Signed-off-by: Nico Schottelius --- .gitignore | 1 + Makefile | 9 ++++++--- doc/man/cdist-bin-transfer.text | 2 +- doc/man/cdist-type-template.text | 30 ++++++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 doc/man/cdist-type-template.text diff --git a/.gitignore b/.gitignore index 099d7de3..ba65e3f8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .*.swp doc/man/*.[1-9] doc/man/.marker +doc/man/man*/ diff --git a/Makefile b/Makefile index 23b7962d..7a0b0976 100644 --- a/Makefile +++ b/Makefile @@ -17,9 +17,12 @@ MANSRC=$(MANDIR)/cdist-config-layout.text \ $(MANDIR)/cdist-terms.text \ $(MANDIR)/cdist-type.text -MANSRC=$(MANDIR)/cdist.text \ - $(MANDIR)/cdist-deploy-to.text \ - $(MANDIR)/cdist-manifest.text \ +MANSRC=$(MANDIR)/cdist.text \ + $(MANDIR)/cdist-bin-transfer.text \ + $(MANDIR)/cdist-deploy-to.text \ + $(MANDIR)/cdist-manifest.text \ + $(MANDIR)/cdist-stages.text \ + $(MANDIR)/cdist-type-template.text \ ################################################################################ diff --git a/doc/man/cdist-bin-transfer.text b/doc/man/cdist-bin-transfer.text index 9a9e0a4b..21f00b65 100644 --- a/doc/man/cdist-bin-transfer.text +++ b/doc/man/cdist-bin-transfer.text @@ -5,7 +5,7 @@ Nico Schottelius NAME ---- -cdist-bin-transfer +cdist-bin-transfer - Transfer binaries to the target SYNOPSIS diff --git a/doc/man/cdist-type-template.text b/doc/man/cdist-type-template.text new file mode 100644 index 00000000..bbd31409 --- /dev/null +++ b/doc/man/cdist-type-template.text @@ -0,0 +1,30 @@ +cdist-type-template(1) +====================== +Nico Schottelius + + +NAME +---- +cdist-type-template - Create a new type + + +SYNOPSIS +-------- +cdist-type-template NAME + + +DESCRIPTION +----------- +cdist-type-template creates a new type and adds the usual files to it. +It is thought to be helpful when writing new types. + + +SEE ALSO +-------- +cdist(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). From 7c84f729a377c3fc8479dc7cc99993c38d2984f3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 00:25:08 +0100 Subject: [PATCH 0561/6109] cleanup and update changelog Signed-off-by: Nico Schottelius --- Makefile | 2 +- REAL_README | 8 -------- doc/changelog | 7 +++++++ doc/dev/changelog | 2 -- 4 files changed, 8 insertions(+), 11 deletions(-) create mode 100644 doc/changelog delete mode 100644 doc/dev/changelog diff --git a/Makefile b/Makefile index 7a0b0976..ddada4c3 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ man: doc/man/.marker doc/man/.marker: $(MANSRC) for mansrc in $(MANSRC); do $(A2X) $$mansrc; done - for manpage in $(MANDIR)/*.[1-9]; do cat=$${manpage##*.}; echo $$cat; mandir=$(MANDIR)/man$$cat; mkdir -p $$mandir; mv $$manpage $$mandir; done + for manpage in $(MANDIR)/*.[1-9]; do cat=$${manpage##*.}; mandir=$(MANDIR)/man$$cat; mkdir -p $$mandir; mv $$manpage $$mandir; done touch $@ clean: diff --git a/REAL_README b/REAL_README index 7cefb29e..10b1b812 100644 --- a/REAL_README +++ b/REAL_README @@ -53,14 +53,6 @@ but is not. Or: The reason why I began to write cdist. * sh * find, rm, ... -### Roadmap - -[[!table data=""" -**Version** | **Objectives** | **Status** -1.0.0 | Initial release | -1.0.1 | Documentation cleanup | -"""]] - ## Requirements ### Server diff --git a/doc/changelog b/doc/changelog new file mode 100644 index 00000000..179afd8d --- /dev/null +++ b/doc/changelog @@ -0,0 +1,7 @@ +1.0.1: 2011-03-08 + * Added cdist-type-template including manpage + * Fix manpage building + * Add new manpages: cdist-stages, cdist-bin-transfer + +1.0.0: 2011-03-07 + * Initial release diff --git a/doc/dev/changelog b/doc/dev/changelog deleted file mode 100644 index bac9d0f3..00000000 --- a/doc/dev/changelog +++ /dev/null @@ -1,2 +0,0 @@ -1.0.0: 2011-03-07 - * Initial release From 36f0e502d2acd563d658897187717523f31affad Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 00:27:24 +0100 Subject: [PATCH 0562/6109] less todo Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index ffee7e77..4f8f033d 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,7 +1,5 @@ Documentation cleanup - to_check/cdist-type.text - - add cdist-type-template - - plus manpage - cdist-type-integration - Ensure available types are documented (!) - define how to in cdist-type-integration From 20b50ea19fd04d66e153fc4a34fa4d73842a9ace Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 12:18:26 +0100 Subject: [PATCH 0563/6109] prepend new path, so running HACKERS_README in biased environment works Signed-off-by: Nico Schottelius --- HACKERS_README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HACKERS_README b/HACKERS_README index fa01666f..0ae1bdcd 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -33,7 +33,7 @@ set -x # Tell the user what we do, so this script makes sense during execution # prepare use (only from top level directory) -export PATH="$PATH:$(pwd -P)/bin" +export PATH="$(pwd -P)/bin:$PATH" export __cdist_conf_dir="$(pwd -P)/conf" # Allow user to supply hostname From 1b3aef7ea35e2e4510817534f9c05acefed80701 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 12:36:59 +0100 Subject: [PATCH 0564/6109] how to use a type, how to define parameters Signed-off-by: Nico Schottelius --- doc/man/to_check/cdist-type.text | 38 +++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/doc/man/to_check/cdist-type.text b/doc/man/to_check/cdist-type.text index 9e9642a1..26706ae4 100644 --- a/doc/man/to_check/cdist-type.text +++ b/doc/man/to_check/cdist-type.text @@ -53,11 +53,29 @@ Every time a type is used, a new object is created of the specific type, with a type specific unique id that stores the parameters +HOW TO USE A TYPE +----------------- +You can use types from the initial manifest or the type manifest like a +normal command: + +-------------------------------------------------------------------------------- +# Creates empty file /etc/cdist-configured +__file /etc/cdist-configured --type file + +# Ensure tree is installed +__package tree --state installed +-------------------------------------------------------------------------------- + +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). + + HOW TO WRITE A NEW TYPE ----------------------- A type consists of -- parameter (required) +- parameter (optional) - manifest (optional) - gencode (optional) - explorer (optional) @@ -66,13 +84,25 @@ Types are stored below conf/type/. Their name should always be prefixed with two underscores (__) to prevent collisions with other binaries in $PATH. To begin a new type from a template, execute "cdist-type-template __NAME" -and cd to conf/type/__NAME. +and cd conf/type/__NAME. DEFINING PARAMETERS ------------------- -Every type consists of optional and +Every type consists of optional and required parameters, which must +be created in a newline seperated file in parameters/required and +parameters/optional. If either or both missing, the type will have +no required, no optional or no parameters at all. +Example: +-------------------------------------------------------------------------------- +echo servername >> conf/type/__nginx_vhost/parameter/required +echo logdirectory >> conf/type/__nginx_vhost/parameter/optional +-------------------------------------------------------------------------------- + + +WRITING THE MANIFEST +-------------------- HOW TO WRITE A NEW TYPE (TODO) ------------------------------ @@ -104,6 +134,8 @@ SEE ALSO cdist-config-layout(7), cdist-type-manifest(7), cdist-type-explorer(7), cdist-type-gencode(7) +- cdist-manifest-run(1) + COPYING ------- From cc28d4ddbb439138f82fe6331a8a30b5e86ef00f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 12:39:05 +0100 Subject: [PATCH 0565/6109] do not exit 0 if __package_$type does not exit 0 Signed-off-by: Nico Schottelius --- conf/type/__package/manifest | 2 -- 1 file changed, 2 deletions(-) diff --git a/conf/type/__package/manifest b/conf/type/__package/manifest index cf085e2f..d8b55814 100755 --- a/conf/type/__package/manifest +++ b/conf/type/__package/manifest @@ -49,5 +49,3 @@ for property in $(ls .); do done __package_$type "$@" - -exit 0 From bc436c6c5cb0658b53f12f718d11a88cb1789742 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 12:47:51 +0100 Subject: [PATCH 0566/6109] describe how to submit a new cdist type for inclusion Signed-off-by: Nico Schottelius --- doc/man/to_check/cdist-type.text | 53 +++++++++++++++++++------------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/doc/man/to_check/cdist-type.text b/doc/man/to_check/cdist-type.text index 26706ae4..cd06463e 100644 --- a/doc/man/to_check/cdist-type.text +++ b/doc/man/to_check/cdist-type.text @@ -103,37 +103,46 @@ echo logdirectory >> conf/type/__nginx_vhost/parameter/optional WRITING THE MANIFEST -------------------- +In the manifest of a type you can use other types, so your type extends +their functionality. A good example is the __package type, which in +a shortened version looks like this: -HOW TO WRITE A NEW TYPE (TODO) ------------------------------- -Assume you want to create the new type named "coffee", which creates -files which contain the word "c0ffee". +-------------------------------------------------------------------------------- +os="$(cat "$__global/explorer/os")" +case "$os" in + archlinux) type="pacman" ;; + debian|ubuntu) type="apt" ;; + gentoo) type="emerge" ;; + *) + echo "Don't know how to manage packages on: $os" >&2 + exit 1 + ;; +esac -Create the directory conf/type/coffee/. -Create the file /etc/cdist/types/coffee/README containing a description of the -type. -If your type supports attributes, create the directory /etc/cdist/types/coffee/ -attributes. -For each attribute, create the file - /etc/cdist/types/coffee/attributes/$attribute_name which contains +__package_$type "$@" +-------------------------------------------------------------------------------- - a short description on the first line - then a blank line - then a long description (probably over several lines) +As you can see, the type can reference different environment variables, +which are documented in cdist-environment-variables(7). -If you think your type may be useful for others, submit it for inclusion -into cdist at cdist -- at -- l.schottelius.org. +Always ensure the manifest is executable, otherwise cdist will not be able +to execute it. -Create /etc/cdist/types/coffee/init which reads $configinput -(either via cconfig or via environment) and outputs a block of -shell code suitable for running on the client. +WRITING THE GENCODE SCRIPT +-------------------------- + +HOW TO INCLUDE A TYPE INTO UPSTREAM CDIST +----------------------------------------- +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 there is a corresponding manpage named cdist-type-NAME (without +underscores) included. SEE ALSO -------- -cdist-config-layout(7), cdist-type-manifest(7), cdist-type-explorer(7), -cdist-type-gencode(7) - - cdist-manifest-run(1) From f77f551846ca2dc19d6dcda528603c5befb89385 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 8 Mar 2011 19:37:42 +0100 Subject: [PATCH 0567/6109] 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 0568/6109] 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 0569/6109] 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 844862846196e0db4edff020af9513fe92142009 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 19:58:35 +0100 Subject: [PATCH 0570/6109] add a new section Signed-off-by: Nico Schottelius --- doc/man/to_check/cdist-type.text | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/man/to_check/cdist-type.text b/doc/man/to_check/cdist-type.text index cd06463e..bd154813 100644 --- a/doc/man/to_check/cdist-type.text +++ b/doc/man/to_check/cdist-type.text @@ -77,8 +77,8 @@ A type consists of - parameter (optional) - manifest (optional) -- gencode (optional) - explorer (optional) +- gencode (optional) Types are stored below conf/type/. Their name should always be prefixed with two underscores (__) to prevent collisions with other binaries in $PATH. @@ -128,8 +128,12 @@ which are documented in cdist-environment-variables(7). Always ensure the manifest is executable, otherwise cdist will not be able to execute it. +THE TYPE EXPLORERS +------------------ + WRITING THE GENCODE SCRIPT -------------------------- +The gencode script can make use HOW TO INCLUDE A TYPE INTO UPSTREAM CDIST ----------------------------------------- From 5d62370ff147e7a7dd327332bf1310c4ec00427c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 20:00:11 +0100 Subject: [PATCH 0571/6109] [DOC] begin documentation of environment variables Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 1 + doc/dev/todo/post-1.0 | 13 ------------- doc/man/to_check/cdist-environment-variables.text | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 doc/man/to_check/cdist-environment-variables.text diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 4f8f033d..52bc8041 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,5 +1,6 @@ Documentation cleanup - to_check/cdist-type.text + - document environment variables - cdist-type-integration - Ensure available types are documented (!) - define how to in cdist-type-integration diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index de8919f0..9d6031b4 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -38,12 +38,6 @@ Documentation: - via version control - Define how to raise errors in types - - = todo - + = in progress -> S|N - x = done - - - x remove old documentation from doc/man/! - Check all references in manpages, ensure all manpages exist, generic ones: + cdist + cdist-deploy-to @@ -53,13 +47,6 @@ Documentation: - install packages only if not existent - copy file only if different - DOC document that $type/manifest is executed for every object/instance - - exported variables: - - general explorer: __explorer # cdist-explorer - - initial manifest: __manifest, __global # cdist-manifest - - type manifests __object, __object_id, __global # cdist-type - - type explorers: __object, __object_id, __type_explorers # cdist-type - - type codegen: __object, __object_id, __global # cdist-type - - type code: - # cdist-code - category 7: - cdist-manifest(7) - cdist-explorer diff --git a/doc/man/to_check/cdist-environment-variables.text b/doc/man/to_check/cdist-environment-variables.text new file mode 100644 index 00000000..c91a2ae0 --- /dev/null +++ b/doc/man/to_check/cdist-environment-variables.text @@ -0,0 +1,14 @@ +Update on env: + + general explorer: __explorer + initial manifest: __manifest, __global + type manifests __object, __object_id, __global + type explorers: __object, __object_id, __type_explorers, __global + type codegen: __object, __object_id, __global + type code: - + + +- __object: Path to the object that we are working on +- __object_id: type unique object id +- __global: contains global information (see cdist-env + From 35df79534210b4bb68bd6043a74eecd34c26f758 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 8 Mar 2011 20:21:10 +0100 Subject: [PATCH 0572/6109] 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 7b2e815830718622371b3b3e470bff5d908a8043 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 20:26:44 +0100 Subject: [PATCH 0573/6109] begin to cleanup cdist-type Signed-off-by: Nico Schottelius --- doc/man/to_check/cdist-type.text | 62 ++++++++++++++------------------ 1 file changed, 27 insertions(+), 35 deletions(-) diff --git a/doc/man/to_check/cdist-type.text b/doc/man/to_check/cdist-type.text index bd154813..b4df77d7 100644 --- a/doc/man/to_check/cdist-type.text +++ b/doc/man/to_check/cdist-type.text @@ -1,5 +1,5 @@ cdist-type(7) -============== +============= Nico Schottelius @@ -20,39 +20,6 @@ use cdist, you'll write a type for every functionality you would like to use. - -Was man mit cdist type machen kann..... - -A cdist type describes some kind of functionality, starting from simple stuff -like copying files until complex user auth/ldap/ kerberos infrastructure -designs. The name of every type is prefixed with two underscores (__) by convention. - - -, because -types will be executed and the two underscores prevent collisions with real -binaries (like "file"). -In general, types should be written independent of hosts (as in reusable -code), but may be used implement functionality only needed on one host -as well. -It must be assumed that the clients are pretty dumb and thus do not have high -level tools like ruby installed. If a type requires specific tools to be present -on the target, there must be another type that provides this tool and the first -type must create an object of the specific type. -If the generated code fails on the client, it must print diagnostistic messages on -stderr and exit non-zero, so the configuration is aborted. -Types may make use of other types to realise a new type or may implement some -functionality on their own. - -Types may consist of -- a number of required and optional parameters they accept, -- a manifest script that makes use of the parameters and may create other objects -- explorers that explore type specific information on the target -- a gencode script, that may generate code to be executed on the target - -Every time a type is used, a new object is created of the specific type, -with a type specific unique id that stores the parameters - - HOW TO USE A TYPE ----------------- You can use types from the initial manifest or the type manifest like a @@ -128,12 +95,36 @@ which are documented in cdist-environment-variables(7). Always ensure the manifest is executable, otherwise cdist will not be able to execute it. + THE TYPE EXPLORERS ------------------ WRITING THE GENCODE SCRIPT -------------------------- -The gencode script can make use +The gencode script can make use of the parameters, the global explorers +and the type specific explorers. The output (stdout) of this script is +saved by cdist and will be executed on the target. + +If the gencode script encounters an error, it should print diagnostic +messages to stderr and exit non-zero. If you need to debug the gencode +script, you can write to stderr: + +-------------------------------------------------------------------------------- +# Debug output to stderr +echo "My fancy debug line" >&2 + +# Output to be saved by cdist for execution on the target +echo "touch /etc/cdist-configured" +-------------------------------------------------------------------------------- + + +HINTS FOR TYPEWRITERS +---------------------- +It must be assumed that the target is pretty dumb and thus does not have high +level tools like ruby installed. If a type requires specific tools to be present +on the target, there must be another type that provides this tool and the first +type should create an object of the specific type. + HOW TO INCLUDE A TYPE INTO UPSTREAM CDIST ----------------------------------------- @@ -148,6 +139,7 @@ underscores) included. SEE ALSO -------- - cdist-manifest-run(1) +- cdist-stages(7) COPYING From 45737ce452ca99cdd9c29b660399f2352abd163f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 20:35:21 +0100 Subject: [PATCH 0574/6109] [DOC] add cdist-type manpage Signed-off-by: Nico Schottelius --- Makefile | 2 +- doc/man/{to_check => }/cdist-type.text | 25 ++++++++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) rename doc/man/{to_check => }/cdist-type.text (83%) diff --git a/Makefile b/Makefile index ddada4c3..95507337 100644 --- a/Makefile +++ b/Makefile @@ -15,13 +15,13 @@ MANSRC=$(MANDIR)/cdist-config-layout.text \ $(MANDIR)/cdist-quickstart.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-terms.text \ - $(MANDIR)/cdist-type.text MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-bin-transfer.text \ $(MANDIR)/cdist-deploy-to.text \ $(MANDIR)/cdist-manifest.text \ $(MANDIR)/cdist-stages.text \ + $(MANDIR)/cdist-type.text \ $(MANDIR)/cdist-type-template.text \ diff --git a/doc/man/to_check/cdist-type.text b/doc/man/cdist-type.text similarity index 83% rename from doc/man/to_check/cdist-type.text rename to doc/man/cdist-type.text index b4df77d7..ad051585 100644 --- a/doc/man/to_check/cdist-type.text +++ b/doc/man/cdist-type.text @@ -98,6 +98,25 @@ to execute it. THE TYPE EXPLORERS ------------------ +If a type needs to explore specific details, it can provide type specific +explorers, which will be executed on the target for every created object. + +The explorers are stored under the "explorer" directory below the type. +It could for instance contain code to check the md5sum of a file on the +client, like this (shortened version from real type __file): + +-------------------------------------------------------------------------------- +if [ -f "$__object/parameter/destination" ]; then + destination="$(cat "$__object/parameter/destination")" +else + destination="/$__object_id" +fi + +if [ -e "$destination" ]; then + md5sum < "$destination" +fi +-------------------------------------------------------------------------------- + WRITING THE GENCODE SCRIPT -------------------------- @@ -132,8 +151,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 there is a corresponding manpage named cdist-type-NAME (without -underscores) included. +Ensure a corresponding manpage named cdist-type-NAME (without +underscores) is included. SEE ALSO @@ -144,5 +163,5 @@ SEE ALSO COPYING ------- -Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +Copyright \(C) 2011 Nico Schottelius. Free use of this software is granted under the terms of the GNU General Public License version 3 (GPLv3). From a138f2ec965464a12a0b42cdeba9bba0779a8ccc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 20:36:18 +0100 Subject: [PATCH 0575/6109] less todo for nico Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 52bc8041..636cd561 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,9 +1,4 @@ Documentation cleanup - - to_check/cdist-type.text - document environment variables - - cdist-type-integration - - Ensure available types are documented (!) - - define how to in cdist-type-integration - - referenced on the webpage via cdist-type(7)! - - - how to debug explorer and codegen + - Reference all types somewhere (on the webpage?) + - how to debug explorer From ed92a7d6fd51a7445eeeaeeb33072003e6c2c679 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 20:37:52 +0100 Subject: [PATCH 0576/6109] upcoming changes for 1.0.2 Signed-off-by: Nico Schottelius --- doc/changelog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/changelog b/doc/changelog index 179afd8d..b0087c36 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,3 +1,7 @@ +1.0.2: upcoming + * Add manpages: cdist-type + * Make doc/man/ usable as MANPATH entry + 1.0.1: 2011-03-08 * Added cdist-type-template including manpage * Fix manpage building From 2dbb289fc3f665efb66e1cd277ff6d25f0d609b0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 21:23:44 +0100 Subject: [PATCH 0577/6109] remove all generated/moved manpages Signed-off-by: Nico Schottelius --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 95507337..deefbafd 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ doc/man/.marker: $(MANSRC) touch $@ clean: - rm -f doc/man/*.html doc/man/*.[1-9] + rm -rf doc/man/*.html doc/man/*.[1-9] doc/man/man[1-9] ################################################################################ # Developer targets From 8549e74f45d631b3e5627b4f2527839601163a07 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 21:25:35 +0100 Subject: [PATCH 0578/6109] name type manpages differently Signed-off-by: Nico Schottelius --- doc/man/cdist-type.text | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/man/cdist-type.text b/doc/man/cdist-type.text index ad051585..3c7a1317 100644 --- a/doc/man/cdist-type.text +++ b/doc/man/cdist-type.text @@ -151,8 +151,7 @@ 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 (without -underscores) is included. +Ensure a corresponding manpage named cdist-type__NAME is included. SEE ALSO From 4bb7fb5c59c412d34503a295b78a294a2365d58f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 21:27:57 +0100 Subject: [PATCH 0579/6109] add template for manpage of __file type Signed-off-by: Nico Schottelius --- doc/man/cdist-type__file.text | 166 ++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 doc/man/cdist-type__file.text diff --git a/doc/man/cdist-type__file.text b/doc/man/cdist-type__file.text new file mode 100644 index 00000000..3c7a1317 --- /dev/null +++ b/doc/man/cdist-type__file.text @@ -0,0 +1,166 @@ +cdist-type(7) +============= +Nico Schottelius + + +NAME +---- +cdist-type - Functionality bundled + + +SYNOPSIS +-------- +Other languages name this module or class + + +DESCRIPTION +----------- +Types are the main component of cdist and define functionality. If you +use cdist, you'll write a type for every functionality you would like +to use. + + +HOW TO USE A TYPE +----------------- +You can use types from the initial manifest or the type manifest like a +normal command: + +-------------------------------------------------------------------------------- +# Creates empty file /etc/cdist-configured +__file /etc/cdist-configured --type file + +# Ensure tree is installed +__package tree --state installed +-------------------------------------------------------------------------------- + +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). + + +HOW TO WRITE A NEW TYPE +----------------------- +A type consists of + +- parameter (optional) +- manifest (optional) +- explorer (optional) +- gencode (optional) + +Types are stored below conf/type/. Their name should always be prefixed with +two underscores (__) to prevent collisions with other binaries in $PATH. + +To begin a new type from a template, execute "cdist-type-template __NAME" +and cd conf/type/__NAME. + + +DEFINING PARAMETERS +------------------- +Every type consists of optional and required parameters, which must +be created in a newline seperated file in parameters/required and +parameters/optional. If either or both missing, the type will have +no required, no optional or no parameters at all. + +Example: +-------------------------------------------------------------------------------- +echo servername >> conf/type/__nginx_vhost/parameter/required +echo logdirectory >> conf/type/__nginx_vhost/parameter/optional +-------------------------------------------------------------------------------- + + +WRITING THE MANIFEST +-------------------- +In the manifest of a type you can use other types, so your type extends +their functionality. A good example is the __package type, which in +a shortened version looks like this: + +-------------------------------------------------------------------------------- +os="$(cat "$__global/explorer/os")" +case "$os" in + archlinux) type="pacman" ;; + debian|ubuntu) type="apt" ;; + gentoo) type="emerge" ;; + *) + echo "Don't know how to manage packages on: $os" >&2 + exit 1 + ;; +esac + +__package_$type "$@" +-------------------------------------------------------------------------------- + +As you can see, the type can reference different environment variables, +which are documented in cdist-environment-variables(7). + +Always ensure the manifest is executable, otherwise cdist will not be able +to execute it. + + +THE TYPE EXPLORERS +------------------ +If a type needs to explore specific details, it can provide type specific +explorers, which will be executed on the target for every created object. + +The explorers are stored under the "explorer" directory below the type. +It could for instance contain code to check the md5sum of a file on the +client, like this (shortened version from real type __file): + +-------------------------------------------------------------------------------- +if [ -f "$__object/parameter/destination" ]; then + destination="$(cat "$__object/parameter/destination")" +else + destination="/$__object_id" +fi + +if [ -e "$destination" ]; then + md5sum < "$destination" +fi +-------------------------------------------------------------------------------- + + +WRITING THE GENCODE SCRIPT +-------------------------- +The gencode script can make use of the parameters, the global explorers +and the type specific explorers. The output (stdout) of this script is +saved by cdist and will be executed on the target. + +If the gencode script encounters an error, it should print diagnostic +messages to stderr and exit non-zero. If you need to debug the gencode +script, you can write to stderr: + +-------------------------------------------------------------------------------- +# Debug output to stderr +echo "My fancy debug line" >&2 + +# Output to be saved by cdist for execution on the target +echo "touch /etc/cdist-configured" +-------------------------------------------------------------------------------- + + +HINTS FOR TYPEWRITERS +---------------------- +It must be assumed that the target is pretty dumb and thus does not have high +level tools like ruby installed. If a type requires specific tools to be present +on the target, there must be another type that provides this tool and the first +type should create an object of the specific type. + + +HOW TO INCLUDE A TYPE INTO UPSTREAM CDIST +----------------------------------------- +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. + + +SEE ALSO +-------- +- cdist-manifest-run(1) +- cdist-stages(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). From 2f88521d41d4288cdf767ba996c4f7365a5be21a Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 8 Mar 2011 21:43:36 +0100 Subject: [PATCH 0580/6109] ads --- asd | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 asd diff --git a/asd b/asd new file mode 100644 index 00000000..e69de29b From a095b1a3c323b7a58db4bc999e2cffeb13785ded Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 21:47:08 +0100 Subject: [PATCH 0581/6109] finish manpage for cdist-type__file Signed-off-by: Nico Schottelius --- Makefile | 1 + doc/man/cdist-type__file.text | 173 +++++++--------------------------- 2 files changed, 34 insertions(+), 140 deletions(-) diff --git a/Makefile b/Makefile index deefbafd..e003c0c6 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,7 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-type.text \ $(MANDIR)/cdist-type-template.text \ + $(MANDIR)/cdist-type__file.text \ ################################################################################ diff --git a/doc/man/cdist-type__file.text b/doc/man/cdist-type__file.text index 3c7a1317..04e0ffc3 100644 --- a/doc/man/cdist-type__file.text +++ b/doc/man/cdist-type__file.text @@ -1,163 +1,56 @@ -cdist-type(7) -============= +cdist-type__file(7) +=================== Nico Schottelius NAME ---- -cdist-type - Functionality bundled - - -SYNOPSIS --------- -Other languages name this module or class +cdist-type__file - Create files DESCRIPTION ----------- -Types are the main component of cdist and define functionality. If you -use cdist, you'll write a type for every functionality you would like -to use. +This cdist type allows you to create files on the target. -HOW TO USE A TYPE ------------------ -You can use types from the initial manifest or the type manifest like a -normal command: +REQUIRED PARAMETERS +------------------- +type:: + Specifies the type of file to be created. Either "directory" or "file" + + +OPTIONAL PARAMETERS +------------------- +destination:: + If supplied, use this as the destination on the target. Otherwise the + object_id is used. + +mode:: + Unix permissions, suitable for chmod. + +source:: + If supplied, copy this file from the host running cdist to the target. + If not supplied, an empty file or directory will be created. + + +EXAMPLES +-------- -------------------------------------------------------------------------------- -# Creates empty file /etc/cdist-configured +# Create /etc/cdist-configured as an empty file __file /etc/cdist-configured --type file -# Ensure tree is installed -__package tree --state installed +# Same but with a different object id +__file cdist-marker --type file --destination /etc/cdist-configured + +# Use __file from another type +__file /etc/issue --source "$__type/files/archlinux" --type file -------------------------------------------------------------------------------- -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). - - -HOW TO WRITE A NEW TYPE ------------------------ -A type consists of - -- parameter (optional) -- manifest (optional) -- explorer (optional) -- gencode (optional) - -Types are stored below conf/type/. Their name should always be prefixed with -two underscores (__) to prevent collisions with other binaries in $PATH. - -To begin a new type from a template, execute "cdist-type-template __NAME" -and cd conf/type/__NAME. - - -DEFINING PARAMETERS -------------------- -Every type consists of optional and required parameters, which must -be created in a newline seperated file in parameters/required and -parameters/optional. If either or both missing, the type will have -no required, no optional or no parameters at all. - -Example: --------------------------------------------------------------------------------- -echo servername >> conf/type/__nginx_vhost/parameter/required -echo logdirectory >> conf/type/__nginx_vhost/parameter/optional --------------------------------------------------------------------------------- - - -WRITING THE MANIFEST --------------------- -In the manifest of a type you can use other types, so your type extends -their functionality. A good example is the __package type, which in -a shortened version looks like this: - --------------------------------------------------------------------------------- -os="$(cat "$__global/explorer/os")" -case "$os" in - archlinux) type="pacman" ;; - debian|ubuntu) type="apt" ;; - gentoo) type="emerge" ;; - *) - echo "Don't know how to manage packages on: $os" >&2 - exit 1 - ;; -esac - -__package_$type "$@" --------------------------------------------------------------------------------- - -As you can see, the type can reference different environment variables, -which are documented in cdist-environment-variables(7). - -Always ensure the manifest is executable, otherwise cdist will not be able -to execute it. - - -THE TYPE EXPLORERS ------------------- -If a type needs to explore specific details, it can provide type specific -explorers, which will be executed on the target for every created object. - -The explorers are stored under the "explorer" directory below the type. -It could for instance contain code to check the md5sum of a file on the -client, like this (shortened version from real type __file): - --------------------------------------------------------------------------------- -if [ -f "$__object/parameter/destination" ]; then - destination="$(cat "$__object/parameter/destination")" -else - destination="/$__object_id" -fi - -if [ -e "$destination" ]; then - md5sum < "$destination" -fi --------------------------------------------------------------------------------- - - -WRITING THE GENCODE SCRIPT --------------------------- -The gencode script can make use of the parameters, the global explorers -and the type specific explorers. The output (stdout) of this script is -saved by cdist and will be executed on the target. - -If the gencode script encounters an error, it should print diagnostic -messages to stderr and exit non-zero. If you need to debug the gencode -script, you can write to stderr: - --------------------------------------------------------------------------------- -# Debug output to stderr -echo "My fancy debug line" >&2 - -# Output to be saved by cdist for execution on the target -echo "touch /etc/cdist-configured" --------------------------------------------------------------------------------- - - -HINTS FOR TYPEWRITERS ----------------------- -It must be assumed that the target is pretty dumb and thus does not have high -level tools like ruby installed. If a type requires specific tools to be present -on the target, there must be another type that provides this tool and the first -type should create an object of the specific type. - - -HOW TO INCLUDE A TYPE INTO UPSTREAM CDIST ------------------------------------------ -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. - SEE ALSO -------- -- cdist-manifest-run(1) -- cdist-stages(7) +- cdist-type(7) COPYING From 43a4dd49ca87581404a85ee7fdd83bb9c27d5280 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 21:51:58 +0100 Subject: [PATCH 0582/6109] define how to use manpages Signed-off-by: Nico Schottelius --- REAL_README | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/REAL_README b/REAL_README index 10b1b812..ab070b38 100644 --- a/REAL_README +++ b/REAL_README @@ -79,6 +79,10 @@ To install cdist, execute the following commands: cd cdist export PATH=$PATH:$(pwd -P)/bin + # If you want the manpages + make man + export MANPATH=$MANPATH:$(pwd -P)/doc/man + Afterwards you can run ***cdist-quickstart*** to get an impression on how to use cdist. @@ -105,6 +109,11 @@ To upgrade cdist in the current branch use git pull + # Also update the manpages + make man + export MANPATH=$MANPATH:$(pwd -P)/doc/man + + The version branches are designed to change if there are incompatibilities. Or the other way round: As long as you stay on 1.0 and do git pull, nothing should break. From 4c5069e0cdfe14c2bc87ecd2baad4587863d6183 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 22:04:32 +0100 Subject: [PATCH 0583/6109] begin manpage to include all types Signed-off-by: Nico Schottelius --- doc/man/cdist-type-supported.text.sh | 203 +++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 doc/man/cdist-type-supported.text.sh diff --git a/doc/man/cdist-type-supported.text.sh b/doc/man/cdist-type-supported.text.sh new file mode 100644 index 00000000..78c04a43 --- /dev/null +++ b/doc/man/cdist-type-supported.text.sh @@ -0,0 +1,203 @@ +#!/bin/sh +# +# 2010-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 . +# +# +# Generate manpage that lists available types +# + +__cdist_pwd="$(pwd -P)" +__cdist_mydir="${0%/*}"; +__cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" +__cdist_myname=${0##*/}; +__cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" + +filename="${__cdist_myname%.sh}" +dest="$__cdist_abs_mydir/$filename" + +exit 0 + +cat << eof > "$dest" +cdist-type-listing(7) +===================== +Nico Schottelius + + +NAME +---- +cdist-type-listing - Available types in cdist + + +SYNOPSIS +-------- +Types that are included in cdist $(git describe). + + +DESCRIPTION +----------- +Types are the main component of cdist and define functionality. If you +use cdist, you'll write a type for every functionality you would like +to use. + + +HOW TO USE A TYPE +----------------- +You can use types from the initial manifest or the type manifest like a +normal command: + +-------------------------------------------------------------------------------- +# Creates empty file /etc/cdist-configured +__file /etc/cdist-configured --type file + +# Ensure tree is installed +__package tree --state installed +-------------------------------------------------------------------------------- + +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). + + +HOW TO WRITE A NEW TYPE +----------------------- +A type consists of + +- parameter (optional) +- manifest (optional) +- explorer (optional) +- gencode (optional) + +Types are stored below conf/type/. Their name should always be prefixed with +two underscores (__) to prevent collisions with other binaries in $PATH. + +To begin a new type from a template, execute "cdist-type-template __NAME" +and cd conf/type/__NAME. + + +DEFINING PARAMETERS +------------------- +Every type consists of optional and required parameters, which must +be created in a newline seperated file in parameters/required and +parameters/optional. If either or both missing, the type will have +no required, no optional or no parameters at all. + +Example: +-------------------------------------------------------------------------------- +echo servername >> conf/type/__nginx_vhost/parameter/required +echo logdirectory >> conf/type/__nginx_vhost/parameter/optional +-------------------------------------------------------------------------------- + + +WRITING THE MANIFEST +-------------------- +In the manifest of a type you can use other types, so your type extends +their functionality. A good example is the __package type, which in +a shortened version looks like this: + +-------------------------------------------------------------------------------- +os="$(cat "$__global/explorer/os")" +case "$os" in + archlinux) type="pacman" ;; + debian|ubuntu) type="apt" ;; + gentoo) type="emerge" ;; + *) + echo "Don't know how to manage packages on: $os" >&2 + exit 1 + ;; +esac + +__package_$type "$@" +-------------------------------------------------------------------------------- + +As you can see, the type can reference different environment variables, +which are documented in cdist-environment-variables(7). + +Always ensure the manifest is executable, otherwise cdist will not be able +to execute it. + + +THE TYPE EXPLORERS +------------------ +If a type needs to explore specific details, it can provide type specific +explorers, which will be executed on the target for every created object. + +The explorers are stored under the "explorer" directory below the type. +It could for instance contain code to check the md5sum of a file on the +client, like this (shortened version from real type __file): + +-------------------------------------------------------------------------------- +if [ -f "$__object/parameter/destination" ]; then + destination="$(cat "$__object/parameter/destination")" +else + destination="/$__object_id" +fi + +if [ -e "$destination" ]; then + md5sum < "$destination" +fi +-------------------------------------------------------------------------------- + + +WRITING THE GENCODE SCRIPT +-------------------------- +The gencode script can make use of the parameters, the global explorers +and the type specific explorers. The output (stdout) of this script is +saved by cdist and will be executed on the target. + +If the gencode script encounters an error, it should print diagnostic +messages to stderr and exit non-zero. If you need to debug the gencode +script, you can write to stderr: + +-------------------------------------------------------------------------------- +# Debug output to stderr +echo "My fancy debug line" >&2 + +# Output to be saved by cdist for execution on the target +echo "touch /etc/cdist-configured" +-------------------------------------------------------------------------------- + + +HINTS FOR TYPEWRITERS +---------------------- +It must be assumed that the target is pretty dumb and thus does not have high +level tools like ruby installed. If a type requires specific tools to be present +on the target, there must be another type that provides this tool and the first +type should create an object of the specific type. + + +HOW TO INCLUDE A TYPE INTO UPSTREAM CDIST +----------------------------------------- +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. + + +SEE ALSO +-------- +- cdist-manifest-run(1) +- cdist-stages(7) + + +COPYING +------- +Copyright \(C) 2011-$(date +%Y) Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). + +eof From 0e52bfcc4032477b8d152e0fa7683c26b6355992 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 8 Mar 2011 22:04:49 +0100 Subject: [PATCH 0584/6109] and name it type-listing Signed-off-by: Nico Schottelius --- .../{cdist-type-supported.text.sh => cdist-type-listing.text.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/man/{cdist-type-supported.text.sh => cdist-type-listing.text.sh} (100%) diff --git a/doc/man/cdist-type-supported.text.sh b/doc/man/cdist-type-listing.text.sh similarity index 100% rename from doc/man/cdist-type-supported.text.sh rename to doc/man/cdist-type-listing.text.sh From 7a4ab2efd8ea6e42a46177c85220ae0ca6f8804a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 08:53:19 +0100 Subject: [PATCH 0585/6109] integrate the first type manpage into cdist Signed-off-by: Nico Schottelius --- Makefile | 13 ++- doc/changelog | 2 +- doc/man/.gitignore | 1 + doc/man/cdist-type-listing.text.sh | 160 ++++------------------------- 4 files changed, 34 insertions(+), 142 deletions(-) mode change 100644 => 100755 doc/man/cdist-type-listing.text.sh diff --git a/Makefile b/Makefile index e003c0c6..5d099260 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,8 @@ MANSRC=$(MANDIR)/cdist-config-layout.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-terms.text \ +MANGENERATED=$(MANDIR)/cdist-type-listing.text + MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-bin-transfer.text \ $(MANDIR)/cdist-deploy-to.text \ @@ -23,7 +25,7 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-type.text \ $(MANDIR)/cdist-type-template.text \ - $(MANDIR)/cdist-type__file.text \ + $(MANDIR)/cdist-type__file.text \ ################################################################################ @@ -43,11 +45,16 @@ all: man: doc/man/.marker -doc/man/.marker: $(MANSRC) - for mansrc in $(MANSRC); do $(A2X) $$mansrc; done +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 touch $@ +# Only depends on cdist-type__*.text in reality +$(MANDIR)/cdist-type-listing.text: $(MANSRC) $(MANDIR)/cdist-type-listing.text.sh + $(MANDIR)/cdist-type-listing.text.sh + + clean: rm -rf doc/man/*.html doc/man/*.[1-9] doc/man/man[1-9] diff --git a/doc/changelog b/doc/changelog index b0087c36..528b7e86 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,5 +1,5 @@ 1.0.2: upcoming - * Add manpages: cdist-type + * Add manpages: cdist-type, cdist-type__file * Make doc/man/ usable as MANPATH entry 1.0.1: 2011-03-08 diff --git a/doc/man/.gitignore b/doc/man/.gitignore index 22d0a62d..299485e8 100644 --- a/doc/man/.gitignore +++ b/doc/man/.gitignore @@ -1,3 +1,4 @@ cdist.7 *.html cdist-design.7 +cdist-type-listing.text diff --git a/doc/man/cdist-type-listing.text.sh b/doc/man/cdist-type-listing.text.sh old mode 100644 new mode 100755 index 78c04a43..d1da1477 --- a/doc/man/cdist-type-listing.text.sh +++ b/doc/man/cdist-type-listing.text.sh @@ -30,9 +30,11 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" filename="${__cdist_myname%.sh}" dest="$__cdist_abs_mydir/$filename" -exit 0 +cd "$__cdist_abs_mydir" -cat << eof > "$dest" +exec > "$dest" + +cat << eof cdist-type-listing(7) ===================== Nico Schottelius @@ -50,150 +52,32 @@ Types that are included in cdist $(git describe). DESCRIPTION ----------- -Types are the main component of cdist and define functionality. If you -use cdist, you'll write a type for every functionality you would like -to use. +The following types are available: +eof +for type in cdist-type__*.text; do + name_1="${type#cdist-type}" + name_2="${name_1%.text}" -HOW TO USE A TYPE ------------------ -You can use types from the initial manifest or the type manifest like a -normal command: + name="$name_2" + echo "- $name" +done --------------------------------------------------------------------------------- -# Creates empty file /etc/cdist-configured -__file /etc/cdist-configured --type file - -# Ensure tree is installed -__package tree --state installed --------------------------------------------------------------------------------- - -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). - - -HOW TO WRITE A NEW TYPE ------------------------ -A type consists of - -- parameter (optional) -- manifest (optional) -- explorer (optional) -- gencode (optional) - -Types are stored below conf/type/. Their name should always be prefixed with -two underscores (__) to prevent collisions with other binaries in $PATH. - -To begin a new type from a template, execute "cdist-type-template __NAME" -and cd conf/type/__NAME. - - -DEFINING PARAMETERS -------------------- -Every type consists of optional and required parameters, which must -be created in a newline seperated file in parameters/required and -parameters/optional. If either or both missing, the type will have -no required, no optional or no parameters at all. - -Example: --------------------------------------------------------------------------------- -echo servername >> conf/type/__nginx_vhost/parameter/required -echo logdirectory >> conf/type/__nginx_vhost/parameter/optional --------------------------------------------------------------------------------- - - -WRITING THE MANIFEST --------------------- -In the manifest of a type you can use other types, so your type extends -their functionality. A good example is the __package type, which in -a shortened version looks like this: - --------------------------------------------------------------------------------- -os="$(cat "$__global/explorer/os")" -case "$os" in - archlinux) type="pacman" ;; - debian|ubuntu) type="apt" ;; - gentoo) type="emerge" ;; - *) - echo "Don't know how to manage packages on: $os" >&2 - exit 1 - ;; -esac - -__package_$type "$@" --------------------------------------------------------------------------------- - -As you can see, the type can reference different environment variables, -which are documented in cdist-environment-variables(7). - -Always ensure the manifest is executable, otherwise cdist will not be able -to execute it. - - -THE TYPE EXPLORERS ------------------- -If a type needs to explore specific details, it can provide type specific -explorers, which will be executed on the target for every created object. - -The explorers are stored under the "explorer" directory below the type. -It could for instance contain code to check the md5sum of a file on the -client, like this (shortened version from real type __file): - --------------------------------------------------------------------------------- -if [ -f "$__object/parameter/destination" ]; then - destination="$(cat "$__object/parameter/destination")" -else - destination="/$__object_id" -fi - -if [ -e "$destination" ]; then - md5sum < "$destination" -fi --------------------------------------------------------------------------------- - - -WRITING THE GENCODE SCRIPT --------------------------- -The gencode script can make use of the parameters, the global explorers -and the type specific explorers. The output (stdout) of this script is -saved by cdist and will be executed on the target. - -If the gencode script encounters an error, it should print diagnostic -messages to stderr and exit non-zero. If you need to debug the gencode -script, you can write to stderr: - --------------------------------------------------------------------------------- -# Debug output to stderr -echo "My fancy debug line" >&2 - -# Output to be saved by cdist for execution on the target -echo "touch /etc/cdist-configured" --------------------------------------------------------------------------------- - - -HINTS FOR TYPEWRITERS ----------------------- -It must be assumed that the target is pretty dumb and thus does not have high -level tools like ruby installed. If a type requires specific tools to be present -on the target, there must be another type that provides this tool and the first -type should create an object of the specific type. - - -HOW TO INCLUDE A TYPE INTO UPSTREAM CDIST ------------------------------------------ -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. +cat << eof SEE ALSO -------- -- cdist-manifest-run(1) -- cdist-stages(7) +- cdist-type(7) +eof +for type in cdist-type__*.text; do + name_2="${type%.text}" + name="$name_2" + echo "- ${name}(7)" +done + +cat < Date: Wed, 9 Mar 2011 08:54:52 +0100 Subject: [PATCH 0586/6109] lesstodo and add pointer to type manpages Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 2 +- doc/man/cdist-type.text | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 636cd561..3f7c91d5 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,4 +1,4 @@ Documentation cleanup - document environment variables - - Reference all types somewhere (on the webpage?) - how to debug explorer + => 1.0.2 diff --git a/doc/man/cdist-type.text b/doc/man/cdist-type.text index 3c7a1317..b5097a5c 100644 --- a/doc/man/cdist-type.text +++ b/doc/man/cdist-type.text @@ -37,6 +37,8 @@ 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. + HOW TO WRITE A NEW TYPE ----------------------- From 75d8abc339f56b3427207e35088627249975d232 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 08:56:31 +0100 Subject: [PATCH 0587/6109] remove generated manpages Signed-off-by: Nico Schottelius --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5d099260..6a880c48 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,7 @@ $(MANDIR)/cdist-type-listing.text: $(MANSRC) $(MANDIR)/cdist-type-listing.text.s clean: - rm -rf doc/man/*.html doc/man/*.[1-9] doc/man/man[1-9] + rm -rf doc/man/*.html doc/man/*.[1-9] doc/man/man[1-9] $(MANGENERATED) ################################################################################ # Developer targets From 1048c42c6dde27abe41ea0b790aaf745981e74c5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 09:15:34 +0100 Subject: [PATCH 0588/6109] merge cdist-config-layout into cdist-reference Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 1 + doc/man/cdist.text | 11 +- doc/man/to_check/cdist-config-layout.text | 108 ---------- .../to_check/cdist-environment-variables.text | 197 +++++++++++++++++- 4 files changed, 193 insertions(+), 124 deletions(-) delete mode 100644 doc/man/to_check/cdist-config-layout.text diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 3f7c91d5..f7acbe88 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,4 +1,5 @@ Documentation cleanup - document environment variables + - and merge with config-layout! - how to debug explorer => 1.0.2 diff --git a/doc/man/cdist.text b/doc/man/cdist.text index b6fd808b..570b6b95 100644 --- a/doc/man/cdist.text +++ b/doc/man/cdist.text @@ -29,12 +29,11 @@ pull mechanism (client requests configuration). SEE ALSO -------- -Website: http://www.nico.schottelius.org/cdist/[], -cdist-deploy-to(1), -cdist-manifest(7), -cdist-quickstart(1), -cdist-type(7), -cdist-type-inclusion(7) +- Website: http://www.nico.schottelius.org/cdist/[] +- cdist-deploy-to(1) +- cdist-manifest(7) +- cdist-quickstart(1) +- cdist-type(7) COPYING diff --git a/doc/man/to_check/cdist-config-layout.text b/doc/man/to_check/cdist-config-layout.text deleted file mode 100644 index d6be10df..00000000 --- a/doc/man/to_check/cdist-config-layout.text +++ /dev/null @@ -1,108 +0,0 @@ -cdist-config-layout(7) -====================== -Nico Schottelius - - -NAME ----- -cdist-config-layout - Usage of paths in cdist - - -DESCRIPTION ------------ -If not specified otherwise, all paths are relative to the configuration -directory, which is normally /etc/cdist (but can be changed using environment -variables, see cdist-environment(7)). - -- conf_dir/: - Contains the (static) configuration like manifests, types and - explorers. - -- conf_dir/manifest/init: - This is the central entry point used by cdist-manifest-init(1). - It is an executable (+x bit set) shell script that can use - values from the explorers to decide which configuration to create - for the specified target host. - - It should be primary used to define mapping from configurations to hosts. - -- conf_dir/manifest/*: - All other files in this directory are not directly used by Cdist, but you - can seperate configuration mappings, if you have a lot of code in the - manifest/init file. This may also be very helpful to have different admins - maintain different groups of hosts. - -- conf_dir/explorer/ - Contains explorers to be run on the target hosts, see cdist-explorers(7). - -- conf_dir/type/ - Contains all available types, which are used to provide - some kind of functionality. See cdist-stages(7). - -- conf_dir/type//manifest: - Used to generate additional objects from a type. - See cdist-stages(7), cdist-types(7). - -- conf_dir/type//gencode: - Used to generate code to be executed on the client. - See cdist-types(7). - -- conf_dir/type//parameters/required: - Parameters required by type, \n seperated list. - See cdist-types(7). - -- conf_dir/type//parameters/optional: - Parameters optionally accepted by type, \n seperated list. - See cdist-types(7). - -- conf_dir/type//explorer: - Location of the type specific explorers. - See cdist-explorers(7). - -- out_dir/ - This directory contains output of cdist and is mirrored into the - cache after a successful run. This directory may be placed below - the tmpdir or at any other location and is also available on the - target. - -- out_dir/explorer: - Output of general explorers. - -- out_dir/object: - Objects created for the host. - -- out_dir/object//explorers: - Output of type specific explorers, per object. - -- tmp_dir: Temporary storage - A tempdir and a tempfile is provided by cdist-config(1), which - will be removed when the scripts ends automatically. - - -FUTURE ------- -The following functionality may be implemented in one of the next releases: - -- cache_dir/ - The cache contains the out_dir from previous runs, which - may also be used in types to gather information about other hosts - (like ssh-keys). - -- cache_dir/host/: - Contains the last out_dir of the specific host. - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://www.nico.schottelius.org/cdist/[] - - -COPYING -------- -Copyright \(C) 2010-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/doc/man/to_check/cdist-environment-variables.text b/doc/man/to_check/cdist-environment-variables.text index c91a2ae0..f39366f0 100644 --- a/doc/man/to_check/cdist-environment-variables.text +++ b/doc/man/to_check/cdist-environment-variables.text @@ -1,14 +1,191 @@ -Update on env: +cdist-reference(7) +================== +Nico Schottelius - general explorer: __explorer - initial manifest: __manifest, __global - type manifests __object, __object_id, __global - type explorers: __object, __object_id, __type_explorers, __global - type codegen: __object, __object_id, __global - type code: - +NAME +---- +cdist-reference - Variables, paths and types offered by cdist -- __object: Path to the object that we are working on -- __object_id: type unique object id -- __global: contains global information (see cdist-env +DESCRIPTION +----------- +Various scripts which are not in the core need information on how +to find information. This manpage summarises the available environment +variables and clearifies with part may access with variables. +PATHS +----- + + +-------------------------------------------------------------------------------- +cdist-config-layout(7) +====================== +Nico Schottelius + + +NAME +---- +cdist-config-layout - Usage of paths in cdist + + +DESCRIPTION +----------- +If not specified otherwise, all paths are relative to the configuration +directory, which is normally /etc/cdist (but can be changed using environment +variables, see cdist-environment(7)). + +- conf_dir/: + Contains the (static) configuration like manifests, types and + explorers. + +- conf_dir/manifest/init: + This is the central entry point used by cdist-manifest-init(1). + It is an executable (+x bit set) shell script that can use + values from the explorers to decide which configuration to create + for the specified target host. + + It should be primary used to define mapping from configurations to hosts. + +- conf_dir/manifest/*: + All other files in this directory are not directly used by Cdist, but you + can seperate configuration mappings, if you have a lot of code in the + manifest/init file. This may also be very helpful to have different admins + maintain different groups of hosts. + +- conf_dir/explorer/ + Contains explorers to be run on the target hosts, see cdist-explorers(7). + +- conf_dir/type/ + Contains all available types, which are used to provide + some kind of functionality. See cdist-stages(7). + +- conf_dir/type//manifest: + Used to generate additional objects from a type. + See cdist-stages(7), cdist-types(7). + +- conf_dir/type//gencode: + Used to generate code to be executed on the client. + See cdist-types(7). + +- conf_dir/type//parameters/required: + Parameters required by type, \n seperated list. + See cdist-types(7). + +- conf_dir/type//parameters/optional: + Parameters optionally accepted by type, \n seperated list. + See cdist-types(7). + +- conf_dir/type//explorer: + Location of the type specific explorers. + See cdist-explorers(7). + +- out_dir/ + This directory contains output of cdist and is mirrored into the + cache after a successful run. This directory may be placed below + the tmpdir or at any other location and is also available on the + target. + +- out_dir/explorer: + Output of general explorers. + +- out_dir/object: + Objects created for the host. + +- out_dir/object//explorers: + Output of type specific explorers, per object. + +- tmp_dir: Temporary storage + A tempdir and a tempfile is provided by cdist-config(1), which + will be removed when the scripts ends automatically. + + +FUTURE +------ +The following functionality may be implemented in one of the next releases: + +- cache_dir/ + The cache contains the out_dir from previous runs, which + may also be used in types to gather information about other hosts + (like ssh-keys). + +- cache_dir/host/: + Contains the last out_dir of the specific host. + + +AUTHOR +------ +Nico Schottelius + + +RESOURCES +--------- +Main web site: http://www.nico.schottelius.org/cdist/[] + + +COPYING +------- +Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). +-------------------------------------------------------------------------------- + + + +VARIABLES +--------- +__explorer:: + Directory that contains all explorers +__manifest:: + Directory that contains the initial manifest +__global:: + Directory that contains generic output like explorer +__object:: + Directory that contains the current object +__object_id:: + The type unique object id +__type_explorers:: + Directory that contains the type explorers + + +EXPLORER +-------- +- __explorer + + +INITIAL MANIFEST +---------------- +- __manifest +- __global + + +TYPE MANIFEST +------------- +- __object +- __object_id +- __global + + +TYPE EXPLORER +------------- +- __object +- __object_id +- __type_explorers +- __global + + +TYPE CODEGEN +------------ +- __object +- __object_id +- __global + + + +SEE ALSO +-------- +- cdist(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). From ef761b73df0cbafd6fdc039b427aae9815181283 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 09:34:53 +0100 Subject: [PATCH 0589/6109] finish first version of cdist-reference Signed-off-by: Nico Schottelius --- Makefile | 1 + doc/man/cdist-reference.text | 131 ++++++++++++ .../to_check/cdist-environment-variables.text | 191 ------------------ 3 files changed, 132 insertions(+), 191 deletions(-) create mode 100644 doc/man/cdist-reference.text delete mode 100644 doc/man/to_check/cdist-environment-variables.text diff --git a/Makefile b/Makefile index 6a880c48..689b4a5a 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-bin-transfer.text \ $(MANDIR)/cdist-deploy-to.text \ $(MANDIR)/cdist-manifest.text \ + $(MANDIR)/cdist-reference.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-type.text \ $(MANDIR)/cdist-type-template.text \ diff --git a/doc/man/cdist-reference.text b/doc/man/cdist-reference.text new file mode 100644 index 00000000..72ee4f48 --- /dev/null +++ b/doc/man/cdist-reference.text @@ -0,0 +1,131 @@ +cdist-reference(7) +================== +Nico Schottelius + +NAME +---- +cdist-reference - Variable, path and type reference + + +DESCRIPTION +----------- +Various scripts which are not in the core need information on how +to find information. This manpage summarises the available environment +variables and paths and clearifies with part may access with variables. + + +PATHS +----- +If not specified otherwise, all paths are relative to the checkout directory. + +conf/:: + Contains the (static) configuration like manifests, types and explorers. + +conf/manifest/init:: + This is the central entry point used by cdist-manifest-init(1). + It is an executable (+x bit set) shell script that can use + values from the explorers to decide which configuration to create + for the specified target host. + + It should be primary used to define mapping from configurations to hosts. + +conf/manifest/*:: + All other files in this directory are not directly used by Cdist, but you + can seperate configuration mappings, if you have a lot of code in the + manifest/init file. This may also be very helpful to have different admins + maintain different groups of hosts. + +conf/explorer/: + Contains explorers to be run on the target hosts, see cdist-explorer(7). + +conf/type/: + Contains all available types, which are used to provide + some kind of functionality. See cdist-type(7). + +conf/type//:: + Home of the type . + + This directory is referenced by the variable __type (see below). + +conf/type//manifest:: + Used to generate additional objects from a type. + +conf/type//gencode:: + Used to generate code to be executed on the client. + +conf/type//parameters/required:: + Parameters required by type, \n seperated list. + +conf/type//parameters/optional:: + Parameters optionally accepted by type, \n seperated list. + +conf/type//explorer:: + Location of the type specific explorers. + + This directory is referenced by the variable __type_explorer (see below). + + See cdist-explorer(7). + +out/: + This directory contains output of cdist and is usually located + in a temporary directory and thus will be removed after the run. + + This directory is referenced by the variable __global (see below). + +out/explorer:: + Output of general explorers. + +out/object:: + Objects created for the host. + +out/object/:: + Contains all object specific information. + + This directory is referenced by the variable __object (see below). + +out/object//explorers:: + Output of type specific explorers, per object. + +tmp_dir: Temporary storage: + A tempdir and a tempfile is used by cdist internally, + which will be removed when the scripts end automatically. + See cdist-config(1). + + +VARIABLES +--------- +__explorer:: + Directory that contains all explorers + Available for: explorer +__manifest:: + Directory that contains the initial manifest + Available for: initial manifest +__global:: + Directory that contains generic output like explorer + Available for: initial manifest, type manifest, type explorer, type codegen +__object:: + Directory that contains the current object + Available for: type manifest, type explorer, type codegen +__object_id:: + The type unique object id + Available for: type manifest, type explorer, type codegen +__target_host:: + The host we are deploying to. + Available for: initial manifest, type manifest, type codegen +__type:: + Path to the current type + Available for: type manifest +__type_explorers:: + Directory that contains the type explorers + Available for: type explorer + + +SEE ALSO +-------- +- cdist(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/doc/man/to_check/cdist-environment-variables.text b/doc/man/to_check/cdist-environment-variables.text deleted file mode 100644 index f39366f0..00000000 --- a/doc/man/to_check/cdist-environment-variables.text +++ /dev/null @@ -1,191 +0,0 @@ -cdist-reference(7) -================== -Nico Schottelius - -NAME ----- -cdist-reference - Variables, paths and types offered by cdist - - -DESCRIPTION ------------ -Various scripts which are not in the core need information on how -to find information. This manpage summarises the available environment -variables and clearifies with part may access with variables. - -PATHS ------ - - --------------------------------------------------------------------------------- -cdist-config-layout(7) -====================== -Nico Schottelius - - -NAME ----- -cdist-config-layout - Usage of paths in cdist - - -DESCRIPTION ------------ -If not specified otherwise, all paths are relative to the configuration -directory, which is normally /etc/cdist (but can be changed using environment -variables, see cdist-environment(7)). - -- conf_dir/: - Contains the (static) configuration like manifests, types and - explorers. - -- conf_dir/manifest/init: - This is the central entry point used by cdist-manifest-init(1). - It is an executable (+x bit set) shell script that can use - values from the explorers to decide which configuration to create - for the specified target host. - - It should be primary used to define mapping from configurations to hosts. - -- conf_dir/manifest/*: - All other files in this directory are not directly used by Cdist, but you - can seperate configuration mappings, if you have a lot of code in the - manifest/init file. This may also be very helpful to have different admins - maintain different groups of hosts. - -- conf_dir/explorer/ - Contains explorers to be run on the target hosts, see cdist-explorers(7). - -- conf_dir/type/ - Contains all available types, which are used to provide - some kind of functionality. See cdist-stages(7). - -- conf_dir/type//manifest: - Used to generate additional objects from a type. - See cdist-stages(7), cdist-types(7). - -- conf_dir/type//gencode: - Used to generate code to be executed on the client. - See cdist-types(7). - -- conf_dir/type//parameters/required: - Parameters required by type, \n seperated list. - See cdist-types(7). - -- conf_dir/type//parameters/optional: - Parameters optionally accepted by type, \n seperated list. - See cdist-types(7). - -- conf_dir/type//explorer: - Location of the type specific explorers. - See cdist-explorers(7). - -- out_dir/ - This directory contains output of cdist and is mirrored into the - cache after a successful run. This directory may be placed below - the tmpdir or at any other location and is also available on the - target. - -- out_dir/explorer: - Output of general explorers. - -- out_dir/object: - Objects created for the host. - -- out_dir/object//explorers: - Output of type specific explorers, per object. - -- tmp_dir: Temporary storage - A tempdir and a tempfile is provided by cdist-config(1), which - will be removed when the scripts ends automatically. - - -FUTURE ------- -The following functionality may be implemented in one of the next releases: - -- cache_dir/ - The cache contains the out_dir from previous runs, which - may also be used in types to gather information about other hosts - (like ssh-keys). - -- cache_dir/host/: - Contains the last out_dir of the specific host. - - -AUTHOR ------- -Nico Schottelius - - -RESOURCES ---------- -Main web site: http://www.nico.schottelius.org/cdist/[] - - -COPYING -------- -Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). --------------------------------------------------------------------------------- - - - -VARIABLES ---------- -__explorer:: - Directory that contains all explorers -__manifest:: - Directory that contains the initial manifest -__global:: - Directory that contains generic output like explorer -__object:: - Directory that contains the current object -__object_id:: - The type unique object id -__type_explorers:: - Directory that contains the type explorers - - -EXPLORER --------- -- __explorer - - -INITIAL MANIFEST ----------------- -- __manifest -- __global - - -TYPE MANIFEST -------------- -- __object -- __object_id -- __global - - -TYPE EXPLORER -------------- -- __object -- __object_id -- __type_explorers -- __global - - -TYPE CODEGEN ------------- -- __object -- __object_id -- __global - - - -SEE ALSO --------- -- cdist(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). From 2277880e4b75868300f7c958e50a289ae917c831 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 09:52:43 +0100 Subject: [PATCH 0590/6109] in theory finish type-listing to reference migration Signed-off-by: Nico Schottelius --- Makefile | 6 +- ...reference.text => cdist-reference.text.sh} | 74 ++++++++++++++-- doc/man/cdist-type-listing.text.sh | 87 ------------------- 3 files changed, 70 insertions(+), 97 deletions(-) rename doc/man/{cdist-reference.text => cdist-reference.text.sh} (67%) mode change 100644 => 100755 delete mode 100755 doc/man/cdist-type-listing.text.sh diff --git a/Makefile b/Makefile index 689b4a5a..9e3460f7 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ MANSRC=$(MANDIR)/cdist-config-layout.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-terms.text \ -MANGENERATED=$(MANDIR)/cdist-type-listing.text +MANGENERATED=$(MANDIR)/cdist-reference.text MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-bin-transfer.text \ @@ -52,8 +52,8 @@ doc/man/.marker: $(MANSRC) $(MANGENERATED) touch $@ # Only depends on cdist-type__*.text in reality -$(MANDIR)/cdist-type-listing.text: $(MANSRC) $(MANDIR)/cdist-type-listing.text.sh - $(MANDIR)/cdist-type-listing.text.sh +$(MANDIR)/cdist-reference.text: $(MANSRC) $(MANDIR)/cdist-reference.text.sh + $(MANDIR)/cdist-reference.text.sh clean: diff --git a/doc/man/cdist-reference.text b/doc/man/cdist-reference.text.sh old mode 100644 new mode 100755 similarity index 67% rename from doc/man/cdist-reference.text rename to doc/man/cdist-reference.text.sh index 72ee4f48..c8a49abd --- a/doc/man/cdist-reference.text +++ b/doc/man/cdist-reference.text.sh @@ -1,17 +1,53 @@ +#!/bin/sh +# +# 2010-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 . +# +# +# Generate manpage that lists available types +# + +__cdist_pwd="$(pwd -P)" +__cdist_mydir="${0%/*}"; +__cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" +__cdist_myname=${0##*/}; +__cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" + +filename="${__cdist_myname%.sh}" +dest="$__cdist_abs_mydir/$filename" + +cd "$__cdist_abs_mydir" + +# exec > "$dest" +cat << eof cdist-reference(7) ================== Nico Schottelius NAME ---- -cdist-reference - Variable, path and type reference +cdist-reference - Variable, path and type reference for cdist $(git describe) DESCRIPTION ----------- Various scripts which are not in the core need information on how to find information. This manpage summarises the available environment -variables and paths and clearifies with part may access with variables. +variables, types and paths and clearifies with part may access which variables. PATHS @@ -30,15 +66,15 @@ conf/manifest/init:: It should be primary used to define mapping from configurations to hosts. conf/manifest/*:: - All other files in this directory are not directly used by Cdist, but you + All other files in this directory are not directly used by cdist, but you can seperate configuration mappings, if you have a lot of code in the manifest/init file. This may also be very helpful to have different admins maintain different groups of hosts. -conf/explorer/: +conf/explorer/:: Contains explorers to be run on the target hosts, see cdist-explorer(7). -conf/type/: +conf/type/:: Contains all available types, which are used to provide some kind of functionality. See cdist-type(7). @@ -66,7 +102,7 @@ conf/type//explorer:: See cdist-explorer(7). -out/: +out/:: This directory contains output of cdist and is usually located in a temporary directory and thus will be removed after the run. @@ -86,11 +122,26 @@ out/object/:: out/object//explorers:: Output of type specific explorers, per object. -tmp_dir: Temporary storage: +tmp_dir:: A tempdir and a tempfile is used by cdist internally, which will be removed when the scripts end automatically. See cdist-config(1). +TYPES +----- +The following types are available: + +eof +for type in cdist-type__*.text; do + name_1="${type#cdist-type}" + name_2="${name_1%.text}" + + name="$name_2" + echo "- $name" +done + +cat << eof + VARIABLES --------- @@ -123,9 +174,18 @@ __type_explorers:: SEE ALSO -------- - cdist(7) +eof +for type in cdist-type__*.text; do + name_2="${type%.text}" + name="$name_2" + echo "- ${name}(7)" +done + +cat <. -# -# -# Generate manpage that lists available types -# - -__cdist_pwd="$(pwd -P)" -__cdist_mydir="${0%/*}"; -__cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" -__cdist_myname=${0##*/}; -__cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" - -filename="${__cdist_myname%.sh}" -dest="$__cdist_abs_mydir/$filename" - -cd "$__cdist_abs_mydir" - -exec > "$dest" - -cat << eof -cdist-type-listing(7) -===================== -Nico Schottelius - - -NAME ----- -cdist-type-listing - Available types in cdist - - -SYNOPSIS --------- -Types that are included in cdist $(git describe). - - -DESCRIPTION ------------ -The following types are available: - -eof -for type in cdist-type__*.text; do - name_1="${type#cdist-type}" - name_2="${name_1%.text}" - - name="$name_2" - echo "- $name" -done - -cat << eof - - -SEE ALSO --------- -- cdist-type(7) -eof -for type in cdist-type__*.text; do - name_2="${type%.text}" - - name="$name_2" - echo "- ${name}(7)" -done - -cat < Date: Wed, 9 Mar 2011 10:01:14 +0100 Subject: [PATCH 0591/6109] update pointers to cdist-reference Signed-off-by: Nico Schottelius --- Makefile | 1 - doc/changelog | 2 +- doc/man/.gitignore | 2 +- doc/man/cdist-deploy-to.text | 8 ++++---- doc/man/cdist-reference.text.sh | 16 ++++++++-------- doc/man/cdist-stages.text | 13 +++++++------ 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 9e3460f7..96924c4c 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,6 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-bin-transfer.text \ $(MANDIR)/cdist-deploy-to.text \ $(MANDIR)/cdist-manifest.text \ - $(MANDIR)/cdist-reference.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-type.text \ $(MANDIR)/cdist-type-template.text \ diff --git a/doc/changelog b/doc/changelog index 528b7e86..b39c512d 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,5 +1,5 @@ 1.0.2: upcoming - * Add manpages: cdist-type, cdist-type__file + * Add manpages: cdist-type, cdist-type__file, cdist-reference * Make doc/man/ usable as MANPATH entry 1.0.1: 2011-03-08 diff --git a/doc/man/.gitignore b/doc/man/.gitignore index 299485e8..8ed9d1e1 100644 --- a/doc/man/.gitignore +++ b/doc/man/.gitignore @@ -1,4 +1,4 @@ cdist.7 *.html cdist-design.7 -cdist-type-listing.text +cdist-reference.text diff --git a/doc/man/cdist-deploy-to.text b/doc/man/cdist-deploy-to.text index e09cba0a..acbb915a 100644 --- a/doc/man/cdist-deploy-to.text +++ b/doc/man/cdist-deploy-to.text @@ -30,10 +30,10 @@ variables are handled by cdist-config. SEE ALSO -------- -cdist(7), -cdist-config(1), -cdist-config-layout(7), -cdist-stages(7) +- cdist(7) +- cdist-config(1) +- cdist-reference(7) +- cdist-stages(7) COPYING diff --git a/doc/man/cdist-reference.text.sh b/doc/man/cdist-reference.text.sh index c8a49abd..2453c216 100755 --- a/doc/man/cdist-reference.text.sh +++ b/doc/man/cdist-reference.text.sh @@ -32,7 +32,7 @@ dest="$__cdist_abs_mydir/$filename" cd "$__cdist_abs_mydir" -# exec > "$dest" +exec > "$dest" cat << eof cdist-reference(7) ================== @@ -146,28 +146,28 @@ cat << eof VARIABLES --------- __explorer:: - Directory that contains all explorers + Directory that contains all explorers. Available for: explorer __manifest:: - Directory that contains the initial manifest + Directory that contains the initial manifest. Available for: initial manifest __global:: - Directory that contains generic output like explorer + Directory that contains generic output like explorer. Available for: initial manifest, type manifest, type explorer, type codegen __object:: - Directory that contains the current object + Directory that contains the current object. Available for: type manifest, type explorer, type codegen __object_id:: - The type unique object id + The type unique object id. Available for: type manifest, type explorer, type codegen __target_host:: The host we are deploying to. Available for: initial manifest, type manifest, type codegen __type:: - Path to the current type + Path to the current type. Available for: type manifest __type_explorers:: - Directory that contains the type explorers + Directory that contains the type explorers. Available for: type explorer diff --git a/doc/man/cdist-stages.text b/doc/man/cdist-stages.text index da6f4e02..4ab93cff 100644 --- a/doc/man/cdist-stages.text +++ b/doc/man/cdist-stages.text @@ -46,10 +46,9 @@ no conflicts may occur, i.e. no object of the same type with the same id may be created. Related manpages: + - cdist-manifest(7) - cdist-manifest-run(1) - cdist-manifest-run-init(1) - - cdist-manifest(7) - - cdist-config-layout(7) STAGE 3: EXECUTION OF TYPES @@ -67,9 +66,9 @@ may occur during the merge. A conflict would mean that two different objects try to create the same object, which indicates a broken configuration. Related manpages: - - cdist-type(7) - cdist-manifest-run(1) - cdist-manifest-run-all(1) + - cdist-type(7) STAGE 4: CODE GENERATION @@ -81,9 +80,9 @@ on stdout. If the gencode executable fails, it must print diagnostic messages on stderr and exit non-zero. Related manpages: - - cdist-types-gencode(7) - cdist-gencode(1) - cdist-gencode-all(1) + - cdist-type(7) STAGE 5: CODE EXECUTION @@ -92,8 +91,8 @@ The resulting code from the previous stage is transferred to the target host and executed there to apply the configuration changes, Related manpages: - - cdist-exec-transfer(1) - cdist-exec-run(1) + - cdist-exec-transfer(1) SUMMARY @@ -106,7 +105,9 @@ in correct order. SEE ALSO -------- -cdist(7), cdist-deploy-to(1), cdist-config-layout(7) +- cdist(7) +- cdist-deploy-to(1) +- cdist-reference(7) COPYING From a8c5f225b2b6427704fabffefb467e812312fb35 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 10:03:06 +0100 Subject: [PATCH 0592/6109] --todo Signed-off-by: Nico Schottelius --- Makefile | 2 ++ doc/dev/todo/niconext | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 96924c4c..ca86ac4d 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,7 @@ WEBDIR=$$HOME/niconetz WEBPAGE=software/cdist.mdwn MANDIR=doc/man +# Unchecked MANSRC=$(MANDIR)/cdist-config-layout.text \ $(MANDIR)/cdist-config.text \ $(MANDIR)/cdist-explorer.text \ @@ -16,6 +17,7 @@ MANSRC=$(MANDIR)/cdist-config-layout.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-terms.text \ +# Clean documentation MANGENERATED=$(MANDIR)/cdist-reference.text MANSRC=$(MANDIR)/cdist.text \ diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index f7acbe88..55598bfd 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,5 +1,2 @@ Documentation cleanup - - document environment variables - - and merge with config-layout! - - how to debug explorer - => 1.0.2 + - how to debug explorer => 1.0.2 From 19d3b52d73b05b735994221eae8582b2047800e7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 10:16:46 +0100 Subject: [PATCH 0593/6109] finish manpage cdist-explorer Signed-off-by: Nico Schottelius --- Makefile | 2 +- doc/changelog | 2 +- doc/man/cdist-explorer.text | 66 ++++++++++++++++++++++++++++ doc/man/to_check/cdist-explorer.text | 43 ------------------ 4 files changed, 68 insertions(+), 45 deletions(-) create mode 100644 doc/man/cdist-explorer.text delete mode 100644 doc/man/to_check/cdist-explorer.text diff --git a/Makefile b/Makefile index ca86ac4d..adf03e31 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,6 @@ MANDIR=doc/man # Unchecked MANSRC=$(MANDIR)/cdist-config-layout.text \ $(MANDIR)/cdist-config.text \ - $(MANDIR)/cdist-explorer.text \ $(MANDIR)/cdist-quickstart.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-terms.text \ @@ -23,6 +22,7 @@ MANGENERATED=$(MANDIR)/cdist-reference.text MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-bin-transfer.text \ $(MANDIR)/cdist-deploy-to.text \ + $(MANDIR)/cdist-explorer.text \ $(MANDIR)/cdist-manifest.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-type.text \ diff --git a/doc/changelog b/doc/changelog index b39c512d..4c356111 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,5 +1,5 @@ 1.0.2: upcoming - * Add manpages: cdist-type, cdist-type__file, cdist-reference + * Add manpages: cdist-type, cdist-type__file, cdist-reference, cdist-explorer * Make doc/man/ usable as MANPATH entry 1.0.1: 2011-03-08 diff --git a/doc/man/cdist-explorer.text b/doc/man/cdist-explorer.text new file mode 100644 index 00000000..9e40ca4b --- /dev/null +++ b/doc/man/cdist-explorer.text @@ -0,0 +1,66 @@ +cdist-explorer(7) +================= +Nico Schottelius + + +NAME +---- +cdist-explorer - Explore the target systems + + +DESCRIPTION +----------- +Explorer are small shell scripts, which will be executed on the target +host. The aim of the explorer is to give hints to types on how to act on the +target system. An explorer outputs the result to stdout, which is usually +a one liner, but may be empty or multi line especially in the case of +type explorers. + +There are general explorers, which are run in an early stage, and +type explorers. Both work almost exactly the same way, with the difference +that the values of the general explorers are stored in a general location and +the type specific below the object. + +Explorers can reuse other explorers on the target system by calling +$__explorer/ (general and type explorer) or +$__type_explorer/ (type explorer). + +In case of significant errors, the explorer may exit non-zero and return an +error message on stderr, which will cause the cdist run to abort. + + +EXAMPLES +-------- +A very simple explorer may look like this: + +-------------------------------------------------------------------------------- +hostname +-------------------------------------------------------------------------------- + +Which is in practise the "hostname" explorer. + +A type explorer, which could check for the status of a package may look like this: + +-------------------------------------------------------------------------------- +if [ -f "$__object/parameter/name" ]; then + name="$(cat "$__object/parameter/name")" +else + name="$__object_id" +fi + +# Except dpkg failing, if package is not known / installed +dpkg -s "$name" 2>/dev/null || exit 0 +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist(7) +- cdist-reference(7) +- cdist-stages(7) + + +COPYING +------- +Copyright \(C) 2010-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/doc/man/to_check/cdist-explorer.text b/doc/man/to_check/cdist-explorer.text deleted file mode 100644 index 659a01e1..00000000 --- a/doc/man/to_check/cdist-explorer.text +++ /dev/null @@ -1,43 +0,0 @@ -cdist-explorer(7) -================= -Nico Schottelius - - -NAME ----- -cdist-explorer - Explore the target systems - - -DESCRIPTION ------------ -Cdist explorer are small shell scripts, which will be executed -on the target host. The aim of the explorer is to give hints -to types on how to act on the target system. -The explorer output the result of its investigation -to stdout and should be a one-liner. The output may be empty, -though. - -Cdist knows about general explorers, which are run in an early -stage and type specific explorers. Both work exactly the same way, -with the difference that the values of the general explorers -are stored in a general location and the type specific below -the types. - -Explorers can reuse other explorers on the target system -by calling ./ (i.e. explorers are run -from their location). - -In case of significant errors, the shell script may exit -non-zero and return an error message on stderr, which -will cause the cdist run to abort. - - -SEE ALSO --------- -cdist(7), cdist-config-layout(7), cdist-stages(7) - - -COPYING -------- -Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). From adb9ed9ca506400da3f5c0adecc08e2499771efe Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 10:17:43 +0100 Subject: [PATCH 0594/6109] hint on debug / explorer Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 1 - doc/man/cdist-explorer.text | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 55598bfd..04dfc21b 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,2 +1 @@ Documentation cleanup - - how to debug explorer => 1.0.2 diff --git a/doc/man/cdist-explorer.text b/doc/man/cdist-explorer.text index 9e40ca4b..63c7a5c9 100644 --- a/doc/man/cdist-explorer.text +++ b/doc/man/cdist-explorer.text @@ -28,6 +28,8 @@ $__type_explorer/ (type explorer). In case of significant errors, the explorer may exit non-zero and return an error message on stderr, which will cause the cdist run to abort. +You can also use stderr for debugging purposes while developing a new +explorer. EXAMPLES -------- From 579d58625bcc3694ae61d5fbabafa7dbca3ebdf4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 10:36:58 +0100 Subject: [PATCH 0595/6109] setup date in changelog Signed-off-by: Nico Schottelius --- doc/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog b/doc/changelog index 4c356111..4ec2c47f 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,4 +1,4 @@ -1.0.2: upcoming +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 d88f4afc8722d4e3bdca3c318ee51474b3198b66 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 9 Mar 2011 12:01:54 +0100 Subject: [PATCH 0596/6109] +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 0597/6109] 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 0598/6109] 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 0599/6109] 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 0600/6109] 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 0601/6109] 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 0602/6109] 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 0603/6109] 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 0604/6109] 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 0605/6109] 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 0606/6109] 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 0607/6109] +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 0608/6109] 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 0609/6109] 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 0610/6109] 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 0611/6109] 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 0612/6109] 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 0613/6109] ++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 0614/6109] 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 0615/6109] 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 0616/6109] -^ 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 0617/6109] 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 0618/6109] 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 0619/6109] 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 0620/6109] __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 0621/6109] 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 0622/6109] 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 0623/6109] +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 0624/6109] +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 0625/6109] + 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 0626/6109] +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 0627/6109] 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 0628/6109] [__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 0629/6109] [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 0630/6109] [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 0631/6109] 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 0632/6109] 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 0633/6109] 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 0634/6109] 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 0635/6109] 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 0636/6109] 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 0637/6109] +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 0638/6109] [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 0639/6109] +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: From 8b614b274c6476fd3cfbae92f2c8d04bb10a3466 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 14 Mar 2011 09:32:18 +0100 Subject: [PATCH 0640/6109] fix fixing the merge conflict Signed-off-by: Steven Armstrong --- conf/manifest/init | 52 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100755 conf/manifest/init diff --git a/conf/manifest/init b/conf/manifest/init new file mode 100755 index 00000000..0a1dca50 --- /dev/null +++ b/conf/manifest/init @@ -0,0 +1,52 @@ +# +# This is a sample manifest, but used in real world +# + +# This is debug and should not be in a production environment +# 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 + # Everybody has this + localhost) + # Usual example + __file test --type symlink --source /etc/cdist-configured --destination /tmp/cdist-testfile + ;; + + # + # Examples using different types + # + + # Alias in /etc/hosts for localhost + cdist-archlinux) + # 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 + + # 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) + # Same stuff for gentoo + __package tree --state installed + ;; + cdist-debian) + __package_apt atop --state installed + __package apache2 --state deinstalled + ;; + + # Real machines may be used with their hostname or fqdn, + # depending on how you call cdist-deploy-to + # machine) + # ... + # ;; + # machine.example.org) + # ... + # ;; +esac From adbf670309fae0b4e9513d846689fac4f541fbe9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 14 Mar 2011 18:25:57 +0100 Subject: [PATCH 0641/6109] +mercurial Signed-off-by: Nico Schottelius --- REAL_README | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/REAL_README b/REAL_README index 0938289f..88d5de13 100644 --- a/REAL_README +++ b/REAL_README @@ -165,7 +165,8 @@ Yes, I'm actually eating my own dogfood and currently managing * [kerberos (mit)](http://web.mit.edu/kerberos/) (authentication) * [ircd-hybrid](http://www.ircd-hybrid.org/) (chat) * [stunnel](http://stunnel.mirt.net/) (SSL tunnel) + * [mercurial-server](http://www.lshift.net/mercurial-server.html) -with cdist on a total of **3** production servers of the +with cdist on a total of **4** production servers of the [Systems Group](http://www.systems.ethz.ch) at the [ETH Zurich](http://www.ethz.ch). From 27286c787dc468451ebaeb84ca6e20134462c574 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 14 Mar 2011 23:12:14 +0100 Subject: [PATCH 0642/6109] document files/ directories (in object and type) Signed-off-by: Nico Schottelius --- doc/man/cdist-type.text | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/man/cdist-type.text b/doc/man/cdist-type.text index 7c8b49f3..f8811a16 100644 --- a/doc/man/cdist-type.text +++ b/doc/man/cdist-type.text @@ -179,6 +179,14 @@ level tools like ruby installed. If a type requires specific tools to be present on the target, there must be another type that provides this tool and the first type should create an object of the specific type. +If your type wants to save temporay data, that may be used by other types +later on (for instance __file), you can save them in the subdirectory +"files" below $__object (but you must create it yourself). cdist will not touch +this directory. + +If your type contains static files, it's also recommened to place them in +a folder named "files" within the type (again, because cdist guarantees to +never ever touch this folder). HOW TO INCLUDE A TYPE INTO UPSTREAM CDIST ----------------------------------------- From 710ce98386848ecc1ce6a8c5f1fa426a22881ffa Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 14 Mar 2011 23:23:32 +0100 Subject: [PATCH 0643/6109] [DOC] __package_pacman gained manpage Signed-off-by: Nico Schottelius --- conf/type/__package_pacman/man.text | 53 +++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 conf/type/__package_pacman/man.text diff --git a/conf/type/__package_pacman/man.text b/conf/type/__package_pacman/man.text new file mode 100644 index 00000000..35a7e44c --- /dev/null +++ b/conf/type/__package_pacman/man.text @@ -0,0 +1,53 @@ +cdist-type__package_pacman(7) +============================= +Nico Schottelius + + +NAME +---- +cdist-type__package_pacman - Manage packages with pacman + + +DESCRIPTION +----------- +Pacman is usually used on the Archlinux distribution to manage +packages. + + +REQUIRED PARAMETERS +------------------- +state:: + Either "installed" or "deinstalled". + + +OPTIONAL PARAMETERS +------------------- +name:: + If supplied, use the name and not the object id as the package name. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Ensure zsh in installed +__package_pacman zsh --state installed + +# If you don't want to follow pythonX packages, but always use python +__package_pacman python --state installed --name python2 + +# Remove obsolete package +__package_pacman puppet --state deinstalled +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) +- cdist-type__package(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). From 49d3548f46581535de7adc7d8444fb930f9105fc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 14 Mar 2011 23:41:36 +0100 Subject: [PATCH 0644/6109] support debian/ubuntu in __motd Signed-off-by: Nico Schottelius --- conf/type/__motd/manifest | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/conf/type/__motd/manifest b/conf/type/__motd/manifest index 594977b9..a6e963f1 100755 --- a/conf/type/__motd/manifest +++ b/conf/type/__motd/manifest @@ -19,8 +19,6 @@ # # -destination=/etc/motd - # Select motd source if [ -f "$__object/parameter/source" ]; then source="$(cat "$__object/parameter/source")" @@ -28,4 +26,16 @@ else source="$__type/files/motd" fi +os=$(cat $__global/explorer/os) + + +case "$os" in + debian|ubuntu) + destination=/etc/motd.tail + ;; + *) + destination=/etc/motd + ;; +esac + __file "$destination" --source "$source" --type file From 1187a8594afb17205209376032dd62ca66e8c2fa Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 14 Mar 2011 23:41:46 +0100 Subject: [PATCH 0645/6109] more stuff for upcoming 1.0.4 Signed-off-by: Nico Schottelius --- conf/manifest/init | 1 + doc/changelog | 1 + 2 files changed, 2 insertions(+) diff --git a/conf/manifest/init b/conf/manifest/init index 0a1dca50..aa1a51da 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -14,6 +14,7 @@ case "$__target_host" in localhost) # Usual example __file test --type symlink --source /etc/cdist-configured --destination /tmp/cdist-testfile + __motd ;; # diff --git a/doc/changelog b/doc/changelog index c939b547..dc332cf2 100644 --- a/doc/changelog +++ b/doc/changelog @@ -2,6 +2,7 @@ * New type __motd * New type __addifnosuchline * Document type __issue + * Document type __package_pacman 1.0.3: 2011-03-11 * Update regexp used for sane characters From 8ff02673f0deca02e003c2a66bab0b3f524192ae Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 14 Mar 2011 23:43:00 +0100 Subject: [PATCH 0646/6109] remove __motd from localhost (not good as an example for testers) Signed-off-by: Nico Schottelius --- conf/manifest/init | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/manifest/init b/conf/manifest/init index aa1a51da..0a1dca50 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -14,7 +14,6 @@ case "$__target_host" in localhost) # Usual example __file test --type symlink --source /etc/cdist-configured --destination /tmp/cdist-testfile - __motd ;; # From 5821ceebbc3d7afeeaf3db7c34d4a0a8f9327636 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 00:00:25 +0100 Subject: [PATCH 0647/6109] add support for --owner and --group in __file Signed-off-by: Nico Schottelius --- conf/type/__file/gencode | 13 +++++++++++-- conf/type/__file/parameter/optional | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/conf/type/__file/gencode b/conf/type/__file/gencode index 5f386349..4921815c 100755 --- a/conf/type/__file/gencode +++ b/conf/type/__file/gencode @@ -109,6 +109,15 @@ esac # Mode settings if [ -f "$__object/parameter/mode" ]; then - mode="$(cat "$__object/parameters/mode")" - echo chmod \"$mode\" \"$destination\" + echo chmod \"$(cat "$__object/parameters/mode")\" \"$destination\" +fi + +# Group +if [ -f "$__object/parameter/group" ]; then + echo chgrp \"$(cat "$__object/parameters/group")\" \"$destination\" +fi + +# Owner +if [ -f "$__object/parameter/owner" ]; then + echo chown \"$(cat "$__object/parameters/owner")\" \"$destination\" fi diff --git a/conf/type/__file/parameter/optional b/conf/type/__file/parameter/optional index de17ffff..0c30f4be 100644 --- a/conf/type/__file/parameter/optional +++ b/conf/type/__file/parameter/optional @@ -1,3 +1,5 @@ +group mode +owner source destination From 2d4cbdddab02c94023fd54bdc0504cbd5f286cac Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 00:05:38 +0100 Subject: [PATCH 0648/6109] document new features Signed-off-by: Nico Schottelius --- conf/type/__file/man.text | 11 +++++++++++ doc/changelog | 1 + 2 files changed, 12 insertions(+) diff --git a/conf/type/__file/man.text b/conf/type/__file/man.text index 04e0ffc3..e1c13db8 100644 --- a/conf/type/__file/man.text +++ b/conf/type/__file/man.text @@ -25,9 +25,15 @@ destination:: If supplied, use this as the destination on the target. Otherwise the object_id is used. +group:: + Group to chgrp to. + mode:: Unix permissions, suitable for chmod. +owner:: + User to chown to. + source:: If supplied, copy this file from the host running cdist to the target. If not supplied, an empty file or directory will be created. @@ -45,6 +51,11 @@ __file cdist-marker --type file --destination /etc/cdist-configured # Use __file from another type __file /etc/issue --source "$__type/files/archlinux" --type file + +# Supply some more settings +__file /etc/shadow --source "$__type/files/shadow" --type file \ + --owner root --group shadow --mode 0640 + -------------------------------------------------------------------------------- diff --git a/doc/changelog b/doc/changelog index dc332cf2..e712c15f 100644 --- a/doc/changelog +++ b/doc/changelog @@ -3,6 +3,7 @@ * New type __addifnosuchline * Document type __issue * Document type __package_pacman + * New parameter for __file: --owner and --group 1.0.3: 2011-03-11 * Update regexp used for sane characters From fe2d4877ced09d6f8999ccd95b052d233d05e8a4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 00:06:50 +0100 Subject: [PATCH 0649/6109] -plural (old stuff) Signed-off-by: Nico Schottelius --- conf/type/__file/gencode | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/type/__file/gencode b/conf/type/__file/gencode index 4921815c..531cc203 100755 --- a/conf/type/__file/gencode +++ b/conf/type/__file/gencode @@ -109,15 +109,15 @@ esac # Mode settings if [ -f "$__object/parameter/mode" ]; then - echo chmod \"$(cat "$__object/parameters/mode")\" \"$destination\" + echo chmod \"$(cat "$__object/parameter/mode")\" \"$destination\" fi # Group if [ -f "$__object/parameter/group" ]; then - echo chgrp \"$(cat "$__object/parameters/group")\" \"$destination\" + echo chgrp \"$(cat "$__object/parameter/group")\" \"$destination\" fi # Owner if [ -f "$__object/parameter/owner" ]; then - echo chown \"$(cat "$__object/parameters/owner")\" \"$destination\" + echo chown \"$(cat "$__object/parameter/owner")\" \"$destination\" fi From aa4a23e7dd1ddffe6ef6e92dc3a0095720a663ca Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 00:18:31 +0100 Subject: [PATCH 0650/6109] doc: -\n Signed-off-by: Nico Schottelius --- conf/type/__file/man.text | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/type/__file/man.text b/conf/type/__file/man.text index e1c13db8..c60ada44 100644 --- a/conf/type/__file/man.text +++ b/conf/type/__file/man.text @@ -55,7 +55,6 @@ __file /etc/issue --source "$__type/files/archlinux" --type file # Supply some more settings __file /etc/shadow --source "$__type/files/shadow" --type file \ --owner root --group shadow --mode 0640 - -------------------------------------------------------------------------------- From 0aad5724612db50f04d5e8f223d0149f955171a4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 13:01:03 +0100 Subject: [PATCH 0651/6109] define dependency handling Signed-off-by: Nico Schottelius --- doc/dev/logs/2011-03-15 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 doc/dev/logs/2011-03-15 diff --git a/doc/dev/logs/2011-03-15 b/doc/dev/logs/2011-03-15 new file mode 100644 index 00000000..66de8aed --- /dev/null +++ b/doc/dev/logs/2011-03-15 @@ -0,0 +1,27 @@ +Steven, Nico + +How to handle dependencies: + +1) Add --require parameter for all types + - Special handling in cdist-type-emulator + + Everything on one line + +2) Add __require type + + No change in core + - Type influences core + - Additional line + - Core needs to know about requirements + +3) cdist-require as a seperate executable + + No change in cdist-type-emulator + - new behaviour + - first time cdist-xxx dependency in types + +4) require="" environment variable for cdist-type-emulator + + on one line / same context + + special handling is ok for special case + + doesn't touch parameters (i.e. type still has full control) + +-------------------------------------------------------------------------------- + +Result: Use version 4. From dfdd7644b2515dff05b0f22981bb121f8699ffda Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 16:29:11 +0100 Subject: [PATCH 0652/6109] make footer aequivalent to header 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 35c058d9..7f66888f 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 for $__cdist_target_host" +echo "cdist $__cdist_version: success on $__cdist_target_host" From 77381b9981fe3b9730e834522f0ae6fe0339cc26 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 16:35:04 +0100 Subject: [PATCH 0653/6109] cleanup manpages for __issue and __motd Signed-off-by: Nico Schottelius --- conf/type/__issue/man.text | 2 +- conf/type/__motd/man.text | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/type/__issue/man.text b/conf/type/__issue/man.text index 57ece530..18d88947 100644 --- a/conf/type/__issue/man.text +++ b/conf/type/__issue/man.text @@ -1,5 +1,5 @@ cdist-type__issue(7) -=================== +==================== Nico Schottelius diff --git a/conf/type/__motd/man.text b/conf/type/__motd/man.text index 1fca60d3..a4ca80b5 100644 --- a/conf/type/__motd/man.text +++ b/conf/type/__motd/man.text @@ -33,7 +33,7 @@ EXAMPLES __motd # Supply source file from a different type -__file --source "$__type/files/my-motd" +__motd --source "$__type/files/my-motd" -------------------------------------------------------------------------------- From 63452e0feefa68954d81c53a0a7a646c0777756c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 16:37:34 +0100 Subject: [PATCH 0654/6109] document __package_apt Signed-off-by: Nico Schottelius --- conf/type/__package_apt/man.text | 53 ++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 conf/type/__package_apt/man.text diff --git a/conf/type/__package_apt/man.text b/conf/type/__package_apt/man.text new file mode 100644 index 00000000..0780124d --- /dev/null +++ b/conf/type/__package_apt/man.text @@ -0,0 +1,53 @@ +cdist-type__package_apt(7) +========================== +Nico Schottelius + + +NAME +---- +cdist-type__package_apt - Manage packages with apt-get + + +DESCRIPTION +----------- +apt-get is usually used on Debian and variants (like Ubuntu) to +manage packages. + + +REQUIRED PARAMETERS +------------------- +state:: + Either "installed" or "deinstalled". + + +OPTIONAL PARAMETERS +------------------- +name:: + If supplied, use the name and not the object id as the package name. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Ensure zsh in installed +__package_apt zsh --state installed + +# In case you only want *a* webserver, but don't care which one +__package_apt webserver --state installed --name nginx + +# Remove obsolete package +__package_apt puppet --state deinstalled +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) +- cdist-type__package(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). From 05742ae432f2b98c74e5f7c4fc9809f322433784 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 16:38:25 +0100 Subject: [PATCH 0655/6109] +changelog Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index e712c15f..50fb9de1 100644 --- a/doc/changelog +++ b/doc/changelog @@ -3,6 +3,7 @@ * New type __addifnosuchline * Document type __issue * Document type __package_pacman + * Document type __package_apt * New parameter for __file: --owner and --group 1.0.3: 2011-03-11 From 8d8491232c4e2a90861c023161b10a6dabc4283b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 16:41:04 +0100 Subject: [PATCH 0656/6109] add template for type __directory Signed-off-by: Nico Schottelius --- conf/type/__directory/explorer/exists | 34 ++++++++++++ conf/type/__directory/gencode | 63 ++++++++++++++++++++++ conf/type/__directory/man.text | 69 ++++++++++++++++++++++++ conf/type/__directory/parameter/optional | 5 ++ conf/type/__directory/parameter/required | 1 + 5 files changed, 172 insertions(+) create mode 100755 conf/type/__directory/explorer/exists create mode 100755 conf/type/__directory/gencode create mode 100644 conf/type/__directory/man.text create mode 100644 conf/type/__directory/parameter/optional create mode 100644 conf/type/__directory/parameter/required diff --git a/conf/type/__directory/explorer/exists b/conf/type/__directory/explorer/exists new file mode 100755 index 00000000..b0be82fc --- /dev/null +++ b/conf/type/__directory/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 diff --git a/conf/type/__directory/gencode b/conf/type/__directory/gencode new file mode 100755 index 00000000..08429b14 --- /dev/null +++ b/conf/type/__directory/gencode @@ -0,0 +1,63 @@ +#!/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 . +# +# +# Handle directories +# + +# If destination was specified, do not use the id +if [ -f "$__object/parameter/destination" ]; then + destination="$(cat "$__object/parameter/destination")" +else + # If no destination has been supplied, the id is the destination + # Prepend /, which got lost in the object id (and relative paths + # don't make sense) + destination="/$__object_id" +fi + +# Ensure we have an absolute path +if ! $(echo "$destination" | grep -q ^/); then + echo "Error: Destination ($destination) of $__object_id is not absolute." >&2 + exit 1 +fi + +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 + + +# Mode settings +if [ -f "$__object/parameter/mode" ]; then + echo chmod \"$(cat "$__object/parameter/mode")\" \"$destination\" +fi + +# Group +if [ -f "$__object/parameter/group" ]; then + echo chgrp \"$(cat "$__object/parameter/group")\" \"$destination\" +fi + +# Owner +if [ -f "$__object/parameter/owner" ]; then + echo chown \"$(cat "$__object/parameter/owner")\" \"$destination\" +fi diff --git a/conf/type/__directory/man.text b/conf/type/__directory/man.text new file mode 100644 index 00000000..c60ada44 --- /dev/null +++ b/conf/type/__directory/man.text @@ -0,0 +1,69 @@ +cdist-type__file(7) +=================== +Nico Schottelius + + +NAME +---- +cdist-type__file - Create files + + +DESCRIPTION +----------- +This cdist type allows you to create files on the target. + + +REQUIRED PARAMETERS +------------------- +type:: + Specifies the type of file to be created. Either "directory" or "file" + + +OPTIONAL PARAMETERS +------------------- +destination:: + If supplied, use this as the destination on the target. Otherwise the + object_id is used. + +group:: + Group to chgrp to. + +mode:: + Unix permissions, suitable for chmod. + +owner:: + User to chown to. + +source:: + If supplied, copy this file from the host running cdist to the target. + If not supplied, an empty file or directory will be created. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Create /etc/cdist-configured as an empty file +__file /etc/cdist-configured --type file + +# Same but with a different object id +__file cdist-marker --type file --destination /etc/cdist-configured + +# Use __file from another type +__file /etc/issue --source "$__type/files/archlinux" --type file + +# Supply some more settings +__file /etc/shadow --source "$__type/files/shadow" --type file \ + --owner root --group shadow --mode 0640 +-------------------------------------------------------------------------------- + + +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/__directory/parameter/optional b/conf/type/__directory/parameter/optional new file mode 100644 index 00000000..0c30f4be --- /dev/null +++ b/conf/type/__directory/parameter/optional @@ -0,0 +1,5 @@ +group +mode +owner +source +destination diff --git a/conf/type/__directory/parameter/required b/conf/type/__directory/parameter/required new file mode 100644 index 00000000..aa80e646 --- /dev/null +++ b/conf/type/__directory/parameter/required @@ -0,0 +1 @@ +type From a9d0bfee16c484696b0a1230bb6b94ad29a9adfc Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 15 Mar 2011 16:47:40 +0100 Subject: [PATCH 0657/6109] new type __user Signed-off-by: Steven Armstrong --- conf/type/__user/TODO | 3 ++ conf/type/__user/explorer/passwd | 27 +++++++++++++ conf/type/__user/gencode | 44 ++++++++++++++++++++ conf/type/__user/man.text | 62 +++++++++++++++++++++++++++++ conf/type/__user/parameter/optional | 7 ++++ 5 files changed, 143 insertions(+) create mode 100644 conf/type/__user/TODO create mode 100755 conf/type/__user/explorer/passwd create mode 100755 conf/type/__user/gencode create mode 100644 conf/type/__user/man.text create mode 100644 conf/type/__user/parameter/optional diff --git a/conf/type/__user/TODO b/conf/type/__user/TODO new file mode 100644 index 00000000..5c2eec7d --- /dev/null +++ b/conf/type/__user/TODO @@ -0,0 +1,3 @@ +- gencode: compair new value with existing one in $__object/explorer/passwd, only change if nessecary +- delete users + diff --git a/conf/type/__user/explorer/passwd b/conf/type/__user/explorer/passwd new file mode 100755 index 00000000..fdbfb193 --- /dev/null +++ b/conf/type/__user/explorer/passwd @@ -0,0 +1,27 @@ +#!/bin/sh +# +# 2011 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 . +# +# +# Get an existing users passwd entry. +# + +name=$__object_id + +getent passwd "$name" || true + diff --git a/conf/type/__user/gencode b/conf/type/__user/gencode new file mode 100755 index 00000000..7445d6f8 --- /dev/null +++ b/conf/type/__user/gencode @@ -0,0 +1,44 @@ +#!/bin/sh +# +# 2011 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 . +# +# +# Manage users. +# + +name="$__object_id" + +command= +if grep -q "^$name" "$__object/explorer/passwd"; then + # user exists + command="usermod" +else + # user does not exist + command="useradd" +fi + + +set -- "$@" +cd "$__object/parameter" +for property in $(ls .); do + # TODO: compair new value with existing one in $__object/explorer/passwd, only change if nessecary + set -- "$@" "--$property" "$(cat "$property")" +done + +echo $command $@ $name + diff --git a/conf/type/__user/man.text b/conf/type/__user/man.text new file mode 100644 index 00000000..e571c7c5 --- /dev/null +++ b/conf/type/__user/man.text @@ -0,0 +1,62 @@ +cdist-type__user(7) +=================== +Steven Armstrong + + +NAME +---- +cdist-type__user - Manage users + + +DESCRIPTION +----------- +This cdist type allows you to create or modify users on the target. + + +REQUIRED PARAMETERS +------------------- +None. + + +OPTIONAL PARAMETERS +------------------- +comment:: + see usermod(8) +home:: + see above +gid:: + see above +groups:: + see above +password:: + see above +shell:: + see above +uid:: + see above + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Create user account for foobar with operating system default settings +__user foobar + +# Same but with a different shell +__user foobar --shell /bin/zsh + +# Set explicit uid and home +__user foobar --uid 1001 --shell /bin/zsh --home /home/foobar +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +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). diff --git a/conf/type/__user/parameter/optional b/conf/type/__user/parameter/optional new file mode 100644 index 00000000..fe02e227 --- /dev/null +++ b/conf/type/__user/parameter/optional @@ -0,0 +1,7 @@ +comment +home +gid +groups +password +shell +uid From 26b10dec6906bf93cd5dec6017d4dafa04eae669 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 15 Mar 2011 17:01:35 +0100 Subject: [PATCH 0658/6109] +man Signed-off-by: Steven Armstrong --- conf/type/__package/man.text | 61 ++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 conf/type/__package/man.text diff --git a/conf/type/__package/man.text b/conf/type/__package/man.text new file mode 100644 index 00000000..eeeceba0 --- /dev/null +++ b/conf/type/__package/man.text @@ -0,0 +1,61 @@ +cdist-type__user(7) +=================== +Steven Armstrong + + +NAME +---- +cdist-type__package - Manage packages + + +DESCRIPTION +----------- +This cdist type allows you to install or uninstall packages on the target. +It dispatches the actual work to the package system dependant types. + + +REQUIRED PARAMETERS +------------------- +state:: + The state the package should be in, either "installed" or "uninstalled" + + +OPTIONAL PARAMETERS +------------------- +name:: + The name of the package to install. Default is to use the object_id as the + package name. +version:: + The version of the package to install. Default is to install the version + choosen by the local package manager. +type:: + The package type to use. Default is determined based on the $os explorer + variable. + e.g. __package_apt for Debian + __package_emerge for Gentoo + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Install the package vim on the target +__package vim --state installed + +# Same but install specific version +__package vim --state installed --version 7.3.50 + +# Force use of a specific package type +__package vim --state installed --type __package_apt +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +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). From f2f67ad0ad5713ae67b72fbdbe5a928b4a47a317 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 15 Mar 2011 17:09:45 +0100 Subject: [PATCH 0659/6109] +man __package_emerge/man.text Signed-off-by: Steven Armstrong --- conf/type/__package_emerge/man.text | 58 +++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 conf/type/__package_emerge/man.text diff --git a/conf/type/__package_emerge/man.text b/conf/type/__package_emerge/man.text new file mode 100644 index 00000000..002821dd --- /dev/null +++ b/conf/type/__package_emerge/man.text @@ -0,0 +1,58 @@ +cdist-type__user(7) +=================== +Steven Armstrong + + +NAME +---- +cdist-type__package_emerge - Manage packages on Gentoo Linux + + +DESCRIPTION +----------- +This cdist type allows you to install or uninstall packages on a Gentoo Linux +target. + + +REQUIRED PARAMETERS +------------------- +state:: + The state the package should be in, either "installed" or "uninstalled" + + +OPTIONAL PARAMETERS +------------------- +name:: + The name of the package to install. Default is to use the object_id as the + package name. +version:: + FIXME: not yet implemented + The version of the package to install. Default is to install the version + choosen by the local package manager. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Install the package vim on the target +__package_emerge screen --state installed + +# Same but use full qualified package name +__package_emerge app-misc/screen --state installed + +# Same but use install specific package version +# FIXME: not yet implemented +__package_emerge app-misc/screen --state installed --version 4.0.3 +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +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). From bead47f6bf52862c7f3e5df5b2a91304f1b39009 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 15 Mar 2011 17:10:27 +0100 Subject: [PATCH 0660/6109] remove currently unhandled parameter Signed-off-by: Steven Armstrong --- conf/type/__package_emerge/parameter/optional | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/type/__package_emerge/parameter/optional b/conf/type/__package_emerge/parameter/optional index a52167d3..f121bdbf 100644 --- a/conf/type/__package_emerge/parameter/optional +++ b/conf/type/__package_emerge/parameter/optional @@ -1,2 +1 @@ name -version From f5ed590e16995eb2b10da52c8b57b6d1582f68d1 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 15 Mar 2011 17:15:35 +0100 Subject: [PATCH 0661/6109] changelog++ Signed-off-by: Steven Armstrong --- doc/changelog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/changelog b/doc/changelog index c939b547..534f4c3e 100644 --- a/doc/changelog +++ b/doc/changelog @@ -2,6 +2,9 @@ * New type __motd * New type __addifnosuchline * Document type __issue + * New type __user + * Document type __package + * Document type __package_emerge 1.0.3: 2011-03-11 * Update regexp used for sane characters From 88e48c391e2ab3361bf76ad107c408933cb556a7 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 15 Mar 2011 17:19:20 +0100 Subject: [PATCH 0662/6109] fix borken paths in cdist-type-template Signed-off-by: Steven Armstrong --- bin/cdist-type-template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cdist-type-template b/bin/cdist-type-template index 0391510c..cd34027c 100755 --- a/bin/cdist-type-template +++ b/bin/cdist-type-template @@ -37,7 +37,7 @@ touch "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_parameter_re touch "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_parameter_optional}" # Manifest -cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_manifest}" +cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_manifest}" # # This is the manifest, which can be used to create other objects like this: @@ -50,7 +50,7 @@ cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_parameter_ eof # Gencode -cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_gencode}" +cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_gencode}" # # This file should generate code on stdout, which will be collected by cdist @@ -63,4 +63,4 @@ cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_parameter_ eof # Explorer -mkdir -p "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_explorer}" +mkdir -p "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_explorer}" From 4f8932c1427b3491f05dd289fd08e448d67e3bac Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 15 Mar 2011 19:07:58 +0100 Subject: [PATCH 0663/6109] Documented parameters for __addifnosuchline --- .../to_check/cdist-type-addifnosuchline.text | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/doc/man/to_check/cdist-type-addifnosuchline.text b/doc/man/to_check/cdist-type-addifnosuchline.text index 09618dc3..12690000 100644 --- a/doc/man/to_check/cdist-type-addifnosuchline.text +++ b/doc/man/to_check/cdist-type-addifnosuchline.text @@ -19,6 +19,31 @@ cdist-type-addifnosuchline can be used to check a file for existence of a specific line and adding that if not found +REQUIRED PARAMETERS +------------------- +line:: + Specifies the content which shall be added if not existing. + + +OPTIONAL PARAMETERS +------------------- +file:: + If supplied, use this as the destination file. Otherwise the + object_id is used. + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Creates or appends the line specifiend in "foo" to the file "bar" + +__addifnosuchline foo --file bar --line foo + +# Adds the line "foo2" to the file "bar" +__addifnosuchline foo --file bar --line foo2 + +-------------------------------------------------------------------------------- + SEE ALSO -------- cdist(7) From 7c4cff6286ffa121df9bb8d6624c289df03c94a0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 19:56:49 +0100 Subject: [PATCH 0664/6109] + type proposal Signed-off-by: Nico Schottelius --- doc/dev/logs/2011-03-15.file_directory_link | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/dev/logs/2011-03-15.file_directory_link diff --git a/doc/dev/logs/2011-03-15.file_directory_link b/doc/dev/logs/2011-03-15.file_directory_link new file mode 100644 index 00000000..ba4607ca --- /dev/null +++ b/doc/dev/logs/2011-03-15.file_directory_link @@ -0,0 +1,7 @@ +Proposal for new types, which replace __file: + +__directory /etc [--mode --owner --group --parents [yes|no] ] + +__link /destination --source abc --type [symbolic|hard] + +__file /etc/passwd [--source] --mode --owner --group From f306004c9ca018abad6e1e1207ace40f01035127 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 15 Mar 2011 20:16:56 +0100 Subject: [PATCH 0665/6109] Moved manpages for addifnosuchline --- asd | 0 doc/man/{to_check => }/cdist-type-addifnosuchline.text | 0 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 asd rename doc/man/{to_check => }/cdist-type-addifnosuchline.text (100%) diff --git a/asd b/asd deleted file mode 100644 index e69de29b..00000000 diff --git a/doc/man/to_check/cdist-type-addifnosuchline.text b/doc/man/cdist-type-addifnosuchline.text similarity index 100% rename from doc/man/to_check/cdist-type-addifnosuchline.text rename to doc/man/cdist-type-addifnosuchline.text From 3d24edae511bb57002b62e2e5a4c0a8d8a223a87 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 20:37:23 +0100 Subject: [PATCH 0666/6109] + template for __link Signed-off-by: Nico Schottelius --- conf/type/__link/gencode | 43 ++++++++++++++++++++++ conf/type/__link/man.text | 57 +++++++++++++++++++++++++++++ conf/type/__link/parameter/optional | 5 +++ conf/type/__link/parameter/required | 1 + 4 files changed, 106 insertions(+) create mode 100755 conf/type/__link/gencode create mode 100644 conf/type/__link/man.text create mode 100644 conf/type/__link/parameter/optional create mode 100644 conf/type/__link/parameter/required diff --git a/conf/type/__link/gencode b/conf/type/__link/gencode new file mode 100755 index 00000000..4a97ac34 --- /dev/null +++ b/conf/type/__link/gencode @@ -0,0 +1,43 @@ +#!/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 . +# +# +# __file is a very basic type and should be able to be used as an +# example for typewrites later +# + +destination="/$__object_id" + +type="$(cat "$__object/parameter/type")" +source="$(cat "$__object/parameter/source")" + +case "$type" in + symbolic) + lnopt="-s" + ;; + hard) + lnopt="" + ;; + *) + echo "Unknown type: $type" >&2 + exit 1 + ;; +esac + +echo ln ${lnopts} -f \"$source\" \"$destination\" diff --git a/conf/type/__link/man.text b/conf/type/__link/man.text new file mode 100644 index 00000000..5022697a --- /dev/null +++ b/conf/type/__link/man.text @@ -0,0 +1,57 @@ +cdist-type__link(7) +=================== +Nico Schottelius + + +NAME +---- +cdist-type__link - Create links + + +DESCRIPTION +----------- +This cdist type allows you to hard and symoblic links. The given +object id is the destination for the link. + + +REQUIRED PARAMETERS +------------------- +source:: + Specifies the link source. + +source:: + Specifies the link type: Either hard or symoblic. + + +OPTIONAL PARAMETERS +------------------- +None. + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Create /etc/cdist-configured as an empty file +__file /etc/cdist-configured --type file + +# Same but with a different object id +__file cdist-marker --type file --destination /etc/cdist-configured + +# Use __file from another type +__file /etc/issue --source "$__type/files/archlinux" --type file + +# Supply some more settings +__file /etc/shadow --source "$__type/files/shadow" --type file \ + --owner root --group shadow --mode 0640 +-------------------------------------------------------------------------------- + + +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/__link/parameter/optional b/conf/type/__link/parameter/optional new file mode 100644 index 00000000..0c30f4be --- /dev/null +++ b/conf/type/__link/parameter/optional @@ -0,0 +1,5 @@ +group +mode +owner +source +destination diff --git a/conf/type/__link/parameter/required b/conf/type/__link/parameter/required new file mode 100644 index 00000000..aa80e646 --- /dev/null +++ b/conf/type/__link/parameter/required @@ -0,0 +1 @@ +type From b8c68fcb9eacd5652047f7fdd763e835f65b5951 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 20:37:51 +0100 Subject: [PATCH 0667/6109] remove explorer for __directory Signed-off-by: Nico Schottelius --- conf/type/__directory/gencode | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/conf/type/__directory/gencode b/conf/type/__directory/gencode index 08429b14..99a89bd1 100755 --- a/conf/type/__directory/gencode +++ b/conf/type/__directory/gencode @@ -37,13 +37,8 @@ if ! $(echo "$destination" | grep -q ^/); then exit 1 fi -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 +if [ no = "$(cat "$__object/explorer/exists")" ]; then + echo mkdir \"$destination\" fi From 2072fc196f3ed01b045e3836f6afb33f27fdf335 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 15 Mar 2011 20:46:15 +0100 Subject: [PATCH 0668/6109] Examples changed --- doc/man/cdist-type-addifnosuchline.text | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/man/cdist-type-addifnosuchline.text b/doc/man/cdist-type-addifnosuchline.text index 12690000..2222283a 100644 --- a/doc/man/cdist-type-addifnosuchline.text +++ b/doc/man/cdist-type-addifnosuchline.text @@ -15,14 +15,14 @@ cdist-type-addifnosuchline Add if no such line DESCRIPTION ----------- -cdist-type-addifnosuchline can be used to check a file for existence of a +cdist-type-addifnosuchline can be used to check a file for existence of a specific line and adding that if not found REQUIRED PARAMETERS ------------------- line:: - Specifies the content which shall be added if not existing. + Specifies the content which shall be added if not existing. OPTIONAL PARAMETERS @@ -35,12 +35,12 @@ EXAMPLES -------- -------------------------------------------------------------------------------- -# Creates or appends the line specifiend in "foo" to the file "bar" +# Creates or appends the line specifiend in "include_www" to the file "lighttpd.conf" -__addifnosuchline foo --file bar --line foo +__addifnosuchline www --file lighttpd.conf --line include_www -# Adds the line "foo2" to the file "bar" -__addifnosuchline foo --file bar --line foo2 +# Adds the line "include_git" to the file "bar" +__addifnosuchline git_web --file lighttpd.conf --line include_git -------------------------------------------------------------------------------- From 4c59a0fde14312ad06734ca0ec60ef822b5892a6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 20:51:09 +0100 Subject: [PATCH 0669/6109] cleanup __link Signed-off-by: Nico Schottelius --- conf/type/__link/man.text | 20 +++++++++----------- conf/type/__link/parameter/optional | 5 ----- conf/type/__link/parameter/required | 1 + 3 files changed, 10 insertions(+), 16 deletions(-) delete mode 100644 conf/type/__link/parameter/optional diff --git a/conf/type/__link/man.text b/conf/type/__link/man.text index 5022697a..db124cb9 100644 --- a/conf/type/__link/man.text +++ b/conf/type/__link/man.text @@ -19,7 +19,7 @@ REQUIRED PARAMETERS source:: Specifies the link source. -source:: +type:: Specifies the link type: Either hard or symoblic. @@ -31,18 +31,16 @@ EXAMPLES -------- -------------------------------------------------------------------------------- -# Create /etc/cdist-configured as an empty file -__file /etc/cdist-configured --type file +# Create hard link of /etc/shadow +__file /root/shadow --source /etc/shadow --type hard -# Same but with a different object id -__file cdist-marker --type file --destination /etc/cdist-configured +# Relative symbolic link +__file /etc/apache2/sites-enabled/www.test.ch \ + --source ../sites-available/www.test.ch \ + --type symbolic -# Use __file from another type -__file /etc/issue --source "$__type/files/archlinux" --type file - -# Supply some more settings -__file /etc/shadow --source "$__type/files/shadow" --type file \ - --owner root --group shadow --mode 0640 +# Relative absolute link +__file /opt/plone --source /home/services/plone --type symbolic -------------------------------------------------------------------------------- diff --git a/conf/type/__link/parameter/optional b/conf/type/__link/parameter/optional deleted file mode 100644 index 0c30f4be..00000000 --- a/conf/type/__link/parameter/optional +++ /dev/null @@ -1,5 +0,0 @@ -group -mode -owner -source -destination diff --git a/conf/type/__link/parameter/required b/conf/type/__link/parameter/required index aa80e646..f7facfb8 100644 --- a/conf/type/__link/parameter/required +++ b/conf/type/__link/parameter/required @@ -1 +1,2 @@ +source type From 42c87edad1bafbb143822ef3f3bf43363a6d1b46 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 15 Mar 2011 20:52:52 +0100 Subject: [PATCH 0670/6109] moved __package_gentoo to gentoo branch Signed-off-by: Steven Armstrong --- conf/type/__package_emerge/gencode | 43 -------------- conf/type/__package_emerge/man.text | 58 ------------------- conf/type/__package_emerge/manifest | 36 ------------ conf/type/__package_emerge/parameter/optional | 1 - conf/type/__package_emerge/parameter/required | 1 - 5 files changed, 139 deletions(-) delete mode 100755 conf/type/__package_emerge/gencode delete mode 100644 conf/type/__package_emerge/man.text delete mode 100755 conf/type/__package_emerge/manifest delete mode 100644 conf/type/__package_emerge/parameter/optional delete mode 100644 conf/type/__package_emerge/parameter/required diff --git a/conf/type/__package_emerge/gencode b/conf/type/__package_emerge/gencode deleted file mode 100755 index 47e8bc5e..00000000 --- a/conf/type/__package_emerge/gencode +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh -# -# 2011 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 . -# -# -# Manage packages on gentoo. -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -state="$(cat "$__object/parameter/state")" - -case "$state" in - installed) - # FIXME: only install if not already installed - echo "emerge -q \"$name\"" - ;; - uninstalled) - # FIXME: only uninstall if currently installed - echo "emerge -q -C \"$name\"" - ;; -esac - -exit 0 diff --git a/conf/type/__package_emerge/man.text b/conf/type/__package_emerge/man.text deleted file mode 100644 index 002821dd..00000000 --- a/conf/type/__package_emerge/man.text +++ /dev/null @@ -1,58 +0,0 @@ -cdist-type__user(7) -=================== -Steven Armstrong - - -NAME ----- -cdist-type__package_emerge - Manage packages on Gentoo Linux - - -DESCRIPTION ------------ -This cdist type allows you to install or uninstall packages on a Gentoo Linux -target. - - -REQUIRED PARAMETERS -------------------- -state:: - The state the package should be in, either "installed" or "uninstalled" - - -OPTIONAL PARAMETERS -------------------- -name:: - The name of the package to install. Default is to use the object_id as the - package name. -version:: - FIXME: not yet implemented - The version of the package to install. Default is to install the version - choosen by the local package manager. - - -EXAMPLES --------- - --------------------------------------------------------------------------------- -# Install the package vim on the target -__package_emerge screen --state installed - -# Same but use full qualified package name -__package_emerge app-misc/screen --state installed - -# Same but use install specific package version -# FIXME: not yet implemented -__package_emerge app-misc/screen --state installed --version 4.0.3 --------------------------------------------------------------------------------- - - -SEE ALSO --------- -- cdist-type(7) - - -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). diff --git a/conf/type/__package_emerge/manifest b/conf/type/__package_emerge/manifest deleted file mode 100755 index 178fa510..00000000 --- a/conf/type/__package_emerge/manifest +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -# 2011 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 . -# -# -# __package is an abstract type which dispatches to the lower level -# __package_$name types which do the actual interaction with the packaging -# system. -# - -# TODO: depend on package gentoolkit for qpkg - -# TODO: -# if /var/cache/eix is older then /usr/portage/metadata/timestamp -# then run /usr/bin/eix-update -# -# check if package is installed: -# -# get currently installed version: -# - diff --git a/conf/type/__package_emerge/parameter/optional b/conf/type/__package_emerge/parameter/optional deleted file mode 100644 index f121bdbf..00000000 --- a/conf/type/__package_emerge/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -name diff --git a/conf/type/__package_emerge/parameter/required b/conf/type/__package_emerge/parameter/required deleted file mode 100644 index ff72b5c7..00000000 --- a/conf/type/__package_emerge/parameter/required +++ /dev/null @@ -1 +0,0 @@ -state From c010c9b2886c1786b13c2bfadeea71a61bf1e1bd Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 15 Mar 2011 21:02:47 +0100 Subject: [PATCH 0671/6109] moved manpages --- .../type/__addifnosuchline/man.text | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/man/cdist-type-addifnosuchline.text => conf/type/__addifnosuchline/man.text (100%) diff --git a/doc/man/cdist-type-addifnosuchline.text b/conf/type/__addifnosuchline/man.text similarity index 100% rename from doc/man/cdist-type-addifnosuchline.text rename to conf/type/__addifnosuchline/man.text From 86d98ddec4aefe663c9f5bda4fc5e38819864cd6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 21:06:18 +0100 Subject: [PATCH 0672/6109] begin cleanup doc for __directory Signed-off-by: Nico Schottelius --- conf/type/__directory/gencode | 31 +++++++++++++++---------------- conf/type/__directory/man.text | 20 +++++++------------- 2 files changed, 22 insertions(+), 29 deletions(-) diff --git a/conf/type/__directory/gencode b/conf/type/__directory/gencode index 99a89bd1..6d226aae 100755 --- a/conf/type/__directory/gencode +++ b/conf/type/__directory/gencode @@ -20,28 +20,27 @@ # # Handle directories # +# +# __directory /etc [--mode --owner --group --parents [yes|no] ] +# -# If destination was specified, do not use the id -if [ -f "$__object/parameter/destination" ]; then - destination="$(cat "$__object/parameter/destination")" -else - # If no destination has been supplied, the id is the destination - # Prepend /, which got lost in the object id (and relative paths - # don't make sense) - destination="/$__object_id" -fi - -# Ensure we have an absolute path -if ! $(echo "$destination" | grep -q ^/); then - echo "Error: Destination ($destination) of $__object_id is not absolute." >&2 - exit 1 +destination="/$__object_id" + +# Include parent directories? +if [ -f "$__object/parameter/parents" ]; then + parents="$(cat "$__object/parameter/parents")" + if [ yes = "$parents" ]; then + mkdiropt="-p" + else + mkdiropt="" + fi fi +# Only create if not already existent if [ no = "$(cat "$__object/explorer/exists")" ]; then - echo mkdir \"$destination\" + echo mkdir $mkdiropt \"$destination\" fi - # Mode settings if [ -f "$__object/parameter/mode" ]; then echo chmod \"$(cat "$__object/parameter/mode")\" \"$destination\" diff --git a/conf/type/__directory/man.text b/conf/type/__directory/man.text index c60ada44..a619666d 100644 --- a/conf/type/__directory/man.text +++ b/conf/type/__directory/man.text @@ -1,30 +1,25 @@ -cdist-type__file(7) -=================== +cdist-type__directory(7) +======================== Nico Schottelius NAME ---- -cdist-type__file - Create files +cdist-type__directory - Create a directory DESCRIPTION ----------- -This cdist type allows you to create files on the target. +This cdist type allows you to create directories on the target. REQUIRED PARAMETERS ------------------- -type:: - Specifies the type of file to be created. Either "directory" or "file" +None. OPTIONAL PARAMETERS ------------------- -destination:: - If supplied, use this as the destination on the target. Otherwise the - object_id is used. - group:: Group to chgrp to. @@ -34,9 +29,8 @@ mode:: owner:: User to chown to. -source:: - If supplied, copy this file from the host running cdist to the target. - If not supplied, an empty file or directory will be created. +parents:: + Whether to create parents as well (mkdir -p behaviour) EXAMPLES From 1202131195f4aa4474da941b220a554fd4836a0f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 21:11:59 +0100 Subject: [PATCH 0673/6109] update __directory parameters Signed-off-by: Nico Schottelius --- conf/type/__directory/parameter/optional | 3 +-- conf/type/__directory/parameter/required | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 conf/type/__directory/parameter/required diff --git a/conf/type/__directory/parameter/optional b/conf/type/__directory/parameter/optional index 0c30f4be..752c3989 100644 --- a/conf/type/__directory/parameter/optional +++ b/conf/type/__directory/parameter/optional @@ -1,5 +1,4 @@ group mode owner -source -destination +parents diff --git a/conf/type/__directory/parameter/required b/conf/type/__directory/parameter/required deleted file mode 100644 index aa80e646..00000000 --- a/conf/type/__directory/parameter/required +++ /dev/null @@ -1 +0,0 @@ -type From 1619964cbbdc61e0bb88c0478a37d26113b52e77 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 21:13:01 +0100 Subject: [PATCH 0674/6109] __file does not require --type anymore Signed-off-by: Nico Schottelius --- conf/type/__file/man.text | 3 +-- conf/type/__file/parameter/required | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 conf/type/__file/parameter/required diff --git a/conf/type/__file/man.text b/conf/type/__file/man.text index c60ada44..22b367cb 100644 --- a/conf/type/__file/man.text +++ b/conf/type/__file/man.text @@ -15,8 +15,7 @@ This cdist type allows you to create files on the target. REQUIRED PARAMETERS ------------------- -type:: - Specifies the type of file to be created. Either "directory" or "file" +None. OPTIONAL PARAMETERS diff --git a/conf/type/__file/parameter/required b/conf/type/__file/parameter/required deleted file mode 100644 index aa80e646..00000000 --- a/conf/type/__file/parameter/required +++ /dev/null @@ -1 +0,0 @@ -type From e06e8026dd81218ff6a36bc5f9c28ec86be2921e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 21:18:15 +0100 Subject: [PATCH 0675/6109] begin to cleanup __file Signed-off-by: Nico Schottelius --- conf/type/__file/gencode | 96 ++++++--------------- doc/dev/logs/2011-03-15.file_directory_link | 4 +- 2 files changed, 27 insertions(+), 73 deletions(-) diff --git a/conf/type/__file/gencode b/conf/type/__file/gencode index 531cc203..bf30bb2c 100755 --- a/conf/type/__file/gencode +++ b/conf/type/__file/gencode @@ -18,27 +18,13 @@ # along with cdist. If not, see . # # -# __file is a very basic type and should be able to be used as an -# example for typewrites later +# __file is a very basic type, which will probably be reused quite often # -# If destination was specified, do not use the id -if [ -f "$__object/parameter/destination" ]; then - destination="$(cat "$__object/parameter/destination")" -else - # If no destination has been supplied, the id is the destination - # Prepend /, which got lost in the object id (and relative paths - # don't make sense) - destination="/$__object_id" -fi - -# Ensure we have an absolute path -if ! $(echo "$destination" | grep -q ^/); then - echo "Error: Destination ($destination) of $__object_id is not absolute." >&2 - exit 1 -fi +destination="/$__object_id" # Use correct md5sum binary - MacOSx is different here +# FIXME: broken: we don't know the host os! case "$os" in macosx) md5sum="md5" @@ -49,63 +35,31 @@ case "$os" in ;; esac -type="$(cat "$__object/parameter/type")" +if [ -f "$__object/parameter/source" ]; then + source="$(cat "$__object/parameter/source")" -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 + 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 - ;; - - 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 - else - echo "Source \"$source\" does not exist." >&2 - exit 1 - fi - else - if [ no = "$(cat "$__object/explorer/exists")" ]; then - echo touch \"$destination\" - 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 + else + echo "Source \"$source\" does not exist." >&2 exit 1 - ;; -esac + fi +else + if [ no = "$(cat "$__object/explorer/exists")" ]; then + echo touch \"$destination\" + fi +fi + # Mode settings if [ -f "$__object/parameter/mode" ]; then diff --git a/doc/dev/logs/2011-03-15.file_directory_link b/doc/dev/logs/2011-03-15.file_directory_link index ba4607ca..8a975750 100644 --- a/doc/dev/logs/2011-03-15.file_directory_link +++ b/doc/dev/logs/2011-03-15.file_directory_link @@ -1,7 +1,7 @@ Proposal for new types, which replace __file: -__directory /etc [--mode --owner --group --parents [yes|no] ] +x __directory /etc [--mode --owner --group --parents [yes|no] ] -__link /destination --source abc --type [symbolic|hard] +x __link /destination --source abc --type [symbolic|hard] __file /etc/passwd [--source] --mode --owner --group From 2ed638a0a2bafc52f2421f808ee61be567c53aa1 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Tue, 15 Mar 2011 21:18:18 +0100 Subject: [PATCH 0676/6109] Minor doc fixes --- conf/type/__addifnosuchline/man.text | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/conf/type/__addifnosuchline/man.text b/conf/type/__addifnosuchline/man.text index 2222283a..3d332cd0 100644 --- a/conf/type/__addifnosuchline/man.text +++ b/conf/type/__addifnosuchline/man.text @@ -1,21 +1,21 @@ -cdist-type-addifnosuchline(1) +cdist-type__addifnosuchline(1) ====================== Daniel Roth NAME ---- -cdist-type-addifnosuchline +cdist-type__addifnosuchline - Add if no such line SYNOPSIS -------- -cdist-type-addifnosuchline Add if no such line +cdist-type__addifnosuchline - Add if no such line DESCRIPTION ----------- -cdist-type-addifnosuchline can be used to check a file for existence of a +cdist-type__addifnosuchline - can be used to check a file for existence of a specific line and adding that if not found @@ -36,17 +36,16 @@ EXAMPLES -------------------------------------------------------------------------------- # Creates or appends the line specifiend in "include_www" to the file "lighttpd.conf" - __addifnosuchline www --file lighttpd.conf --line include_www -# Adds the line "include_git" to the file "bar" -__addifnosuchline git_web --file lighttpd.conf --line include_git +# Adds the line "include_git" to the file "lighttpd.conf" +__addifnosuchline lighttpd.conf --line include_git -------------------------------------------------------------------------------- SEE ALSO -------- -cdist(7) +- cdist-type(7) COPYING From 4a44b3bdf5cb708135123fb87a6af29305336c9c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 21:19:49 +0100 Subject: [PATCH 0677/6109] __file: -destination Signed-off-by: Nico Schottelius --- conf/type/__file/parameter/optional | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/type/__file/parameter/optional b/conf/type/__file/parameter/optional index 0c30f4be..06120518 100644 --- a/conf/type/__file/parameter/optional +++ b/conf/type/__file/parameter/optional @@ -2,4 +2,3 @@ group mode owner source -destination From 6f7312e877bd166992f41b9f75f603fe128b8526 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 21:25:09 +0100 Subject: [PATCH 0678/6109] some cleanups in cdist-type__addifnosuchline(7) Signed-off-by: Nico Schottelius --- conf/type/__addifnosuchline/man.text | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/conf/type/__addifnosuchline/man.text b/conf/type/__addifnosuchline/man.text index 3d332cd0..722a3080 100644 --- a/conf/type/__addifnosuchline/man.text +++ b/conf/type/__addifnosuchline/man.text @@ -1,22 +1,17 @@ -cdist-type__addifnosuchline(1) -====================== +cdist-type__addifnosuchline(7) +============================== Daniel Roth NAME ---- -cdist-type__addifnosuchline - Add if no such line - - -SYNOPSIS --------- -cdist-type__addifnosuchline - Add if no such line +cdist-type__addifnosuchline - Add a line (if not existing already) DESCRIPTION ----------- -cdist-type__addifnosuchline - can be used to check a file for existence of a -specific line and adding that if not found +This type can be used to check a file for existence of a +specific line and adding it, if it was not found. REQUIRED PARAMETERS @@ -28,21 +23,22 @@ line:: OPTIONAL PARAMETERS ------------------- file:: - If supplied, use this as the destination file. Otherwise the - object_id is used. + If supplied, use this as the destination file. + Otherwise the object_id is used. + EXAMPLES -------- -------------------------------------------------------------------------------- # Creates or appends the line specifiend in "include_www" to the file "lighttpd.conf" -__addifnosuchline www --file lighttpd.conf --line include_www +__addifnosuchline www --file /etc/lighttpd.conf --line include_www # Adds the line "include_git" to the file "lighttpd.conf" -__addifnosuchline lighttpd.conf --line include_git - +__addifnosuchline /etc/lighttpd.conf --line include_git -------------------------------------------------------------------------------- + SEE ALSO -------- - cdist-type(7) From b19a29be6e9928da729a3f9748906c777c033954 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 21:30:02 +0100 Subject: [PATCH 0679/6109] make cdist-env usable standalone (i.e. without cdist-config) Signed-off-by: Nico Schottelius --- bin/cdist-env | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/cdist-env b/bin/cdist-env index e95e078b..a7610aac 100755 --- a/bin/cdist-env +++ b/bin/cdist-env @@ -18,14 +18,14 @@ # along with cdist. If not, see . # # -# Setup environment for use with cdist +# Setup environment for use with cdist - must be standalone! # -. cdist-config -[ $# -eq 0 ] || __cdist_usage "no arguments" - -# Allow access to unset variables like PATH and MANPATH -set +u +__cdist_pwd="$(pwd -P)" +__cdist_mydir="${0%/*}"; +__cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" +__cdist_myname=${0##*/}; +__cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" echo export PATH=$__cdist_abs_mydir:$PATH From 8fa48be2aeeeb15708ea7cc627b55be9841cebf9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 21:31:11 +0100 Subject: [PATCH 0680/6109] change footer (looks better) 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 7f66888f..d006dd2d 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 "cdist $__cdist_version: success on $__cdist_target_host" +echo "cdist $__cdist_version: Successfully finished run on $__cdist_target_host" From e69db644b468deaae62dabe3490779dd251f2a4e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 15 Mar 2011 21:38:09 +0100 Subject: [PATCH 0681/6109] prepare version 1.0.4 Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 +- doc/changelog | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 0d0fd152..61b7117f 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -19,7 +19,7 @@ # # -__cdist_version="1.0.3" +__cdist_version="1.0.4" # Fail if something bogus is going on set -u diff --git a/doc/changelog b/doc/changelog index 50fb9de1..c869c146 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,4 +1,4 @@ -1.0.4: +1.0.4: 2011-03-15 * New type __motd * New type __addifnosuchline * Document type __issue From 1518bf19353294c6b0b95e35f838b2a27a59daa3 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 15 Mar 2011 23:11:01 +0100 Subject: [PATCH 0682/6109] __user: only run commands if value has changed Signed-off-by: Steven Armstrong --- conf/type/__user/TODO | 1 - conf/type/__user/gencode | 28 +++++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/conf/type/__user/TODO b/conf/type/__user/TODO index 5c2eec7d..fa6aeee7 100644 --- a/conf/type/__user/TODO +++ b/conf/type/__user/TODO @@ -1,3 +1,2 @@ -- gencode: compair new value with existing one in $__object/explorer/passwd, only change if nessecary - delete users diff --git a/conf/type/__user/gencode b/conf/type/__user/gencode index 7445d6f8..ca31f7d3 100755 --- a/conf/type/__user/gencode +++ b/conf/type/__user/gencode @@ -33,12 +33,34 @@ else fi +get_current_value() { + local key="$1" + local index + case "$key" in + uid) index=3;; + gid) index=4;; + comment) index=5;; + home) index=6;; + shell) index=7;; + esac + cut -d':' -f $index "$__object/explorer/passwd" +} + + set -- "$@" cd "$__object/parameter" for property in $(ls .); do - # TODO: compair new value with existing one in $__object/explorer/passwd, only change if nessecary - set -- "$@" "--$property" "$(cat "$property")" + current_value=$(get_current_value "$property") + new_value="$(cat "$property")" + if [ "$new_value" != "$current_value" ]; then + # Shedule changed properties for update + set -- "$@" "--$property" \"$new_value\" + fi done -echo $command $@ $name + +if [ $# -gt 0 ]; then + # Update changed properties + echo $command $@ $name +fi From 4432b476d08c812e9ee6221049c9ee7095143512 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 15 Mar 2011 23:26:24 +0100 Subject: [PATCH 0683/6109] __user: only set password if it changed Signed-off-by: Steven Armstrong --- conf/type/__user/explorer/shadow | 27 +++++++++++++++++++++++++++ conf/type/__user/gencode | 4 ++++ 2 files changed, 31 insertions(+) create mode 100755 conf/type/__user/explorer/shadow diff --git a/conf/type/__user/explorer/shadow b/conf/type/__user/explorer/shadow new file mode 100755 index 00000000..eab6b2b8 --- /dev/null +++ b/conf/type/__user/explorer/shadow @@ -0,0 +1,27 @@ +#!/bin/sh +# +# 2011 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 . +# +# +# Get an existing users shadow entry. +# + +name=$__object_id + +grep "^$name" /etc/shadow || true + diff --git a/conf/type/__user/gencode b/conf/type/__user/gencode index ca31f7d3..5990ac92 100755 --- a/conf/type/__user/gencode +++ b/conf/type/__user/gencode @@ -37,6 +37,10 @@ get_current_value() { local key="$1" local index case "$key" in + password) + cut -d':' -f 2 "$__object/explorer/shadow" + break + ;; uid) index=3;; gid) index=4;; comment) index=5;; From 58718f735aee1f519816ba07e4d7deca44786bb6 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 15 Mar 2011 23:35:55 +0100 Subject: [PATCH 0684/6109] use getent to get entry from shadow database Signed-off-by: Steven Armstrong --- conf/type/__user/explorer/shadow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__user/explorer/shadow b/conf/type/__user/explorer/shadow index eab6b2b8..c75e36f4 100755 --- a/conf/type/__user/explorer/shadow +++ b/conf/type/__user/explorer/shadow @@ -23,5 +23,5 @@ name=$__object_id -grep "^$name" /etc/shadow || true +getent shadow "$name" || true From ec99a22db61ee537836334fdfaa57f5968325b18 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 15 Mar 2011 23:37:17 +0100 Subject: [PATCH 0685/6109] add new type __group Signed-off-by: Steven Armstrong --- conf/type/__group/TODO | 2 + conf/type/__group/explorer/group | 27 ++++++++++++ conf/type/__group/explorer/gshadow | 27 ++++++++++++ conf/type/__group/gencode | 66 ++++++++++++++++++++++++++++ conf/type/__group/man.text | 62 ++++++++++++++++++++++++++ conf/type/__group/parameter/optional | 2 + 6 files changed, 186 insertions(+) create mode 100644 conf/type/__group/TODO create mode 100755 conf/type/__group/explorer/group create mode 100755 conf/type/__group/explorer/gshadow create mode 100755 conf/type/__group/gencode create mode 100644 conf/type/__group/man.text create mode 100644 conf/type/__group/parameter/optional diff --git a/conf/type/__group/TODO b/conf/type/__group/TODO new file mode 100644 index 00000000..c20a5d21 --- /dev/null +++ b/conf/type/__group/TODO @@ -0,0 +1,2 @@ +- delete groups + diff --git a/conf/type/__group/explorer/group b/conf/type/__group/explorer/group new file mode 100755 index 00000000..4c1e6ac0 --- /dev/null +++ b/conf/type/__group/explorer/group @@ -0,0 +1,27 @@ +#!/bin/sh +# +# 2011 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 . +# +# +# Get an existing groups group entry. +# + +name=$__object_id + +getent group "$name" || true + diff --git a/conf/type/__group/explorer/gshadow b/conf/type/__group/explorer/gshadow new file mode 100755 index 00000000..51d502a1 --- /dev/null +++ b/conf/type/__group/explorer/gshadow @@ -0,0 +1,27 @@ +#!/bin/sh +# +# 2011 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 . +# +# +# Get an existing groups gshadow entry. +# + +name=$__object_id + +getent gshadow "$name" || true + diff --git a/conf/type/__group/gencode b/conf/type/__group/gencode new file mode 100755 index 00000000..527a6079 --- /dev/null +++ b/conf/type/__group/gencode @@ -0,0 +1,66 @@ +#!/bin/sh +# +# 2011 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 . +# +# +# Manage groups. +# + +name="$__object_id" + +command= +if grep -q "^$name" "$__object/explorer/group"; then + # group exists + command="groupmod" +else + # group does not exist + command="groupadd" +fi + + +get_current_value() { + local key="$1" + local index + case "$key" in + password) + cut -d':' -f 2 "$__object/explorer/gshadow" + break + ;; + gid) index=3;; + esac + cut -d':' -f $index "$__object/explorer/group" +} + + +set -- "$@" +cd "$__object/parameter" +for property in $(ls .); do + current_value=$(get_current_value "$property") + new_value="$(cat "$property")" + if [ "$new_value" != "$current_value" ]; then + # Shedule changed properties for update + set -- "$@" "--$property" \"$new_value\" + fi +done + + +if [ $# -gt 0 ]; then + # Update changed properties + echo $command $@ $name +fi + diff --git a/conf/type/__group/man.text b/conf/type/__group/man.text new file mode 100644 index 00000000..e571c7c5 --- /dev/null +++ b/conf/type/__group/man.text @@ -0,0 +1,62 @@ +cdist-type__user(7) +=================== +Steven Armstrong + + +NAME +---- +cdist-type__user - Manage users + + +DESCRIPTION +----------- +This cdist type allows you to create or modify users on the target. + + +REQUIRED PARAMETERS +------------------- +None. + + +OPTIONAL PARAMETERS +------------------- +comment:: + see usermod(8) +home:: + see above +gid:: + see above +groups:: + see above +password:: + see above +shell:: + see above +uid:: + see above + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Create user account for foobar with operating system default settings +__user foobar + +# Same but with a different shell +__user foobar --shell /bin/zsh + +# Set explicit uid and home +__user foobar --uid 1001 --shell /bin/zsh --home /home/foobar +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +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). diff --git a/conf/type/__group/parameter/optional b/conf/type/__group/parameter/optional new file mode 100644 index 00000000..4c661c8f --- /dev/null +++ b/conf/type/__group/parameter/optional @@ -0,0 +1,2 @@ +gid +password From af0b62ecef6722c3a2ec7848315c4eebdb67b946 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 15 Mar 2011 23:41:30 +0100 Subject: [PATCH 0686/6109] update man page for __group type Signed-off-by: Steven Armstrong --- conf/type/__group/man.text | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/conf/type/__group/man.text b/conf/type/__group/man.text index e571c7c5..26b52111 100644 --- a/conf/type/__group/man.text +++ b/conf/type/__group/man.text @@ -1,16 +1,16 @@ -cdist-type__user(7) +cdist-type__group(7) =================== Steven Armstrong NAME ---- -cdist-type__user - Manage users +cdist-type__group - Manage groups DESCRIPTION ----------- -This cdist type allows you to create or modify users on the target. +This cdist type allows you to create or modify groups on the target. REQUIRED PARAMETERS @@ -20,34 +20,24 @@ None. OPTIONAL PARAMETERS ------------------- -comment:: - see usermod(8) -home:: - see above gid:: - see above -groups:: - see above + see groupmod(8) password:: see above -shell:: - see above -uid:: - see above EXAMPLES -------- -------------------------------------------------------------------------------- -# Create user account for foobar with operating system default settings -__user foobar +# Create a group 'foobar' with operating system default settings +__group foobar -# Same but with a different shell -__user foobar --shell /bin/zsh +# Same but with a specific gid +__group foobar --gid 1234 -# Set explicit uid and home -__user foobar --uid 1001 --shell /bin/zsh --home /home/foobar +# Same but with a gid and password +__group foobar --gid 1234 --password 'crypted-password-string' -------------------------------------------------------------------------------- From f69802b3d89fbcd144377356f0ec4881570a0a75 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 08:25:36 +0100 Subject: [PATCH 0687/6109] s/md5sum/cksum/g Signed-off-by: Nico Schottelius --- conf/type/__file/explorer/{md5sum => cksum} | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) rename conf/type/__file/explorer/{md5sum => cksum} (82%) diff --git a/conf/type/__file/explorer/md5sum b/conf/type/__file/explorer/cksum similarity index 82% rename from conf/type/__file/explorer/md5sum rename to conf/type/__file/explorer/cksum index 4ac0e1b9..6bcf9cd0 100755 --- a/conf/type/__file/explorer/md5sum +++ b/conf/type/__file/explorer/cksum @@ -27,22 +27,9 @@ else destination="/$__object_id" fi -os="$(cat $__global/explorer/os)" - -case "$os" in - macosx) - md5sum="md5" - ;; - - *) - md5sum="md5sum" - ;; -esac - -# No output if file does not exist - does definitely not match the md5sum :-) if [ -e "$destination" ]; then if [ -f "$destination" ]; then - $md5sum < "$destination" + cksum < "$destination" else echo "NO REGULAR FILE" fi From 501fcf36d191ea5dcf47249950e1daf2def24539 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 08:30:02 +0100 Subject: [PATCH 0688/6109] remove old --destination parameter from __file explorers Signed-off-by: Nico Schottelius --- conf/type/__file/explorer/cksum | 6 +----- conf/type/__file/explorer/exists | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/conf/type/__file/explorer/cksum b/conf/type/__file/explorer/cksum index 6bcf9cd0..dcad99ba 100755 --- a/conf/type/__file/explorer/cksum +++ b/conf/type/__file/explorer/cksum @@ -21,11 +21,7 @@ # Retrieve the md5sum of a file to be created, if it is already existing. # -if [ -f "$__object/parameter/destination" ]; then - destination="$(cat "$__object/parameter/destination")" -else - destination="/$__object_id" -fi +destination="/$__object_id" if [ -e "$destination" ]; then if [ -f "$destination" ]; then diff --git a/conf/type/__file/explorer/exists b/conf/type/__file/explorer/exists index b0be82fc..f8b85671 100755 --- a/conf/type/__file/explorer/exists +++ b/conf/type/__file/explorer/exists @@ -21,11 +21,7 @@ # Check whether file exists or not # -if [ -f "$__object/parameter/destination" ]; then - destination="$(cat "$__object/parameter/destination")" -else - destination="/$__object_id" -fi +destination="/$__object_id" if [ -e "$destination" ]; then echo yes From bf60df1a9baed8a5b6665262a8a4f9a2db0160de Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 08:31:30 +0100 Subject: [PATCH 0689/6109] cleanup in __file manifest Signed-off-by: Nico Schottelius --- conf/type/__file/gencode | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/conf/type/__file/gencode b/conf/type/__file/gencode index bf30bb2c..ef8c5501 100755 --- a/conf/type/__file/gencode +++ b/conf/type/__file/gencode @@ -23,28 +23,15 @@ destination="/$__object_id" -# Use correct md5sum binary - MacOSx is different here -# FIXME: broken: we don't know the host os! -case "$os" in - macosx) - md5sum="md5" - ;; - - *) - md5sum="md5sum" - ;; -esac - 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")" + local_cksum="$(cksum < "$source")" + remote_cksum="$(cat "$__object/explorer/cksum")" - # FIXME: Is md5sum the right approach? - if [ "$local_md5sum" != "$remote_md5sum" ]; then - # FIXME: This is ugly and hardcoded, replace after 1.0! + if [ "$local_cksum" != "$remote_cksum" ]; then + # FIXME: The username 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... From e7f64758ce18050def03d9423e1495ba4a2e0361 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 08:39:51 +0100 Subject: [PATCH 0690/6109] update conf/manifest/init example Signed-off-by: Nico Schottelius --- conf/manifest/init | 7 ++++--- doc/dev/logs/2011-03-15.file_directory_link | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/conf/manifest/init b/conf/manifest/init index 0a1dca50..0241423b 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -7,13 +7,14 @@ # Every machine becomes a marker, so sysadmins know that automatic # configurations are happening -__file /etc/cdist-configured --type file +__file /etc/cdist-configured case "$__target_host" in # Everybody has this localhost) - # Usual example - __file test --type symlink --source /etc/cdist-configured --destination /tmp/cdist-testfile + __link /tmp/cdist-testfile --source /etc/cdist-configured --type symbolic + __directory /tmp/cdist-test-dir --mode 4777 + __file /tmp/cdist-test-file --mode 0750 --owner nobody --group root ;; # diff --git a/doc/dev/logs/2011-03-15.file_directory_link b/doc/dev/logs/2011-03-15.file_directory_link index 8a975750..9044bc33 100644 --- a/doc/dev/logs/2011-03-15.file_directory_link +++ b/doc/dev/logs/2011-03-15.file_directory_link @@ -4,4 +4,4 @@ x __directory /etc [--mode --owner --group --parents [yes|no] ] x __link /destination --source abc --type [symbolic|hard] -__file /etc/passwd [--source] --mode --owner --group +x __file /etc/passwd [--source] --mode --owner --group From 2b2545ed8cf20824364eaf85df0afa1ced868182 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 08:40:36 +0100 Subject: [PATCH 0691/6109] add changes for 1.1 release Signed-off-by: Nico Schottelius --- doc/changelog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/changelog b/doc/changelog index c869c146..d83d3d44 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,3 +1,6 @@ +1.1: + * Replace type __file with __file, __directory, __link + 1.0.4: 2011-03-15 * New type __motd * New type __addifnosuchline From d2c4ffb5f00ea30382c92e1d1b2432d0d19a6729 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 08:45:01 +0100 Subject: [PATCH 0692/6109] cleanup manpages for new types Signed-off-by: Nico Schottelius --- conf/type/__directory/man.text | 15 ++++----------- conf/type/__file/man.text | 13 +++---------- conf/type/__link/man.text | 9 +++++---- 3 files changed, 12 insertions(+), 25 deletions(-) diff --git a/conf/type/__directory/man.text b/conf/type/__directory/man.text index a619666d..f7272df9 100644 --- a/conf/type/__directory/man.text +++ b/conf/type/__directory/man.text @@ -37,18 +37,11 @@ EXAMPLES -------- -------------------------------------------------------------------------------- -# Create /etc/cdist-configured as an empty file -__file /etc/cdist-configured --type file +# A silly example +__directory /tmp/foobar -# Same but with a different object id -__file cdist-marker --type file --destination /etc/cdist-configured - -# Use __file from another type -__file /etc/issue --source "$__type/files/archlinux" --type file - -# Supply some more settings -__file /etc/shadow --source "$__type/files/shadow" --type file \ - --owner root --group shadow --mode 0640 +# Ensure /etc exists correctly +__file /etc --owner root --group root --mode 0755 -------------------------------------------------------------------------------- diff --git a/conf/type/__file/man.text b/conf/type/__file/man.text index 22b367cb..67ab53d1 100644 --- a/conf/type/__file/man.text +++ b/conf/type/__file/man.text @@ -20,10 +20,6 @@ None. OPTIONAL PARAMETERS ------------------- -destination:: - If supplied, use this as the destination on the target. Otherwise the - object_id is used. - group:: Group to chgrp to. @@ -43,16 +39,13 @@ EXAMPLES -------------------------------------------------------------------------------- # Create /etc/cdist-configured as an empty file -__file /etc/cdist-configured --type file - -# Same but with a different object id -__file cdist-marker --type file --destination /etc/cdist-configured +__file /etc/cdist-configured # Use __file from another type -__file /etc/issue --source "$__type/files/archlinux" --type file +__file /etc/issue --source "$__type/files/archlinux" # Supply some more settings -__file /etc/shadow --source "$__type/files/shadow" --type file \ +__file /etc/shadow --source "$__type/files/shadow" \ --owner root --group shadow --mode 0640 -------------------------------------------------------------------------------- diff --git a/conf/type/__link/man.text b/conf/type/__link/man.text index db124cb9..fb914298 100644 --- a/conf/type/__link/man.text +++ b/conf/type/__link/man.text @@ -27,20 +27,21 @@ OPTIONAL PARAMETERS ------------------- None. + EXAMPLES -------- -------------------------------------------------------------------------------- # Create hard link of /etc/shadow -__file /root/shadow --source /etc/shadow --type hard +__link /root/shadow --source /etc/shadow --type hard # Relative symbolic link -__file /etc/apache2/sites-enabled/www.test.ch \ +__link /etc/apache2/sites-enabled/www.test.ch \ --source ../sites-available/www.test.ch \ --type symbolic -# Relative absolute link -__file /opt/plone --source /home/services/plone --type symbolic +# Absolute symbolic link +__link /opt/plone --source /home/services/plone --type symbolic -------------------------------------------------------------------------------- From 693e1be85e8ece59c14d9017d606a0b29acd7f0a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 08:54:35 +0100 Subject: [PATCH 0693/6109] add initial manpage for cdist-env Signed-off-by: Nico Schottelius --- doc/man/cdist-env.text | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 doc/man/cdist-env.text diff --git a/doc/man/cdist-env.text b/doc/man/cdist-env.text new file mode 100644 index 00000000..4c2d73bc --- /dev/null +++ b/doc/man/cdist-env.text @@ -0,0 +1,32 @@ +cdist-env(1) +============ +Nico Schottelius + + +NAME +---- +cdist-env - Setup environment for using cdist + + +SYNOPSIS +-------- +cdist-env + + +DESCRIPTION +----------- +cdist-env outputs two strings suitable for usage in your current shell, +so you can use cdist from the checkout. You can evaluate those strings +and make directory usage of them. + + + +SEE ALSO +-------- +cdist(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). From 01ffe2f3ad855e58340e63a068fd97ca17ab1f0e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 09:00:22 +0100 Subject: [PATCH 0694/6109] cdist-env: add support for tcsh Signed-off-by: Nico Schottelius --- bin/cdist-env | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/bin/cdist-env b/bin/cdist-env index a7610aac..2256965b 100755 --- a/bin/cdist-env +++ b/bin/cdist-env @@ -27,7 +27,17 @@ __cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" __cdist_myname=${0##*/}; __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" -echo export PATH=$__cdist_abs_mydir:$PATH +shell_binary=${SHELL##*/} +NEWPATH="$__cdist_abs_mydir:$PATH" cd "$__cdist_abs_mydir/../doc/man" -echo export MANPATH=$(pwd -P):$MANPATH +NEWMANPATH="$(pwd -P):$MANPATH" + +# Match csh, tcsh to handle differently +if $(echo $shell_binary | grep -q 'csh$'); then + echo setenv PATH $NEWPATH + echo setenv MANPATH $NEWMANPATH +else + echo export PATH=$NEWPATH + echo export MANPATH=$NEWMANPATH +fi From 1cbdcc1f53c7648f7626d4e1131157330f7f042f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 09:15:22 +0100 Subject: [PATCH 0695/6109] + semicolon for csh Signed-off-by: Nico Schottelius --- bin/cdist-env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-env b/bin/cdist-env index 2256965b..3b8e1645 100755 --- a/bin/cdist-env +++ b/bin/cdist-env @@ -35,7 +35,7 @@ NEWMANPATH="$(pwd -P):$MANPATH" # Match csh, tcsh to handle differently if $(echo $shell_binary | grep -q 'csh$'); then - echo setenv PATH $NEWPATH + echo setenv PATH $NEWPATH \; echo setenv MANPATH $NEWMANPATH else echo export PATH=$NEWPATH From 0d07b2056fc4b0b5034a145aaa3dabb6b00b0c7d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 09:38:59 +0100 Subject: [PATCH 0696/6109] describe how to use cdist-env in every shell Signed-off-by: Nico Schottelius --- doc/man/cdist-env.text | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/doc/man/cdist-env.text b/doc/man/cdist-env.text index 4c2d73bc..fca115fb 100644 --- a/doc/man/cdist-env.text +++ b/doc/man/cdist-env.text @@ -16,9 +16,23 @@ cdist-env DESCRIPTION ----------- cdist-env outputs two strings suitable for usage in your current shell, -so you can use cdist from the checkout. You can evaluate those strings -and make directory usage of them. +so you can use cdist from the checkout. cdist-env essentially helps you +to easily setup PATH and MANPATH. +If you've multiple checkouts of cdist and run cdist-env from the various +checkouts, a new run will prepend the last directory, thus ensures you +can run it multiple times and does what one expects. + +EXAMPLES +-------- +For use in bourne shell variants (like dash, bash, ksh) as well as +in csh variants (csh, tcsh): + +-------------------------------------------------------------------------------- +eval `~/cdist/bin/cdist-env` +-------------------------------------------------------------------------------- + +Replace ~/cdist with the checkout directory of cdist. SEE ALSO From a5aec139277fc49112d30228c6a30d2ed2416e2d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 09:40:48 +0100 Subject: [PATCH 0697/6109] add cdist-env for MANSRC Signed-off-by: Nico Schottelius --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index a6d78aeb..5b6b6e94 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,7 @@ MANGENERATED=$(MANDIR)/cdist-reference.text MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-bin-transfer.text \ + $(MANDIR)/cdist-env.text \ $(MANDIR)/cdist-deploy-to.text \ $(MANDIR)/cdist-explorer.text \ $(MANDIR)/cdist-manifest.text \ From d084cf1422752db88bcc2f4e4a807335148fb0cb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 09:45:22 +0100 Subject: [PATCH 0698/6109] less todo, updates for changelog Signed-off-by: Nico Schottelius --- doc/changelog | 3 ++- doc/dev/todo/niconext | 3 +++ doc/dev/todo/post-1.0 | 22 +--------------------- 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/doc/changelog b/doc/changelog index d83d3d44..696bae25 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,9 +1,10 @@ 1.1: * Replace type __file with __file, __directory, __link + * Document cdist-env 1.0.4: 2011-03-15 * New type __motd - * New type __addifnosuchline + * New type __addifnosuchline (Daniel Roth) * Document type __issue * Document type __package_pacman * Document type __package_apt diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index e69de29b..a1916dcd 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -0,0 +1,3 @@ +DOC: + - cdist-dir + - cdist-config diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index 49c6f8b0..0d32dd98 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -9,22 +9,9 @@ Types to be written/extended: - __service - __user - __file_edit - - delete_line_from_file + - __deleteline - regexp replace (can probably cover all?) - - __file: - - template == [shell script] stdout - cron - - __file: think about splitting - __file - source - mode - owner - __directory - parents - mode - owner - __link - type symbolic | hard - __issue: add --source @@ -41,16 +28,9 @@ Documentation: + cdist + cdist-deploy-to + cdist-manifest - - cdist-type [IMPORTANT] - - only do necessary work [TYPE IMPLEMENTATION HINTS] - - install packages only if not existent - - copy file only if different - - DOC document that $type/manifest is executed for every object/instance - ensure every file in bin/ has a correspondent manpage - cdist-code-run-all - - cdist-config - cdist-deploy-to - - cdist-dir - cdist-explorer-run-init - cdist-manifest-run - cdist-manifest-run-all From 6a29a7c1d8de4ef969e6b17a48a26a6fb3229f8c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 09:46:14 +0100 Subject: [PATCH 0699/6109] REAL_README -> README Signed-off-by: Nico Schottelius --- README | 173 +++++++++++++++++++++++++++++++++++++++++++++++++++- REAL_README | 172 --------------------------------------------------- 2 files changed, 172 insertions(+), 173 deletions(-) mode change 120000 => 100644 README delete mode 100644 REAL_README diff --git a/README b/README deleted file mode 120000 index ace36209..00000000 --- a/README +++ /dev/null @@ -1 +0,0 @@ -REAL_README \ No newline at end of file diff --git a/README b/README new file mode 100644 index 00000000..88d5de13 --- /dev/null +++ b/README @@ -0,0 +1,172 @@ +[[!meta title="cdist - configuration management"]] + + + .. . .x+=:. s + dF @88> z` ^% :8 + '88bu. %8P . origin/ + + # Stay on version 1.0 + git checkout -b 1.0 origin/1.0 + +### Update + +To upgrade cdist in the current branch use + + git pull + + # Also update the manpages + make man + export MANPATH=$MANPATH:$(pwd -P)/doc/man + + +The version branches are designed to change if there are incompatibilities. +Or the other way round: As long as you stay on 1.0 and do git pull, nothing +should break. + +## Support + +### IRC + +You can join the development ***IRC channel*** +[#cLinux on irc.freenode.org](irc://irc.freenode.org/#cLinux). + +### Mailing list + +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) + * [ircd-hybrid](http://www.ircd-hybrid.org/) (chat) + * [stunnel](http://stunnel.mirt.net/) (SSL tunnel) + * [mercurial-server](http://www.lshift.net/mercurial-server.html) + +with cdist on a total of **4** production servers of the +[Systems Group](http://www.systems.ethz.ch) at the +[ETH Zurich](http://www.ethz.ch). diff --git a/REAL_README b/REAL_README deleted file mode 100644 index 88d5de13..00000000 --- a/REAL_README +++ /dev/null @@ -1,172 +0,0 @@ -[[!meta title="cdist - configuration management"]] - - - .. . .x+=:. s - dF @88> z` ^% :8 - '88bu. %8P . origin/ - - # Stay on version 1.0 - git checkout -b 1.0 origin/1.0 - -### Update - -To upgrade cdist in the current branch use - - git pull - - # Also update the manpages - make man - export MANPATH=$MANPATH:$(pwd -P)/doc/man - - -The version branches are designed to change if there are incompatibilities. -Or the other way round: As long as you stay on 1.0 and do git pull, nothing -should break. - -## Support - -### IRC - -You can join the development ***IRC channel*** -[#cLinux on irc.freenode.org](irc://irc.freenode.org/#cLinux). - -### Mailing list - -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) - * [ircd-hybrid](http://www.ircd-hybrid.org/) (chat) - * [stunnel](http://stunnel.mirt.net/) (SSL tunnel) - * [mercurial-server](http://www.lshift.net/mercurial-server.html) - -with cdist on a total of **4** production servers of the -[Systems Group](http://www.systems.ethz.ch) at the -[ETH Zurich](http://www.ethz.ch). From b6f231063eb1254b04ae3fda23e83f3c1adac0ec Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 09:48:59 +0100 Subject: [PATCH 0700/6109] 0600 is enough for cdist-config (according to posix) Signed-off-by: Nico Schottelius --- bin/cdist-config | 0 doc/man/{to_check => }/cdist-config.text | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 bin/cdist-config rename doc/man/{to_check => }/cdist-config.text (100%) diff --git a/bin/cdist-config b/bin/cdist-config old mode 100755 new mode 100644 diff --git a/doc/man/to_check/cdist-config.text b/doc/man/cdist-config.text similarity index 100% rename from doc/man/to_check/cdist-config.text rename to doc/man/cdist-config.text From a8ae699c8f095a70872d877419c63881e2d61547 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 10:02:46 +0100 Subject: [PATCH 0701/6109] [DOC] cleanup cdist-config Signed-off-by: Nico Schottelius --- Makefile | 4 ++-- doc/changelog | 1 + doc/man/cdist-config.text | 16 ++++++---------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 5b6b6e94..b780a983 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,6 @@ WEBPAGE=software/cdist.mdwn MANDIR=doc/man # Unchecked MANSRC=$(MANDIR)/cdist-config-layout.text \ - $(MANDIR)/cdist-config.text \ $(MANDIR)/cdist-quickstart.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-terms.text \ @@ -21,6 +20,7 @@ MANGENERATED=$(MANDIR)/cdist-reference.text MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-bin-transfer.text \ + $(MANDIR)/cdist-config.text \ $(MANDIR)/cdist-env.text \ $(MANDIR)/cdist-deploy-to.text \ $(MANDIR)/cdist-explorer.text \ @@ -40,7 +40,7 @@ all: @echo '' @echo 'Here are the possible targets:' @echo '' - @echo ' man: Build manpages' + @echo ' man: Build manpages (requires Asciidoc (a2x binary))' @echo ' clean: Remove build stuff' @echo '' @echo '' diff --git a/doc/changelog b/doc/changelog index 696bae25..a9738e06 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,6 +1,7 @@ 1.1: * Replace type __file with __file, __directory, __link * Document cdist-env + * Document cdist-config 1.0.4: 2011-03-15 * New type __motd diff --git a/doc/man/cdist-config.text b/doc/man/cdist-config.text index 969be9cc..9d147988 100644 --- a/doc/man/cdist-config.text +++ b/doc/man/cdist-config.text @@ -10,18 +10,14 @@ cdist-config - Read basic cdist configuration DESCRIPTION ----------- -Cdist-config is sourced by all helper programs and provides -hints on where to find the library. Cdist-config needs to be -in the path. - -AUTHOR ------- -Nico Schottelius +Cdist-config is sourced by cdist programs and provides hints on where to find +types, manifests, etc. Generally speaking, it's just usable from within the +core and is only of interest for cdist-developers. -RESOURCES ---------- -Main web site: http://www.nico.schottelius.org/cdist/[] +SEE ALSO +-------- +cdist(7) COPYING From 3cf23460721f2f611f9055790184001bff636871 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 10:07:30 +0100 Subject: [PATCH 0702/6109] [DOC] add manpage for cdist-dir Signed-off-by: Nico Schottelius --- Makefile | 1 + doc/man/cdist-dir.text | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 doc/man/cdist-dir.text diff --git a/Makefile b/Makefile index b780a983..3bb33226 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,7 @@ MANGENERATED=$(MANDIR)/cdist-reference.text MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-bin-transfer.text \ $(MANDIR)/cdist-config.text \ + $(MANDIR)/cdist-dir.text \ $(MANDIR)/cdist-env.text \ $(MANDIR)/cdist-deploy-to.text \ $(MANDIR)/cdist-explorer.text \ diff --git a/doc/man/cdist-dir.text b/doc/man/cdist-dir.text new file mode 100644 index 00000000..0f4a2e68 --- /dev/null +++ b/doc/man/cdist-dir.text @@ -0,0 +1,36 @@ +cdist-dir(1) +============ +Nico Schottelius + + +NAME +---- +cdist-dir - Poor man's directory synchronisation + + +SYNOPSIS +-------- +cdist-dir TARGET_HOST SRC_DIR DST_DIR + + +DESCRIPTION +----------- +cdist-dir either pushes a local directory to the target host +or pulls a remote directory from a target host to the local host. + +In the push case SRC_DIR is local, in the pull case remote. +In the push case DST_DIR is remote, in the pull case local. + +cdist-dir does not cleanup DST_DIR and thus it may contain old +stuff if used multiple times. + + +SEE ALSO +-------- +cdist(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). From 24eb626ca85e940c07936070a1ef7b098d080ae9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 10:11:00 +0100 Subject: [PATCH 0703/6109] clearify dumb behaviour of cdist-dir Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 4 +--- doc/man/cdist-dir.text | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index a1916dcd..7ce8da49 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,3 +1 @@ -DOC: - - cdist-dir - - cdist-config +Release 1.1.0 diff --git a/doc/man/cdist-dir.text b/doc/man/cdist-dir.text index 0f4a2e68..223bc779 100644 --- a/doc/man/cdist-dir.text +++ b/doc/man/cdist-dir.text @@ -24,6 +24,8 @@ In the push case DST_DIR is remote, in the pull case local. cdist-dir does not cleanup DST_DIR and thus it may contain old stuff if used multiple times. +cdist-dir does not rely on rsync or other high level tools, because +it cannot expect its existence on the local or target host. SEE ALSO -------- From 2389dde9f565988550c89228ee626ecf8889f6ef Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 10:18:03 +0100 Subject: [PATCH 0704/6109] [DOC] add manpage for cdist-quickstart Signed-off-by: Nico Schottelius --- Makefile | 3 +- doc/changelog | 2 + doc/dev/todo/post-1.0 | 1 - doc/man/cdist-quickstart.text | 51 ++++++++++++++++++++++++++ doc/man/to_check/cdist-quickstart.text | 42 --------------------- 5 files changed, 54 insertions(+), 45 deletions(-) create mode 100644 doc/man/cdist-quickstart.text delete mode 100644 doc/man/to_check/cdist-quickstart.text diff --git a/Makefile b/Makefile index 3bb33226..660abb09 100644 --- a/Makefile +++ b/Makefile @@ -11,9 +11,7 @@ WEBPAGE=software/cdist.mdwn MANDIR=doc/man # Unchecked MANSRC=$(MANDIR)/cdist-config-layout.text \ - $(MANDIR)/cdist-quickstart.text \ $(MANDIR)/cdist-stages.text \ - $(MANDIR)/cdist-terms.text \ # Clean documentation MANGENERATED=$(MANDIR)/cdist-reference.text @@ -26,6 +24,7 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-deploy-to.text \ $(MANDIR)/cdist-explorer.text \ $(MANDIR)/cdist-manifest.text \ + $(MANDIR)/cdist-quickstart.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-type.text \ $(MANDIR)/cdist-type-template.text \ diff --git a/doc/changelog b/doc/changelog index a9738e06..1558d59f 100644 --- a/doc/changelog +++ b/doc/changelog @@ -2,6 +2,8 @@ * Replace type __file with __file, __directory, __link * Document cdist-env * Document cdist-config + * Document cdist-dir + * Document cdist-quickstart 1.0.4: 2011-03-15 * New type __motd diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.0 index 0d32dd98..d351a0f7 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.0 @@ -38,7 +38,6 @@ Documentation: - cdist-object-codegen - cdist-object-codegen-all - cdist-object-explorer-all - - cdist-quickstart - cdist-remote-code-run-all - cdist-remote-explorer-run - cdist-run-remote diff --git a/doc/man/cdist-quickstart.text b/doc/man/cdist-quickstart.text new file mode 100644 index 00000000..ddcbbccc --- /dev/null +++ b/doc/man/cdist-quickstart.text @@ -0,0 +1,51 @@ +cdist-quickstart(1) +=================== +Nico Schottelius + +NAME +---- +cdist-quickstart - Make use of cinit in 5 minutes + + +SYNOPSIS +-------- +cdist-quickstart + + +DESCRIPTION +----------- +cdist-quickstart is an interactive guide to cdist. It should be one +of the first tools you use when you begin with cdist. + + +EXAMPLES +-------- + +To use cdist-quickstart, add the bin directory to your PATH, +execute cdist-quickstart and enjoy cdist: + + +-------------------------------------------------------------------------------- +# Bourne shell example +export PATH=$(pwd -P)/bin:$PATH + +# Alternatively, usable for csh and bsh, set's up PATH and MANPATH +eval `./bin/cdist-env` + +# Let's go! +cdist-quickstart +-------------------------------------------------------------------------------- + + + +SEE ALSO +-------- +- cdist(7) +- cdist-env(1) + + +COPYING +------- +Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). +## How to use cdist? diff --git a/doc/man/to_check/cdist-quickstart.text b/doc/man/to_check/cdist-quickstart.text deleted file mode 100644 index 570aa310..00000000 --- a/doc/man/to_check/cdist-quickstart.text +++ /dev/null @@ -1,42 +0,0 @@ -cdist-quickstart(1) -=================== -Nico Schottelius - -NAME ----- -cdist-quickstart - Make use of cinit in 5 minutes - - -DESCRIPTION ------------ -This document helps you to take the first steps with cdist. -We'll begin to configure the host "localhost" to have two files -in place, /etc/DO-NOT-CHANGE and /root/CDIST-ENABLED-HOST, which -both are used to warn other sysadmins that this system is managed -by configuration management and manual changes may get overwritten. - -Begin to execute cdist-quickstart, it will show you the steps it -takes and explains what it does: - -% cdist-quickstart - -mkdir -p /etc/cdist/manifests - -# Create - -Cdist uses -kgives you an impression of - 0. Create a host specification (/etc/cdist/hosts/**hostname**) - 0. Add functionalilty to add - 0. Run ***cdist-apply*** - -SEE ALSO --------- -cdist-config-layout(7) - - -COPYING -------- -Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). -## How to use cdist? From e7eecb06d9d926218de1a246124405cf775d6551 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 10:19:38 +0100 Subject: [PATCH 0705/6109] cdist-config needs to be executable, otherwise which does not find it Signed-off-by: Nico Schottelius --- bin/cdist-config | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 bin/cdist-config diff --git a/bin/cdist-config b/bin/cdist-config old mode 100644 new mode 100755 From f82527283ec00de18cf4d79cee10c329d4e2a925 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 10:20:38 +0100 Subject: [PATCH 0706/6109] remove obsolete documentation Signed-off-by: Nico Schottelius --- doc/man/to_check/cdist-terms.text | 26 ----------------------- doc/man/to_check/cdist-type-manifest.text | 24 --------------------- 2 files changed, 50 deletions(-) delete mode 100644 doc/man/to_check/cdist-terms.text delete mode 100644 doc/man/to_check/cdist-type-manifest.text diff --git a/doc/man/to_check/cdist-terms.text b/doc/man/to_check/cdist-terms.text deleted file mode 100644 index 530c4762..00000000 --- a/doc/man/to_check/cdist-terms.text +++ /dev/null @@ -1,26 +0,0 @@ -cdist-terms(7) -============== -Nico Schottelius - - -NAME ----- -cdist-terms - Describe terms used in cdist - - -DESCRIPTION ------------ -provider: Provides functionality. -object: Instance with provider unique id of a provider. -manifest: Define which objects to create [on hosts] -server: The machine that configures all targets. -target: Host that should be configured. - -SEE ALSO --------- - - -COPYING -------- -Copyright \(C) 2010-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/doc/man/to_check/cdist-type-manifest.text b/doc/man/to_check/cdist-type-manifest.text deleted file mode 100644 index 7573df6b..00000000 --- a/doc/man/to_check/cdist-type-manifest.text +++ /dev/null @@ -1,24 +0,0 @@ -cdist-type-manifest(7) -====================== -Nico Schottelius - - -NAME ----- -cdist-type-manifest - Manifest of a type - - -DESCRIPTION ------------ -CWD = object directory -ARGV = target host, basedir -ENV = - -SEE ALSO --------- - - -COPYING -------- -Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). From 953837c7335e311e7b78d5082bcf40b1a6f7013c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 10:21:10 +0100 Subject: [PATCH 0707/6109] cleanup makefile Signed-off-by: Nico Schottelius --- Makefile | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 660abb09..11b9c59a 100644 --- a/Makefile +++ b/Makefile @@ -8,12 +8,8 @@ A2X=a2x -f manpage --no-xmllint WEBDIR=$$HOME/niconetz WEBPAGE=software/cdist.mdwn +# Documentation MANDIR=doc/man -# Unchecked -MANSRC=$(MANDIR)/cdist-config-layout.text \ - $(MANDIR)/cdist-stages.text \ - -# Clean documentation MANGENERATED=$(MANDIR)/cdist-reference.text MANSRC=$(MANDIR)/cdist.text \ From 44c8adccbe1e2cb8d529e3d7749f4a2e82dcd4c8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 10:25:53 +0100 Subject: [PATCH 0708/6109] cdist-env: document ./ as default Signed-off-by: Nico Schottelius --- doc/man/cdist-env.text | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/man/cdist-env.text b/doc/man/cdist-env.text index fca115fb..8d10aa85 100644 --- a/doc/man/cdist-env.text +++ b/doc/man/cdist-env.text @@ -29,10 +29,10 @@ For use in bourne shell variants (like dash, bash, ksh) as well as in csh variants (csh, tcsh): -------------------------------------------------------------------------------- -eval `~/cdist/bin/cdist-env` +eval `./bin/cdist-env` -------------------------------------------------------------------------------- -Replace ~/cdist with the checkout directory of cdist. +Replace "./" with the checkout directory of cdist. SEE ALSO From aee6953ecd5049b2a337bb03e5ed0e41794fb21a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 10:28:00 +0100 Subject: [PATCH 0709/6109] [BUGFIX] __link: remove trailing 's' in variable name Signed-off-by: Nico Schottelius --- conf/type/__link/gencode | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__link/gencode b/conf/type/__link/gencode index 4a97ac34..2e13755c 100755 --- a/conf/type/__link/gencode +++ b/conf/type/__link/gencode @@ -40,4 +40,4 @@ case "$type" in ;; esac -echo ln ${lnopts} -f \"$source\" \"$destination\" +echo ln ${lnopt} -f \"$source\" \"$destination\" From 84b15fac454f5bd9c999aacd154b403fd5808424 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 10:31:22 +0100 Subject: [PATCH 0710/6109] todo post 1.1 Signed-off-by: Nico Schottelius --- doc/dev/todo/{post-1.0-cache => cache} | 0 doc/dev/todo/{post-1.0 => post-1.1} | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) rename doc/dev/todo/{post-1.0-cache => cache} (100%) rename doc/dev/todo/{post-1.0 => post-1.1} (97%) diff --git a/doc/dev/todo/post-1.0-cache b/doc/dev/todo/cache similarity index 100% rename from doc/dev/todo/post-1.0-cache rename to doc/dev/todo/cache diff --git a/doc/dev/todo/post-1.0 b/doc/dev/todo/post-1.1 similarity index 97% rename from doc/dev/todo/post-1.0 rename to doc/dev/todo/post-1.1 index d351a0f7..2efa1ab7 100644 --- a/doc/dev/todo/post-1.0 +++ b/doc/dev/todo/post-1.1 @@ -1,3 +1,6 @@ +Core: + - write test case: test.sh + Dependencies: - Add meta parameters like --requires --excludes --depends? - Build dependency tree @@ -30,7 +33,6 @@ Documentation: + cdist-manifest - ensure every file in bin/ has a correspondent manpage - cdist-code-run-all - - cdist-deploy-to - cdist-explorer-run-init - cdist-manifest-run - cdist-manifest-run-all From 4fdef270bac4368839dc92d32d87f9b2a6713361 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 10:44:43 +0100 Subject: [PATCH 0711/6109] describe how to upgrade to 1.1 Signed-off-by: Nico Schottelius --- README | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/README b/README index 88d5de13..9c645e97 100644 --- a/README +++ b/README @@ -40,7 +40,6 @@ it ticks differently: ### Architecture * Push mode (server pushes configuration) - * Pull mode planned (client triggers configuration) * User defines configuration in shell scripts (called ***manifests***) * Generates internal configuration (cconfig style) * Uses ***types*** to generate code be executed on the target @@ -58,15 +57,10 @@ but is not. Or: The reason why I began to write cdist. * Meaningful error messages * No surprise factor * Consistency in behaviour, naming and documentation - * Easy integration nacked installations + * Easy integration into bare metal installations * Simple and well-known DSL: posix shell - * It is very easy to - * extend cdist - * debug cdist-core and cdist-types - * Focus on reuse of existing functionality - * ssh - * sh - * find, rm, ... + * It must be very easy to extend and debug cdist + * Focus on reuse of existing functionality (like sh, ssh, find, rm, ...) ## Requirements @@ -104,21 +98,22 @@ how to use cdist. ### Available versions -There are at least two branches available: +There are at least the following branches available: * master: the development branch - * 1.0: stable branch of version 1.0 + * 1.0: First official release + * 1.1: Current stable (includes __file type change) -Other branches may be available as well for features or bugfixes, but they +Other branches may be available for features or bugfixes, but they may vanish at any point. To select a specific branch use # Generic code git checkout -b origin/ - # Stay on version 1.0 - git checkout -b 1.0 origin/1.0 + # Stay on version 1.1 + git checkout -b 1.1 origin/1.1 -### Update +## Update To upgrade cdist in the current branch use @@ -128,10 +123,20 @@ To upgrade cdist in the current branch use make man export MANPATH=$MANPATH:$(pwd -P)/doc/man +If you stay on a version branche (i.e. 1.0, 1.1., ...), nothing should break. +The master branch on the other hand is the development branch and may not be +working, break your setup or eat the tree in your garden. + +### Upgrading from 1.0 to 1.1 + +In 1.1 the type **__file** was split into **__directory**, **__file** and +**__link**. The parameter **--type** was removed from **__file**. Thus you +need to replace **__file** calls in your manifests: + + * Remove --type from all __file calls + * If type was symlink, use __link and --type symbolic + * If type was directory, use __directory -The version branches are designed to change if there are incompatibilities. -Or the other way round: As long as you stay on 1.0 and do git pull, nothing -should break. ## Support From 5e58bfbd28ce0e587f5f4694a588409c0c22377a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 10:45:13 +0100 Subject: [PATCH 0712/6109] fix web target Signed-off-by: Nico Schottelius --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 11b9c59a..093859a5 100644 --- a/Makefile +++ b/Makefile @@ -86,7 +86,7 @@ test: .rsync nicosc@ru3.inf.ethz.ch:cdist web: - cp REAL_README $(WEBDIR)/$(WEBPAGE) + cp README $(WEBDIR)/$(WEBPAGE) cd $(WEBDIR) && git commit -m "cdist update" $(WEBPAGE) cd $(WEBDIR) && make pub From 18d0f85fbf4bfb71322d808d34a04d2e9f6a175d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 10:48:43 +0100 Subject: [PATCH 0713/6109] fight against markdown with \ Signed-off-by: Nico Schottelius --- README | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README b/README index 9c645e97..552aecf1 100644 --- a/README +++ b/README @@ -102,7 +102,7 @@ There are at least the following branches available: * master: the development branch * 1.0: First official release - * 1.1: Current stable (includes __file type change) + * 1.1: Current stable (includes \_\_file type change) Other branches may be available for features or bugfixes, but they may vanish at any point. To select a specific branch use @@ -129,13 +129,13 @@ working, break your setup or eat the tree in your garden. ### Upgrading from 1.0 to 1.1 -In 1.1 the type **__file** was split into **__directory**, **__file** and -**__link**. The parameter **--type** was removed from **__file**. Thus you -need to replace **__file** calls in your manifests: +In 1.1 the type **\_\_file** was split into **\_\_directory**, **\_\_file** and +**\_\_link**. The parameter **--type** was removed from **\_\_file**. Thus you +need to replace **\_\_file** calls in your manifests: - * Remove --type from all __file calls - * If type was symlink, use __link and --type symbolic - * If type was directory, use __directory + * Remove --type from all \_\_file calls + * If type was symlink, use \_\_link and --type symbolic + * If type was directory, use \_\_directory ## Support From 2e97515f0b63ec8f6b4369a0bd883d0bbdf0fbb7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 10:52:36 +0100 Subject: [PATCH 0714/6109] cleanup README, more stuff done by cdist Signed-off-by: Nico Schottelius --- README | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README b/README index 552aecf1..a897cb55 100644 --- a/README +++ b/README @@ -48,19 +48,22 @@ it ticks differently: ### Features Stuff that should probably be included in every configuration management, -but is not. Or: The reason why I began to write cdist. +but is not. Or: Why I began to write cdist: * Speed * Elegant code * Clean design * Good documentation (man pages) * Meaningful error messages - * No surprise factor + * The no surprise factor * Consistency in behaviour, naming and documentation * Easy integration into bare metal installations * Simple and well-known DSL: posix shell * It must be very easy to extend and debug cdist * Focus on reuse of existing functionality (like sh, ssh, find, rm, ...) + * Easy upgrade: ***There is no need to update cdist on target hosts!*** + * cdist only needs to be update on the master server + ## Requirements @@ -171,7 +174,9 @@ Yes, I'm actually eating my own dogfood and currently managing * [ircd-hybrid](http://www.ircd-hybrid.org/) (chat) * [stunnel](http://stunnel.mirt.net/) (SSL tunnel) * [mercurial-server](http://www.lshift.net/mercurial-server.html) + * [xfce](http://www.xfce.org/) + * [slim](http://slim.berlios.de/) -with cdist on a total of **4** production servers of the +with cdist on a total of **5** production machines of the [Systems Group](http://www.systems.ethz.ch) at the [ETH Zurich](http://www.ethz.ch). From 37255960d61afa60f7bd7392ce4116ebb271d95f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 10:57:16 +0100 Subject: [PATCH 0715/6109] +urls Signed-off-by: Nico Schottelius --- README | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README b/README index a897cb55..1c0d4111 100644 --- a/README +++ b/README @@ -173,9 +173,9 @@ Yes, I'm actually eating my own dogfood and currently managing * [kerberos (mit)](http://web.mit.edu/kerberos/) (authentication) * [ircd-hybrid](http://www.ircd-hybrid.org/) (chat) * [stunnel](http://stunnel.mirt.net/) (SSL tunnel) - * [mercurial-server](http://www.lshift.net/mercurial-server.html) - * [xfce](http://www.xfce.org/) - * [slim](http://slim.berlios.de/) + * [mercurial-server](http://www.lshift.net/mercurial-server.html) (version control) + * [xfce](http://www.xfce.org/) (lightweight desktop environment) + * [slim](http://slim.berlios.de/) (graphical login manager for X11) with cdist on a total of **5** production machines of the [Systems Group](http://www.systems.ethz.ch) at the From 0f3297bfa21c2bfb484570ef47d16e5c278ef369 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 11:08:12 +0100 Subject: [PATCH 0716/6109] list know working operating systems Signed-off-by: Nico Schottelius --- README | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README b/README index 1c0d4111..c4a580a4 100644 --- a/README +++ b/README @@ -64,6 +64,16 @@ but is not. Or: Why I began to write cdist: * Easy upgrade: ***There is no need to update cdist on target hosts!*** * cdist only needs to be update on the master server +### OS support + +cdist was tested or is know to run on at least + + * [Archlinux](http://www.archlinux.org/) + * [Debian](http://www.debian.org/) + * [Gentoo](http://www.gentoo.org/) + * [Mac OS X](http://www.apple.com/macosx/) + * [Ubuntu](http://www.ubuntu.com/) + ## Requirements From c733c9f9a4835acc9b7e181855b29ce51c6a118d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 11:10:37 +0100 Subject: [PATCH 0717/6109] Change to 1.1.0 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 61b7117f..3e418c77 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -19,7 +19,7 @@ # # -__cdist_version="1.0.4" +__cdist_version="1.1.0" # Fail if something bogus is going on set -u From b11941bdaf56a3c1c1ddd46e673bd76a31fef064 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 11:12:08 +0100 Subject: [PATCH 0718/6109] update changelog Signed-off-by: Nico Schottelius --- doc/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog b/doc/changelog index 1558d59f..52a872d1 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,4 +1,4 @@ -1.1: +1.1.0: 2011-03-16 * Replace type __file with __file, __directory, __link * Document cdist-env * Document cdist-config From f94b39c22bd7262bcd9c3fcc1511c780e4168b01 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 11:16:45 +0100 Subject: [PATCH 0719/6109] fix __file usage in __issue and add redhat support Signed-off-by: Nico Schottelius --- conf/type/__issue/files/redhat | 3 +++ conf/type/__issue/manifest | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 conf/type/__issue/files/redhat diff --git a/conf/type/__issue/files/redhat b/conf/type/__issue/files/redhat new file mode 100644 index 00000000..d93372b0 --- /dev/null +++ b/conf/type/__issue/files/redhat @@ -0,0 +1,3 @@ +Red Hat Enterprise Linux Server (cdist-automated) +Kernel \r on an \m + diff --git a/conf/type/__issue/manifest b/conf/type/__issue/manifest index aa6f7629..1fab9a07 100755 --- a/conf/type/__issue/manifest +++ b/conf/type/__issue/manifest @@ -23,12 +23,12 @@ destination=/etc/issue source="$(cat "out/explorer/os")" case "$os" in - archlinux) - source="$__type/files/archlinux" + archlinux|redhat) + source="$__type/files/$os" ;; *) source="$__type/files/default" ;; esac -__file "$destination" --source "$source" --type file +__file "$destination" --source "$source" From 1bc37f5ba2f00c6440fd539d03ca16afb50d67c3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 11:20:07 +0100 Subject: [PATCH 0720/6109] setup mode 0644 for motd Signed-off-by: Nico Schottelius --- conf/type/__motd/manifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__motd/manifest b/conf/type/__motd/manifest index a6e963f1..4716f530 100755 --- a/conf/type/__motd/manifest +++ b/conf/type/__motd/manifest @@ -38,4 +38,4 @@ case "$os" in ;; esac -__file "$destination" --source "$source" --type file +__file "$destination" --source "$source" --mode 0644 From e0520edb10695c7aace70ab28f385022ae603cfd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 11:20:18 +0100 Subject: [PATCH 0721/6109] document redhat support Signed-off-by: Nico Schottelius --- README | 1 + conf/manifest/init | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/README b/README index c4a580a4..c1df4618 100644 --- a/README +++ b/README @@ -72,6 +72,7 @@ cdist was tested or is know to run on at least * [Debian](http://www.debian.org/) * [Gentoo](http://www.gentoo.org/) * [Mac OS X](http://www.apple.com/macosx/) + * [Redhat](http://www.redhat.com/) * [Ubuntu](http://www.ubuntu.com/) diff --git a/conf/manifest/init b/conf/manifest/init index 0241423b..85a9a359 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -37,11 +37,17 @@ case "$__target_host" in # Same stuff for gentoo __package tree --state installed ;; + cdist-debian) __package_apt atop --state installed __package apache2 --state deinstalled ;; + cdist-redhat) + __issue + __motd + ;; + # Real machines may be used with their hostname or fqdn, # depending on how you call cdist-deploy-to # machine) From b8a0fce4fa63a37c8cd0c39ec0f1bb21c06acb2c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 11:33:01 +0100 Subject: [PATCH 0722/6109] remove grep -q, not supported on solaris, from cdist-env Signed-off-by: Nico Schottelius --- bin/cdist-env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-env b/bin/cdist-env index 3b8e1645..3a477e85 100755 --- a/bin/cdist-env +++ b/bin/cdist-env @@ -34,7 +34,7 @@ cd "$__cdist_abs_mydir/../doc/man" NEWMANPATH="$(pwd -P):$MANPATH" # Match csh, tcsh to handle differently -if $(echo $shell_binary | grep -q 'csh$'); then +if [ "$(echo $shell_binary | grep 'csh$')" ]; then echo setenv PATH $NEWPATH \; echo setenv MANPATH $NEWMANPATH else From 44a41b3893119222271958ce7124e677cfaabe99 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 11:36:45 +0100 Subject: [PATCH 0723/6109] take care of solaris in next version Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.1 | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/dev/todo/post-1.1 b/doc/dev/todo/post-1.1 index 2efa1ab7..8556f253 100644 --- a/doc/dev/todo/post-1.1 +++ b/doc/dev/todo/post-1.1 @@ -1,5 +1,6 @@ Core: - write test case: test.sh + - probably remove grep -q (solaris does not have it) Dependencies: - Add meta parameters like --requires --excludes --depends? From 39739835fa7ce194a07a70286e723dcb1109a3b9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 11:38:05 +0100 Subject: [PATCH 0724/6109] add git mirrors Signed-off-by: Nico Schottelius --- Makefile | 1 + README | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 093859a5..3842e47f 100644 --- a/Makefile +++ b/Makefile @@ -92,3 +92,4 @@ web: pub: git push --mirror + git push --mirror github diff --git a/README b/README index c1df4618..c43e0653 100644 --- a/README +++ b/README @@ -127,6 +127,11 @@ may vanish at any point. To select a specific branch use # Stay on version 1.1 git checkout -b 1.1 origin/1.1 +### Mirrors + + * git://github.com/telmich/cdist.git (Nicos Schottelius' backup) + * git://git.sans.ethz.ch/cdist (Steven Armstrongs main repo) + ## Update To upgrade cdist in the current branch use From 057ee7911e17c161de05dc4c9421ecc920127858 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 11:55:17 +0100 Subject: [PATCH 0725/6109] update mirror description Signed-off-by: Nico Schottelius --- README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index c43e0653..dbf3d89a 100644 --- a/README +++ b/README @@ -129,8 +129,8 @@ may vanish at any point. To select a specific branch use ### Mirrors - * git://github.com/telmich/cdist.git (Nicos Schottelius' backup) - * git://git.sans.ethz.ch/cdist (Steven Armstrongs main repo) + * git://github.com/telmich/cdist.git ([github](https://github.com/telmich/cdist)) + * git://git.sans.ethz.ch/cdist ([sans](http://git.sans.ethz.ch/?p=cdist;a=summary)) ## Update From 86b8428edd307f9f6ead2b24d7d259e315d94bfc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 12:57:13 +0100 Subject: [PATCH 0726/6109] remove hardcoded paths in cdist-type-emulator Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index a4f66e5b..f8e1d2c2 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -41,8 +41,8 @@ echo "$__cdist_object_id" | grep -q "^${__cdist_sane_regexp}\$" || \ __cdist_usage "Insane object id, ${__cdist_object_id}." __cdist_object="${__cdist_type}/${__cdist_object_id}" -__cdist_ddir="$__cdist_output_dir/${__cdist_object}" -__cdist_parameter_dir="$__cdist_ddir/$__cdist_name_parameter" +__cdist_ddir="$(__cdist_object_dir "$__cdist_object")" +__cdist_parameter_dir="$(__cdist_object_parameter_dir "$__cdist_object")" # Append id for error messages __cdist_myname="$__cdist_myname ($__cdist_object_id)" From 1ea57bd9c6fb315e7f2d2f441378ff11524d87d4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 13:03:29 +0100 Subject: [PATCH 0727/6109] cleanup readme Signed-off-by: Nico Schottelius --- README | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README b/README index dbf3d89a..e229614d 100644 --- a/README +++ b/README @@ -115,8 +115,11 @@ how to use cdist. There are at least the following branches available: * master: the development branch + * 1.1: Current stable + +Old versions: + * 1.0: First official release - * 1.1: Current stable (includes \_\_file type change) Other branches may be available for features or bugfixes, but they may vanish at any point. To select a specific branch use From 93eef6900a0a95d5ff3746c0f7ffa374fbc7eaf0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 15:49:28 +0100 Subject: [PATCH 0728/6109] + require in cdist-config Signed-off-by: Nico Schottelius --- bin/cdist-config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/cdist-config b/bin/cdist-config index 3e418c77..0b6d84fa 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_require:=require} : ${__cdist_name_singleton:=singleton} : ${__cdist_name_target_host:=target_host} : ${__cdist_name_type:=type} @@ -248,6 +249,11 @@ __cdist_remote_object_parameter_dir() echo "$(__cdist_remote_object_dir "$1")/${__cdist_name_parameter}" } +__cdist_object_require() +{ + echo "$(__cdist_object_dir "$1")/${__cdist_name_require}" +} + __cdist_object_type_explorer_dir() { echo "$(__cdist_object_dir "$1")/${__cdist_name_explorer}" From a501863f414442a7523053385c5f74f2be11adea Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 15:49:44 +0100 Subject: [PATCH 0729/6109] begin to record requirements Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index f8e1d2c2..07fdcc75 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -104,3 +104,8 @@ other="$(ls)" if [ "$other" ]; then __cdist_usage "Unsupported parameter: $other" fi + +# Record requirements +for requirement in $require; do + echo $requirement >> "$(__cdist_object_require "$__cdist_object")" +done From 91c70b2cc5dc1415a92a92c6ec0a771cfe828b9b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 16 Mar 2011 15:50:04 +0100 Subject: [PATCH 0730/6109] nicosc todos Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 7ce8da49..edb449de 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1 +1,3 @@ -Release 1.1.0 +Dependencies: + Record in bin/cdist-type-emulator + Fix __cdist_object_base_dir issue (vs. $__cdist_out_object_dir in deploy-to) From 5c39063a89b6bacfe6aa768cac72d1be1fca506c Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Thu, 17 Mar 2011 18:55:17 +0100 Subject: [PATCH 0731/6109] Added type __removeline --- conf/type/__removeline/gencode | 31 ++++++++++++++ conf/type/__removeline/man.text | 50 +++++++++++++++++++++++ conf/type/__removeline/parameter/optional | 1 + conf/type/__removeline/parameter/required | 1 + doc/dev/todo/daninext | 2 - doc/dev/todo/post-1.1 | 1 - 6 files changed, 83 insertions(+), 3 deletions(-) create mode 100755 conf/type/__removeline/gencode create mode 100644 conf/type/__removeline/man.text create mode 100644 conf/type/__removeline/parameter/optional create mode 100644 conf/type/__removeline/parameter/required diff --git a/conf/type/__removeline/gencode b/conf/type/__removeline/gencode new file mode 100755 index 00000000..3ec466b9 --- /dev/null +++ b/conf/type/__removeline/gencode @@ -0,0 +1,31 @@ +#!/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 + +line=$(cat "$__object/parameter/line") +echo "ex -c \"/${line}/d|w|q\" \"${file}\" < + + +NAME +---- +cdist-type__removeline - Remove a line (if existing) + + +DESCRIPTION +----------- +This type can be used to check a file for existence of a +specific line and removeing it, if it was not found. + + +REQUIRED PARAMETERS +------------------- +line:: + Specifies the content which shall be removed if existing. + + +OPTIONAL PARAMETERS +------------------- +file:: + If supplied, use this as the destination file. + Otherwise the object_id is used. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Removes the line specifiend in "include_www" from the file "lighttpd.conf" +__removeline www --file /etc/lighttpd.conf --line include_www + +# Removes the line "include_git" from the file "lighttpd.conf" +__removeline /etc/lighttpd.conf --line include_git +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(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). diff --git a/conf/type/__removeline/parameter/optional b/conf/type/__removeline/parameter/optional new file mode 100644 index 00000000..f73f3093 --- /dev/null +++ b/conf/type/__removeline/parameter/optional @@ -0,0 +1 @@ +file diff --git a/conf/type/__removeline/parameter/required b/conf/type/__removeline/parameter/required new file mode 100644 index 00000000..a999a0c2 --- /dev/null +++ b/conf/type/__removeline/parameter/required @@ -0,0 +1 @@ +line diff --git a/doc/dev/todo/daninext b/doc/dev/todo/daninext index 19ebc573..e69de29b 100644 --- a/doc/dev/todo/daninext +++ b/doc/dev/todo/daninext @@ -1,2 +0,0 @@ -file-edit - - add_line_to_file_if_not_existing diff --git a/doc/dev/todo/post-1.1 b/doc/dev/todo/post-1.1 index 8556f253..a4f525e3 100644 --- a/doc/dev/todo/post-1.1 +++ b/doc/dev/todo/post-1.1 @@ -13,7 +13,6 @@ Types to be written/extended: - __service - __user - __file_edit - - __deleteline - regexp replace (can probably cover all?) - cron - __issue: add --source From 74d3a239305fbd6852335c312b819a807ae87c80 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Thu, 17 Mar 2011 19:06:33 +0100 Subject: [PATCH 0732/6109] Removed a not --- conf/type/__removeline/man.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__removeline/man.text b/conf/type/__removeline/man.text index c945bfd6..5cf7791f 100644 --- a/conf/type/__removeline/man.text +++ b/conf/type/__removeline/man.text @@ -11,7 +11,7 @@ cdist-type__removeline - Remove a line (if existing) DESCRIPTION ----------- This type can be used to check a file for existence of a -specific line and removeing it, if it was not found. +specific line and removeing it, if it was found. REQUIRED PARAMETERS From 6e5710d4fde1ca099cffb83d36c4e6b2cef9fcee Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Mar 2011 19:09:33 +0100 Subject: [PATCH 0733/6109] stuff for 1.1.1 Signed-off-by: Nico Schottelius --- doc/changelog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/changelog b/doc/changelog index fae5607a..d69731ca 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,3 +1,6 @@ +1.1.1: + * New type __removeline + 1.1.0: 2011-03-16 * Replace type __file with __file, __directory, __link * Document cdist-env From 6c3631418ee201f7c54f410ece6e0a52b519de31 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Mar 2011 20:19:26 +0100 Subject: [PATCH 0734/6109] notes on current status Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index edb449de..f3c75add 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,3 +1,24 @@ Dependencies: Record in bin/cdist-type-emulator Fix __cdist_object_base_dir issue (vs. $__cdist_out_object_dir in deploy-to) + | + | +|-----| +| +| +| New problem: + +Parts of the core use argv (see bin/cdist-deploy-to), +assign this either an own name or a "standard" name. + +cdist-config has a function that uses this "standard" var: + /home/users/nico/oeffentlich/rechner/projekte/cdist/bin/cdist-config: Zeile 229: __cdist_object_base_dir ist nicht gesetzt. + +In essence: + + - either argv lists get much longer (supplying all relevant arguments) + - OR cdist-core commands depend on the given environment: + - makes debugging more look like + var1="" var2="" var3="" ... cdist-$tool_to_debug + vs. currently + var1="" cdist-$tool_to_debug opt1 opt2 From 5b82a0fcda81cfcf0a05162d51298768c02532fd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Mar 2011 20:30:19 +0100 Subject: [PATCH 0735/6109] decide to remove argv Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index f3c75add..d0a232cd 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -22,3 +22,10 @@ In essence: var1="" var2="" var3="" ... cdist-$tool_to_debug vs. currently var1="" cdist-$tool_to_debug opt1 opt2 + +-------------------------------------------------------------------------------- +It seems that being able to pass the target host as argv makes sense, +but everything else can be used from cdist-config -> do not pass. + +Changing those variables is only needed if debugging the core and for +this purpose setting variables is fine. From 96c9ecf6fe5111e68eedf8ac4a1526bf443fa351 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Mar 2011 20:33:26 +0100 Subject: [PATCH 0736/6109] strip one parameter from cdist-bin-transfer Signed-off-by: Nico Schottelius --- bin/cdist-bin-transfer | 9 ++++----- bin/cdist-deploy-to | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/cdist-bin-transfer b/bin/cdist-bin-transfer index 7b98de28..e9a0a320 100755 --- a/bin/cdist-bin-transfer +++ b/bin/cdist-bin-transfer @@ -22,11 +22,10 @@ # . cdist-config -[ $# -eq 2 ] || __cdist_usage " " +[ $# -eq 1 ] || __cdist_usage "" set -eu __cdist_target_host="$1"; shift -__cdist_my_remote_out_dir="$1"; shift # Find directory that contains cdist binaries __cdist_conf_dir_path=$(which cdist-config) @@ -37,15 +36,15 @@ echo "Transferring cdist binaries ..." # re-create basedir so it's clean ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "rm -rf \"${__cdist_my_remote_out_dir}\" && mkdir -p \"${__cdist_my_remote_out_dir}\"" + "rm -rf \"${__cdist_remote_bin_dir}\" && mkdir -p \"${__cdist_remote_bin_dir}\"" # Transfer cdist-* to the remote host scp -qr "${__cdist_src_base}"* \ - "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_my_remote_out_dir}" + "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_bin_dir}" # Adjust cdist-config to contain static version string tmp_version="$__cdist_version" sed "s/^: \${\(__cdist_version\):=.*/\1=\"$tmp_version\"/" "$(which cdist-config)" | \ ssh -q "${__cdist_remote_user}@${__cdist_target_host}" \ - "cat > \"${__cdist_my_remote_out_dir}\"/cdist-config" + "cat > \"${__cdist_remote_bin_dir}\"/cdist-config" diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index d006dd2d..0693a051 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -43,7 +43,7 @@ echo "cdist $__cdist_version: Configuring $__cdist_target_host" __cdist_init_deploy "$__cdist_target_host" # Transfer cdist "binaries" -cdist-bin-transfer "$__cdist_target_host" "$__cdist_remote_bin_dir" +cdist-bin-transfer "$__cdist_target_host" # Execute general explorers cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" From e0791f24e22337cd61158b4656e2963c5846bba9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Mar 2011 20:34:01 +0100 Subject: [PATCH 0737/6109] fix nexttodo Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index d0a232cd..72693a7b 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -29,3 +29,6 @@ but everything else can be used from cdist-config -> do not pass. Changing those variables is only needed if debugging the core and for this purpose setting variables is fine. +-------------------------------------------------------------------------------- + + ----------> go through cdist-deploy-to and do a cleanup round From f358a34e1d26ab4f4dfbf7e44149827250486be3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Mar 2011 20:40:22 +0100 Subject: [PATCH 0738/6109] obsolete cdist-bin-transfer Signed-off-by: Nico Schottelius --- bin/cdist-bin-transfer | 50 ------------------------------------------ bin/cdist-deploy-to | 5 +++-- conf/manifest/init | 2 +- 3 files changed, 4 insertions(+), 53 deletions(-) delete mode 100755 bin/cdist-bin-transfer diff --git a/bin/cdist-bin-transfer b/bin/cdist-bin-transfer deleted file mode 100755 index e9a0a320..00000000 --- a/bin/cdist-bin-transfer +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# -# 2010-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 . -# -# -# Transfer all executables -# - -. cdist-config -[ $# -eq 1 ] || __cdist_usage "" -set -eu - -__cdist_target_host="$1"; shift - -# Find directory that contains cdist binaries -__cdist_conf_dir_path=$(which cdist-config) -__cdist_src_base=${__cdist_conf_dir_path%config} - -# Help the user -echo "Transferring cdist binaries ..." - -# re-create basedir so it's clean -ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "rm -rf \"${__cdist_remote_bin_dir}\" && mkdir -p \"${__cdist_remote_bin_dir}\"" - -# Transfer cdist-* to the remote host -scp -qr "${__cdist_src_base}"* \ - "${__cdist_remote_user}@${__cdist_target_host}:${__cdist_remote_bin_dir}" - -# Adjust cdist-config to contain static version string -tmp_version="$__cdist_version" -sed "s/^: \${\(__cdist_version\):=.*/\1=\"$tmp_version\"/" "$(which cdist-config)" | \ - ssh -q "${__cdist_remote_user}@${__cdist_target_host}" \ - "cat > \"${__cdist_remote_bin_dir}\"/cdist-config" - diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 0693a051..3d83dfec 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -42,8 +42,9 @@ echo "cdist $__cdist_version: Configuring $__cdist_target_host" # Prepare local and remote directories __cdist_init_deploy "$__cdist_target_host" -# Transfer cdist "binaries" -cdist-bin-transfer "$__cdist_target_host" +# Transfer cdist executables +echo "Transferring cdist binaries ...X" +cdist-dir push "$__cdist_target_host" "${__cdist_abs_mydir}" "${__cdist_remote_bin_dir}" # Execute general explorers cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" diff --git a/conf/manifest/init b/conf/manifest/init index 85a9a359..e54f83aa 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -13,7 +13,7 @@ case "$__target_host" in # Everybody has this localhost) __link /tmp/cdist-testfile --source /etc/cdist-configured --type symbolic - __directory /tmp/cdist-test-dir --mode 4777 + require="foo" __directory /tmp/cdist-test-dir --mode 4777 __file /tmp/cdist-test-file --mode 0750 --owner nobody --group root ;; From 0f8a0097e0c23a1c9670aa6bf317bb9230b02991 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Mar 2011 20:41:31 +0100 Subject: [PATCH 0739/6109] and remove documentation for cdist-bin-transfer Signed-off-by: Nico Schottelius --- Makefile | 1 - doc/man/cdist-bin-transfer.text | 30 ------------------------------ 2 files changed, 31 deletions(-) delete mode 100644 doc/man/cdist-bin-transfer.text diff --git a/Makefile b/Makefile index 3842e47f..90335d99 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,6 @@ MANDIR=doc/man MANGENERATED=$(MANDIR)/cdist-reference.text MANSRC=$(MANDIR)/cdist.text \ - $(MANDIR)/cdist-bin-transfer.text \ $(MANDIR)/cdist-config.text \ $(MANDIR)/cdist-dir.text \ $(MANDIR)/cdist-env.text \ diff --git a/doc/man/cdist-bin-transfer.text b/doc/man/cdist-bin-transfer.text deleted file mode 100644 index 21f00b65..00000000 --- a/doc/man/cdist-bin-transfer.text +++ /dev/null @@ -1,30 +0,0 @@ -cdist-bin-transfer(1) -===================== -Nico Schottelius - - -NAME ----- -cdist-bin-transfer - Transfer binaries to the target - - -SYNOPSIS --------- -cdist-deploy-to HOSTNAME REMOTE_DIR - - -DESCRIPTION ------------ -cdist-bin-transfer copies all cdist binaries to the given host HOSTNAME -into the given directory REMOTE_DIR. These binaries will be used in -further stages to retrieve information or apply configurations. - -SEE ALSO --------- -cdist(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). From 6b098bff3ba2c2e0feaff8e057cb3500d9ace078 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Mar 2011 23:46:13 +0100 Subject: [PATCH 0740/6109] cleanup bin/cdist-explorer-run-global and rename it from bin/cdist-explorer-run-init Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 2 +- ...cdist-explorer-run-init => cdist-explorer-run-global} | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) rename bin/{cdist-explorer-run-init => cdist-explorer-run-global} (82%) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 3d83dfec..3436ca20 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -47,7 +47,7 @@ echo "Transferring cdist binaries ...X" cdist-dir push "$__cdist_target_host" "${__cdist_abs_mydir}" "${__cdist_remote_bin_dir}" # Execute general explorers -cdist-explorer-run-init "$__cdist_target_host" "$__cdist_out_explorer_dir" +cdist-explorer-run-global "$__cdist_target_host" # Create initial object base cdist-manifest-run-init "$__cdist_target_host" "$__cdist_out_object_dir" diff --git a/bin/cdist-explorer-run-init b/bin/cdist-explorer-run-global similarity index 82% rename from bin/cdist-explorer-run-init rename to bin/cdist-explorer-run-global index 492c70d0..7a06a982 100755 --- a/bin/cdist-explorer-run-init +++ b/bin/cdist-explorer-run-global @@ -18,17 +18,16 @@ # along with cdist. If not, see . # # -# Copy & run the general explorers, i.e. not bound to types +# Copy & run the global explorers, i.e. not bound to types # . cdist-config -[ $# -eq 2 ] || __cdist_usage " " +[ $# -eq 1 ] || __cdist_usage "" set -ue __cdist_target_host="$1"; shift -__cdist_my_out_dir="$1"; shift -echo "Running general explorers ..." +echo "Running global explorers ..." # copy the explorers cdist-dir push "$__cdist_target_host" \ @@ -41,4 +40,4 @@ cdist-run-remote "${__cdist_target_host}" cdist-remote-explorer-run \ # retrieve the results cdist-dir pull "$__cdist_target_host" \ - "${__cdist_remote_out_explorer_dir}" "${__cdist_my_out_dir}" + "${__cdist_remote_out_explorer_dir}" "${__cdist_out_explorer_dir}" From 0243e71fe7c7880b317d32582b4ac47e23e1632d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Mar 2011 23:47:46 +0100 Subject: [PATCH 0741/6109] document cdist-explorer-run-global Signed-off-by: Nico Schottelius --- doc/man/cdist-explorer-run-global.text | 31 ++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 doc/man/cdist-explorer-run-global.text diff --git a/doc/man/cdist-explorer-run-global.text b/doc/man/cdist-explorer-run-global.text new file mode 100644 index 00000000..f4b32dfb --- /dev/null +++ b/doc/man/cdist-explorer-run-global.text @@ -0,0 +1,31 @@ +cdist-explorer-run-global(1) +============================ +Nico Schottelius + + +NAME +---- +cdist-explorer-run-global - Run the global explorers + + +SYNOPSIS +-------- +cdist-explorer-run-global HOSTNAME + + +DESCRIPTION +----------- +Transfer the global explorers to HOSTNAME, execute them and transfer +back the results. + + +SEE ALSO +-------- +- cdist(7) +- cdist-deploy-to(1) + + +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). From b7a91a97ac1336b1d2b24ec0e7aea2622bacd3ec Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Mar 2011 23:49:36 +0100 Subject: [PATCH 0742/6109] cleanup makefile + new doc Signed-off-by: Nico Schottelius --- Makefile | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 90335d99..4a6f0422 100644 --- a/Makefile +++ b/Makefile @@ -12,17 +12,18 @@ WEBPAGE=software/cdist.mdwn MANDIR=doc/man MANGENERATED=$(MANDIR)/cdist-reference.text -MANSRC=$(MANDIR)/cdist.text \ - $(MANDIR)/cdist-config.text \ - $(MANDIR)/cdist-dir.text \ - $(MANDIR)/cdist-env.text \ - $(MANDIR)/cdist-deploy-to.text \ - $(MANDIR)/cdist-explorer.text \ - $(MANDIR)/cdist-manifest.text \ - $(MANDIR)/cdist-quickstart.text \ - $(MANDIR)/cdist-stages.text \ - $(MANDIR)/cdist-type.text \ - $(MANDIR)/cdist-type-template.text \ +MANSRC=$(MANDIR)/cdist.text \ + $(MANDIR)/cdist-config.text \ + $(MANDIR)/cdist-dir.text \ + $(MANDIR)/cdist-env.text \ + $(MANDIR)/cdist-explorer-run-global.text \ + $(MANDIR)/cdist-deploy-to.text \ + $(MANDIR)/cdist-explorer.text \ + $(MANDIR)/cdist-manifest.text \ + $(MANDIR)/cdist-quickstart.text \ + $(MANDIR)/cdist-stages.text \ + $(MANDIR)/cdist-type.text \ + $(MANDIR)/cdist-type-template.text \ ################################################################################ From 02abb22a0de3d82adca2be9ec8c853c2cb8bfb7f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Mar 2011 23:54:16 +0100 Subject: [PATCH 0743/6109] replace broken __cdist_object_base_dir with __cdist_out_object_dir} 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 0b6d84fa..38f997fa 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -226,7 +226,7 @@ __cdist_object_id_from_object() __cdist_object_dir() { - echo "${__cdist_object_base_dir}/$1" + echo "${__cdist_out_object_dir}/$1" } __cdist_remote_object_dir() From 26eb50c89c65f9f7ed73280219081dce0adae087 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Mar 2011 23:54:45 +0100 Subject: [PATCH 0744/6109] +todo Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 72693a7b..3ddcc5b2 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -31,4 +31,4 @@ Changing those variables is only needed if debugging the core and for this purpose setting variables is fine. -------------------------------------------------------------------------------- - ----------> go through cdist-deploy-to and do a cleanup round +go through cdist-deploy-to and do a cleanup round From 4c36c7dddbf4aecbae151a336c25c8954d4f71b5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 17 Mar 2011 23:55:37 +0100 Subject: [PATCH 0745/6109] update cdist-manifest-run-init to argc==1 as well Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 7 ++----- bin/cdist-manifest-run-init | 5 ++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 3436ca20..5eac578b 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -43,14 +43,11 @@ echo "cdist $__cdist_version: Configuring $__cdist_target_host" __cdist_init_deploy "$__cdist_target_host" # Transfer cdist executables -echo "Transferring cdist binaries ...X" +echo "Transferring cdist binaries ..." cdist-dir push "$__cdist_target_host" "${__cdist_abs_mydir}" "${__cdist_remote_bin_dir}" -# Execute general explorers cdist-explorer-run-global "$__cdist_target_host" - -# Create initial object base -cdist-manifest-run-init "$__cdist_target_host" "$__cdist_out_object_dir" +cdist-manifest-run-init "$__cdist_target_host" # Create dependent objects cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" diff --git a/bin/cdist-manifest-run-init b/bin/cdist-manifest-run-init index a775d5a5..f895bafa 100755 --- a/bin/cdist-manifest-run-init +++ b/bin/cdist-manifest-run-init @@ -23,13 +23,12 @@ # . cdist-config -[ $# -eq 2 ] || __cdist_usage " " +[ $# -eq 1 ] || __cdist_usage "" set -e __cdist_target_host="$1"; shift -__cdist_output_dir="$1"; shift eval export $__cdist_name_var_manifest=\"\$__cdist_manifest_dir\" echo "Running initial manifest for $__cdist_target_host ..." -cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest_init" "$__cdist_output_dir" +cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest_init" "$__cdist_out_object_dir" From d1191fb4a9d1043917719f9ca9a34014f507a7c3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 00:00:28 +0100 Subject: [PATCH 0746/6109] document cdist-manifest-run-init Signed-off-by: Nico Schottelius --- Makefile | 1 + doc/man/cdist-manifest-run-init.text | 32 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 doc/man/cdist-manifest-run-init.text diff --git a/Makefile b/Makefile index 4a6f0422..b53bdbf9 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,7 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-deploy-to.text \ $(MANDIR)/cdist-explorer.text \ $(MANDIR)/cdist-manifest.text \ + $(MANDIR)/cdist-manifest-run-init.text \ $(MANDIR)/cdist-quickstart.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-type.text \ diff --git a/doc/man/cdist-manifest-run-init.text b/doc/man/cdist-manifest-run-init.text new file mode 100644 index 00000000..3a3265dc --- /dev/null +++ b/doc/man/cdist-manifest-run-init.text @@ -0,0 +1,32 @@ +cdist-manifest-run-init(1) +========================== +Nico Schottelius + + +NAME +---- +cdist-manifest-run-init - Run the initial manifest + + +SYNOPSIS +-------- +cdist-manifest-run-init HOSTNAME + + +DESCRIPTION +----------- +cdist-manifest-run-init executes the initial manifest, which creates +the first objects. + + +SEE ALSO +-------- +- cdist(7) +- cdist-deploy-to(1) +- cdist-manifest-run-all(1) + + +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). From adcb88d53d5328f8fa69a56f717fe5e0465eaa05 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 00:01:14 +0100 Subject: [PATCH 0747/6109] ignore unset requirements Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 07fdcc75..fcfbe60f 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -106,6 +106,8 @@ if [ "$other" ]; then fi # Record requirements +# it's fine, if it's not set +set +u for requirement in $require; do echo $requirement >> "$(__cdist_object_require "$__cdist_object")" done From 833c09adce9748fe864d2c9eb1d5d5dd6e0ff3fb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 00:07:49 +0100 Subject: [PATCH 0748/6109] argc == 1 for cdist-manifest-run-all Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 4 +--- bin/cdist-manifest-run-all | 9 ++++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 5eac578b..1461d526 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -48,9 +48,7 @@ cdist-dir push "$__cdist_target_host" "${__cdist_abs_mydir}" "${__cdist_remote_b cdist-explorer-run-global "$__cdist_target_host" cdist-manifest-run-init "$__cdist_target_host" - -# Create dependent objects -cdist-manifest-run-all "$__cdist_target_host" "$__cdist_out_object_dir" +cdist-manifest-run-all "$__cdist_target_host" # Run explorer of each type for every object of types with explorer cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index df4548bf..a111627f 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -28,11 +28,10 @@ # . cdist-config -[ $# -eq 2 ] || __cdist_usage " " +[ $# -eq 1 ] || __cdist_usage "" set -eu __cdist_target_host="$1"; shift -__cdist_object_base_dir="$1"; shift __cdist_objects_list="${__cdist_tmp_dir}/objects_file" __cdist_new_objects_list="${__cdist_tmp_dir}/new_objects_file" @@ -46,12 +45,12 @@ while [ "$__cdist_new_objects_created" = "y" ]; do # Assume we're done after this run __cdist_new_objects_created=n - __cdist_object_list "$__cdist_object_base_dir" > "$__cdist_objects_list" + __cdist_object_list "$__cdist_out_object_dir" > "$__cdist_objects_list" # Check every object, if we need to run it while read __cdist_object; do # Full path to current object - __cdist_cur_object_dir="$__cdist_object_base_dir/$__cdist_object" + __cdist_cur_object_dir="$__cdist_out_object_dir/$__cdist_object" # Only the id __cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")" @@ -89,7 +88,7 @@ while [ "$__cdist_new_objects_created" = "y" ]; do [ "$__cdist_new_objects_created" = "n" ] && __cdist_new_objects_created="y" # where to save the newly created object - __cdist_object_dir="$__cdist_object_base_dir/$__cdist_new_object" + __cdist_object_dir="$__cdist_out_object_dir/$__cdist_new_object" # Source of the new object __cdist_new_object_dir="${__cdist_new_objects_dir}/$__cdist_new_object" From fa97d7080c0190775b777f5d4fd46f92f65f7e8c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 00:08:38 +0100 Subject: [PATCH 0749/6109] todo -- Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 3ddcc5b2..6576877e 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,34 +1,10 @@ Dependencies: Record in bin/cdist-type-emulator Fix __cdist_object_base_dir issue (vs. $__cdist_out_object_dir in deploy-to) - | - | -|-----| -| -| -| New problem: + go through cdist-deploy-to and do a cleanup round -Parts of the core use argv (see bin/cdist-deploy-to), -assign this either an own name or a "standard" name. - -cdist-config has a function that uses this "standard" var: - /home/users/nico/oeffentlich/rechner/projekte/cdist/bin/cdist-config: Zeile 229: __cdist_object_base_dir ist nicht gesetzt. - -In essence: - - - either argv lists get much longer (supplying all relevant arguments) - - OR cdist-core commands depend on the given environment: - - makes debugging more look like - var1="" var2="" var3="" ... cdist-$tool_to_debug - vs. currently - var1="" cdist-$tool_to_debug opt1 opt2 -------------------------------------------------------------------------------- -It seems that being able to pass the target host as argv makes sense, -but everything else can be used from cdist-config -> do not pass. - -Changing those variables is only needed if debugging the core and for -this purpose setting variables is fine. --------------------------------------------------------------------------------- - -go through cdist-deploy-to and do a cleanup round +done: +* Document cdist-explorer-run-global +* Document cdist-manifest-run-init From 8dddec57db480084f050a32adc7150789541f6b4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 00:11:12 +0100 Subject: [PATCH 0750/6109] document cdist-manifest-run-all Signed-off-by: Nico Schottelius --- Makefile | 1 + doc/dev/todo/niconext | 1 + doc/man/cdist-manifest-run-all.text | 32 +++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 doc/man/cdist-manifest-run-all.text diff --git a/Makefile b/Makefile index b53bdbf9..2eae1e93 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,7 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-explorer.text \ $(MANDIR)/cdist-manifest.text \ $(MANDIR)/cdist-manifest-run-init.text \ + $(MANDIR)/cdist-manifest-run-all.text \ $(MANDIR)/cdist-quickstart.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-type.text \ diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 6576877e..0960b372 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -8,3 +8,4 @@ Dependencies: done: * Document cdist-explorer-run-global * Document cdist-manifest-run-init +* Document cdist-manifest-run-all diff --git a/doc/man/cdist-manifest-run-all.text b/doc/man/cdist-manifest-run-all.text new file mode 100644 index 00000000..717089ad --- /dev/null +++ b/doc/man/cdist-manifest-run-all.text @@ -0,0 +1,32 @@ +cdist-manifest-run-all(1) +========================== +Nico Schottelius + + +NAME +---- +cdist-manifest-run-all - Run manifests of all created types + + +SYNOPSIS +-------- +cdist-manifest-run-all HOSTNAME + + +DESCRIPTION +----------- +cdist-manifest-run-all iterates over every existing object and +executes the manifest of its type. + + +SEE ALSO +-------- +- cdist(7) +- cdist-deploy-to(1) +- cdist-manifest-run-init(1) + + +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). From 618287efaad92083b981fb02ecf1a151700f8e38 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 00:15:02 +0100 Subject: [PATCH 0751/6109] argc == 1 for cdist-object-explorer-all Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 4 +--- bin/cdist-object-explorer-all | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 1461d526..07e0459a 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -49,9 +49,7 @@ cdist-dir push "$__cdist_target_host" "${__cdist_abs_mydir}" "${__cdist_remote_b cdist-explorer-run-global "$__cdist_target_host" cdist-manifest-run-init "$__cdist_target_host" cdist-manifest-run-all "$__cdist_target_host" - -# Run explorer of each type for every object of types with explorer -cdist-object-explorer-all "$__cdist_target_host" "$__cdist_out_object_dir" +cdist-object-explorer-all "$__cdist_target_host" # Generate code for all objects cdist-object-gencode-all "$__cdist_target_host" "$__cdist_out_object_dir" diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all index 8d6ab54a..8654b03f 100755 --- a/bin/cdist-object-explorer-all +++ b/bin/cdist-object-explorer-all @@ -22,18 +22,17 @@ # . cdist-config -[ $# -eq 2 ] || __cdist_usage " " +[ $# -eq 1 ] || __cdist_usage "" set -eu __cdist_target_host="$1"; shift -__cdist_object_base_dir="$1"; shift object_listing="$__cdist_tmp_dir/objects" type_listing_all="$__cdist_tmp_dir/types_all" type_listing="$__cdist_tmp_dir/types" # Get listing of objects -__cdist_object_list "$__cdist_object_base_dir" > "$object_listing" +__cdist_object_list "$__cdist_out_object_dir" > "$object_listing" # Get listing of types used while read object; do From df2e77f9edf3a561a12be5c37add531bee96ec4d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 00:18:00 +0100 Subject: [PATCH 0752/6109] document cdist-object-explorer-all Signed-off-by: Nico Schottelius --- Makefile | 1 + doc/man/cdist-object-explorer-all.text | 33 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 doc/man/cdist-object-explorer-all.text diff --git a/Makefile b/Makefile index 2eae1e93..df87de17 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-manifest.text \ $(MANDIR)/cdist-manifest-run-init.text \ $(MANDIR)/cdist-manifest-run-all.text \ + $(MANDIR)/cdist-object-explorer-all.text \ $(MANDIR)/cdist-quickstart.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-type.text \ diff --git a/doc/man/cdist-object-explorer-all.text b/doc/man/cdist-object-explorer-all.text new file mode 100644 index 00000000..dda3d30d --- /dev/null +++ b/doc/man/cdist-object-explorer-all.text @@ -0,0 +1,33 @@ +cdist-object-explorer-all(1) +============================ +Nico Schottelius + + +NAME +---- +cdist-object-explorer-all - Run type explorer for every object + + +SYNOPSIS +-------- +cdist-object-explorer-all HOSTNAME + + +DESCRIPTION +----------- +For every object, it checks whether the type has one or more explorers. +If so, the explorers of the type are copied to the target and executed +once per object. + + +SEE ALSO +-------- +- cdist(7) +- cdist-deploy-to(1) +- cdist-remote-explorer-run(1) + + +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). From 82cac6f3d82c31e6a5f4965cd7174dd3e4107256 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 00:18:44 +0100 Subject: [PATCH 0753/6109] less todo - more fun Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.1 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/doc/dev/todo/post-1.1 b/doc/dev/todo/post-1.1 index a4f525e3..2575d7bb 100644 --- a/doc/dev/todo/post-1.1 +++ b/doc/dev/todo/post-1.1 @@ -33,13 +33,9 @@ Documentation: + cdist-manifest - ensure every file in bin/ has a correspondent manpage - cdist-code-run-all - - cdist-explorer-run-init - cdist-manifest-run - - cdist-manifest-run-all - - cdist-manifest-run-init - cdist-object-codegen - cdist-object-codegen-all - - cdist-object-explorer-all - cdist-remote-code-run-all - cdist-remote-explorer-run - cdist-run-remote From 7e713f1b224a69fc30ba955ccf21dd832fccf0e9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 00:22:02 +0100 Subject: [PATCH 0754/6109] argc == 1 for cdist-object-gencode-all Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 4 +--- bin/cdist-object-gencode-all | 13 ++++--------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 07e0459a..d122ac08 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -50,9 +50,7 @@ cdist-explorer-run-global "$__cdist_target_host" cdist-manifest-run-init "$__cdist_target_host" cdist-manifest-run-all "$__cdist_target_host" cdist-object-explorer-all "$__cdist_target_host" - -# Generate code for all objects -cdist-object-gencode-all "$__cdist_target_host" "$__cdist_out_object_dir" +cdist-object-gencode-all "$__cdist_target_host" # Transfer all objects including code cdist-dir push "$__cdist_target_host" "$__cdist_out_object_dir" \ diff --git a/bin/cdist-object-gencode-all b/bin/cdist-object-gencode-all index 40c39fd4..024e4a69 100755 --- a/bin/cdist-object-gencode-all +++ b/bin/cdist-object-gencode-all @@ -18,29 +18,24 @@ # along with cdist. If not, see . # # -# For each created object create the code to be executed on the -# target. +# For each created object create the code to be executed on the target. # . cdist-config - -if [ $# -ne 2 ]; then - __cdist_usage " " -fi +[ $# -eq 1 ] || __cdist_usage "" set -eu __cdist_target_host="$1"; shift -__cdist_object_base_dir="$1"; shift -__cdist_object_list "$__cdist_object_base_dir" > "$__cdist_tmp_file" +__cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file" while read object; do code="$(__cdist_object_code "$object")" echo "Generating code for $object ..." cdist-object-gencode "$__cdist_target_host" \ - "$__cdist_object_base_dir" \ + "$__cdist_out_object_dir" \ "$object" > "${code}" chmod u+x "${code}" From 2f207c29e5d2c54ba62fb52c82ef0a7a74f3794d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 00:24:58 +0100 Subject: [PATCH 0755/6109] document cdist-object-gencode-all Signed-off-by: Nico Schottelius --- Makefile | 1 + doc/man/cdist-object-gencode-all.text | 31 +++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 doc/man/cdist-object-gencode-all.text diff --git a/Makefile b/Makefile index df87de17..9317803f 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,7 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-manifest-run-init.text \ $(MANDIR)/cdist-manifest-run-all.text \ $(MANDIR)/cdist-object-explorer-all.text \ + $(MANDIR)/cdist-object-gencode-all.text \ $(MANDIR)/cdist-quickstart.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-type.text \ diff --git a/doc/man/cdist-object-gencode-all.text b/doc/man/cdist-object-gencode-all.text new file mode 100644 index 00000000..40d4335d --- /dev/null +++ b/doc/man/cdist-object-gencode-all.text @@ -0,0 +1,31 @@ +cdist-object-gencode-all(1) +=========================== +Nico Schottelius + + +NAME +---- +cdist-object-gencode-all - Generate code for every existing object + + +SYNOPSIS +-------- +cdist-object-gencode-all HOSTNAME + + +DESCRIPTION +----------- +For every object that exists, the cdist-object-gencode is executed. + + +SEE ALSO +-------- +- cdist(7) +- cdist-deploy-to(1) +- cdist-object-gencode(1) + + +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). From 0f8341765200cf72eaa712057125a0a448a75810 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 00:28:05 +0100 Subject: [PATCH 0756/6109] argc-=1 for cdist-object-gencode Signed-off-by: Nico Schottelius --- bin/cdist-object-gencode | 5 ++--- bin/cdist-object-gencode-all | 5 +---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/bin/cdist-object-gencode b/bin/cdist-object-gencode index a1092a46..aea1da07 100755 --- a/bin/cdist-object-gencode +++ b/bin/cdist-object-gencode @@ -23,11 +23,10 @@ # . cdist-config -[ $# -eq 3 ] || __cdist_usage "" "" "" +[ $# -eq 2 ] || __cdist_usage "" "" set -eu __cdist_target_host="$1"; shift -__cdist_object_base_dir="$1"; shift __cdist_object="$1"; shift __cdist_object_dir="$(__cdist_object_dir "$__cdist_object")" @@ -55,7 +54,7 @@ if [ -x "$gencode" ]; then __cdist_exec_fail_on_error "$gencode" else if [ -f "$gencode" ]; then - echo "$gencode" exists, but is not executable >&2 + echo "Warning: $gencode exists, but is not executable" >&2 fi # No gencode? also fine! Ensure we exit 0 diff --git a/bin/cdist-object-gencode-all b/bin/cdist-object-gencode-all index 024e4a69..90090c8a 100755 --- a/bin/cdist-object-gencode-all +++ b/bin/cdist-object-gencode-all @@ -23,7 +23,6 @@ . cdist-config [ $# -eq 1 ] || __cdist_usage "" - set -eu __cdist_target_host="$1"; shift @@ -34,9 +33,7 @@ while read object; do code="$(__cdist_object_code "$object")" echo "Generating code for $object ..." - cdist-object-gencode "$__cdist_target_host" \ - "$__cdist_out_object_dir" \ - "$object" > "${code}" + cdist-object-gencode "$__cdist_target_host" "$object" > "${code}" chmod u+x "${code}" done < "$__cdist_tmp_file" From d204ac523ce6eae16086ae0b53af05dc47d71462 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 00:32:04 +0100 Subject: [PATCH 0757/6109] document cdist-object-gencode Signed-off-by: Nico Schottelius --- Makefile | 1 + doc/man/cdist-object-gencode.text | 32 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 doc/man/cdist-object-gencode.text diff --git a/Makefile b/Makefile index 9317803f..33bbff1d 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,7 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-manifest-run-init.text \ $(MANDIR)/cdist-manifest-run-all.text \ $(MANDIR)/cdist-object-explorer-all.text \ + $(MANDIR)/cdist-object-gencode.text \ $(MANDIR)/cdist-object-gencode-all.text \ $(MANDIR)/cdist-quickstart.text \ $(MANDIR)/cdist-stages.text \ diff --git a/doc/man/cdist-object-gencode.text b/doc/man/cdist-object-gencode.text new file mode 100644 index 00000000..c6fc8b18 --- /dev/null +++ b/doc/man/cdist-object-gencode.text @@ -0,0 +1,32 @@ +cdist-object-gencode(1) +======================= +Nico Schottelius + + +NAME +---- +cdist-object-gencode - Generate code for a given object + + +SYNOPSIS +-------- +cdist-object-gencode HOSTNAME OBJECT + + +DESCRIPTION +----------- +For the given object, run the gencode executable. The output of this +executable on stdout will be used by cdist-object-gencode-all(1). + + +SEE ALSO +-------- +- cdist(7) +- cdist-deploy-to(1) +- cdist-object-gencode-all(1) + + +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). From be9eec702c1a9d45c1419959a91ee3342b41b95a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 00:37:33 +0100 Subject: [PATCH 0758/6109] document cdist-code-run-all Signed-off-by: Nico Schottelius --- Makefile | 1 + doc/man/cdist-code-run-all.text | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 doc/man/cdist-code-run-all.text diff --git a/Makefile b/Makefile index 33bbff1d..f3b1ef78 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ MANDIR=doc/man MANGENERATED=$(MANDIR)/cdist-reference.text MANSRC=$(MANDIR)/cdist.text \ + $(MANDIR)/cdist-code-run-all.text \ $(MANDIR)/cdist-config.text \ $(MANDIR)/cdist-dir.text \ $(MANDIR)/cdist-env.text \ diff --git a/doc/man/cdist-code-run-all.text b/doc/man/cdist-code-run-all.text new file mode 100644 index 00000000..fba2e7e3 --- /dev/null +++ b/doc/man/cdist-code-run-all.text @@ -0,0 +1,32 @@ +cdist-code-run-all(1) +===================== +Nico Schottelius + + +NAME +---- +cdist-code-run-all - Execute all generated code on the target + + +SYNOPSIS +-------- +cdist-code-run-all HOSTNAME + + +DESCRIPTION +----------- +cdist-code-run-all is just a wrapper for cdist-remote-code-run-all. + + +SEE ALSO +-------- +- cdist(7) +- cdist-deploy-to(1) +- cdist-remote-code-run-all(1) +- cdist-run-remote(1) + + +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). From 2a3a783cac7e02bae25c08e65c50503d1789508a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 00:41:18 +0100 Subject: [PATCH 0759/6109] document cdist-run-remote Signed-off-by: Nico Schottelius --- Makefile | 1 + doc/man/cdist-run-remote.text | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 doc/man/cdist-run-remote.text diff --git a/Makefile b/Makefile index f3b1ef78..34c5f719 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,7 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-object-gencode.text \ $(MANDIR)/cdist-object-gencode-all.text \ $(MANDIR)/cdist-quickstart.text \ + $(MANDIR)/cdist-run-remote.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-type.text \ $(MANDIR)/cdist-type-template.text \ diff --git a/doc/man/cdist-run-remote.text b/doc/man/cdist-run-remote.text new file mode 100644 index 00000000..6f06360f --- /dev/null +++ b/doc/man/cdist-run-remote.text @@ -0,0 +1,33 @@ +cdist-run-remote(1) +=================== +Nico Schottelius + + +NAME +---- +cdist-run-remote - Execute something on the target + + +SYNOPSIS +-------- +cdist-run-remote HOSTNAME EXECUTABLE [ARGUMENTS FOR EXECUTABLE] + + +DESCRIPTION +----------- +cdist-run-remote runs the given executable on the remote host. +It ensures PATH is setup correctly on the target side. + + +SEE ALSO +-------- +- cdist(7) +- cdist-code-run-all(1) +- cdist-deploy-to(1) +- cdist-remote-code-run-all(1) + + +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). From 0195b14f097fc1e27fe0ee1a5ce23d872bea9b1b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 00:48:17 +0100 Subject: [PATCH 0760/6109] document cdist-manifest-run Signed-off-by: Nico Schottelius --- Makefile | 1 + doc/dev/todo/niconext | 6 ++++++ doc/man/cdist-manifest-run.text | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 doc/man/cdist-manifest-run.text diff --git a/Makefile b/Makefile index 34c5f719..6c28a88b 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,7 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-deploy-to.text \ $(MANDIR)/cdist-explorer.text \ $(MANDIR)/cdist-manifest.text \ + $(MANDIR)/cdist-manifest-run.text \ $(MANDIR)/cdist-manifest-run-init.text \ $(MANDIR)/cdist-manifest-run-all.text \ $(MANDIR)/cdist-object-explorer-all.text \ diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 0960b372..48a3e125 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -9,3 +9,9 @@ done: * Document cdist-explorer-run-global * Document cdist-manifest-run-init * Document cdist-manifest-run-all +cdist-run-remote +cdist-code-run-all +cdist-object-gencode + +cdist-object-gencode-all +cdist-manifest-run diff --git a/doc/man/cdist-manifest-run.text b/doc/man/cdist-manifest-run.text new file mode 100644 index 00000000..d483b29b --- /dev/null +++ b/doc/man/cdist-manifest-run.text @@ -0,0 +1,33 @@ +cdist-manifest-run(1) +===================== +Nico Schottelius + + +NAME +---- +cdist-manifest-run - Run a given manifest + + +SYNOPSIS +-------- +cdist-manifest-run HOSTNAME MANIFEST OUTPUT_DIR + + +DESCRIPTION +----------- +cdist-manifest-run executes the given MANIFEST and saves the output into +OUTPUT_DIR. + + +SEE ALSO +-------- +- cdist(7) +- cdist-deploy-to(1) +- cdist-manifest-run-all(1) +- cdist-manifest-run-init(1) + + +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). From 94fce76b02315982dd4693b4d80072f223e21d56 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 00:49:34 +0100 Subject: [PATCH 0761/6109] todo -- Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.1 | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/doc/dev/todo/post-1.1 b/doc/dev/todo/post-1.1 index 2575d7bb..d75d050d 100644 --- a/doc/dev/todo/post-1.1 +++ b/doc/dev/todo/post-1.1 @@ -1,9 +1,9 @@ Core: - - write test case: test.sh + - write test case: test.sh - probably remove grep -q (solaris does not have it) Dependencies: - - Add meta parameters like --requires --excludes --depends? + - via env - Build dependency tree - Exit on any error - Check return codes @@ -28,17 +28,9 @@ Documentation: - Different environments (production, integration, development) - via version control - Check all references in manpages, ensure all manpages exist, generic ones: - + cdist - + cdist-deploy-to - + cdist-manifest - ensure every file in bin/ has a correspondent manpage - - cdist-code-run-all - - cdist-manifest-run - - cdist-object-codegen - - cdist-object-codegen-all - cdist-remote-code-run-all - cdist-remote-explorer-run - - cdist-run-remote - cdist-type-build-emulation - cdist-type-emulator - Ensure html output of manpages are published on the web From 313e92779c7fafcc9661406aa697b0440b7ad354 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 00:58:33 +0100 Subject: [PATCH 0762/6109] cleanup + replace __cdist_object_base_dir Signed-off-by: Nico Schottelius --- bin/cdist-remote-code-run-all | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/bin/cdist-remote-code-run-all b/bin/cdist-remote-code-run-all index 6f21a99d..7135037f 100755 --- a/bin/cdist-remote-code-run-all +++ b/bin/cdist-remote-code-run-all @@ -18,21 +18,17 @@ # along with cdist. If not, see . # # -# This binary is executed on the remote side to execute explorers +# This binary is executed on the remote side to execute code # -# It supports different variables names to be used, so __explorers -# and __type_explorers can be submitted :-) -# . cdist-config -if [ $# -ne 1 ]; then - __cdist_usage "" -fi +[ $# -eq 1 ] || __cdist_usage "" set -ue -__cdist_object_base_dir="$1"; shift +# Warning: Variable is special, as interpreted by __cdist_object_dir() +__cdist_out_object_dir="$1"; shift -__cdist_object_list "$__cdist_object_base_dir" > "$__cdist_tmp_file" +__cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file" # FIXME post 1.0: add dependencies while read object; do From 20715e4afaf2409403dd8bf793219d8329b7596e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 01:14:49 +0100 Subject: [PATCH 0763/6109] add template for cdist-remote-code-run Signed-off-by: Nico Schottelius --- bin/cdist-remote-code-run | 82 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100755 bin/cdist-remote-code-run diff --git a/bin/cdist-remote-code-run b/bin/cdist-remote-code-run new file mode 100755 index 00000000..0489760d --- /dev/null +++ b/bin/cdist-remote-code-run @@ -0,0 +1,82 @@ +#!/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 . +# +# +# This binary is executed on the remote side to execute code +# + +. cdist-config +[ $# -eq 1 ] || __cdist_usage "" +set -ue + +# Warning: Variable is special, as interpreted by __cdist_object_dir() +__cdist_out_object_dir="$1"; shift + +__cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file" + +# FIXME post 1.0: add dependencies +while read object; do + code="$(__cdist_object_code "$object")" + echo "Running code for $object ..." + if [ -e "$code" ]; then + if [ -f "$code" ]; then + if [ -x "$code" ]; then + "$code" + else + __cdist_exit_err "$code exists, but is not executable." + fi + else + __cdist_exit_err "$code exists, but is not a file." + fi + else + __cdist_exit_err "Missing code for ${object}." + fi +done < "$__cdist_tmp_file" + +__cdist_all_code_done=n + +while [ "$__cdist_all_code_done" = n ]; do + while read object; do + code="$(__cdist_object_code "$object")" + require="$(__cdist_object_require "$object")" + + # Object depends on others, execute them before us + if [ -f "$require" ]; then + while read requirement; do + cdist-remote-code-run "$code" + done < "$require" + fi + + + echo "Running code for $object ..." + if [ -e "$code" ]; then + if [ -f "$code" ]; then + if [ -x "$code" ]; then + "$code" + else + __cdist_exit_err "$code exists, but is not executable." + fi + else + __cdist_exit_err "$code exists, but is not a file." + fi + else + __cdist_exit_err "Missing code for ${object}." + fi + done < "$__cdist_tmp_file" +done From 209e34512d0dc35bbf3c829301f547fd0cb04cc9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 01:31:15 +0100 Subject: [PATCH 0764/6109] in theory finish new cdist-remote-code-run Signed-off-by: Nico Schottelius --- bin/cdist-remote-code-run | 82 ++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 49 deletions(-) diff --git a/bin/cdist-remote-code-run b/bin/cdist-remote-code-run index 0489760d..a9ecd886 100755 --- a/bin/cdist-remote-code-run +++ b/bin/cdist-remote-code-run @@ -22,61 +22,45 @@ # . cdist-config -[ $# -eq 1 ] || __cdist_usage "" +[ $# -eq 2 ] || __cdist_usage " " set -ue -# Warning: Variable is special, as interpreted by __cdist_object_dir() +# This variable MUST be exactly like this - see __cdist_object_dir __cdist_out_object_dir="$1"; shift -__cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file" +object="$1"; shift -# FIXME post 1.0: add dependencies -while read object; do - code="$(__cdist_object_code "$object")" - echo "Running code for $object ..." - if [ -e "$code" ]; then - if [ -f "$code" ]; then - if [ -x "$code" ]; then - "$code" - else - __cdist_exit_err "$code exists, but is not executable." - fi +finished="$(__cdist_object_code_finished "$__cdist_object")" +code="$(__cdist_object_code "$object")" +require="$(__cdist_object_require "$object")" + + +# Do nothing if our work has been done +if [ -f "$finished" ]; then + exit 0 +fi + +echo "Checking code for $object ..." + +if [ -f "$require" ]; then + while read requirement; do + echo "Running dependency $requirement for $object ..." + cdist-remote-code-run "$__cdist_out_object_dir" "$object" + done < "$require" +fi + +if [ -e "$code" ]; then + if [ -f "$code" ]; then + if [ -x "$code" ]; then + echo "Executing code for $object ..." + "$code" + touch "$__cdist_finished" else - __cdist_exit_err "$code exists, but is not a file." + __cdist_exit_err "$code exists, but is not executable." fi else - __cdist_exit_err "Missing code for ${object}." + __cdist_exit_err "$code exists, but is not a file." fi -done < "$__cdist_tmp_file" - -__cdist_all_code_done=n - -while [ "$__cdist_all_code_done" = n ]; do - while read object; do - code="$(__cdist_object_code "$object")" - require="$(__cdist_object_require "$object")" - - # Object depends on others, execute them before us - if [ -f "$require" ]; then - while read requirement; do - cdist-remote-code-run "$code" - done < "$require" - fi - - - echo "Running code for $object ..." - if [ -e "$code" ]; then - if [ -f "$code" ]; then - if [ -x "$code" ]; then - "$code" - else - __cdist_exit_err "$code exists, but is not executable." - fi - else - __cdist_exit_err "$code exists, but is not a file." - fi - else - __cdist_exit_err "Missing code for ${object}." - fi - done < "$__cdist_tmp_file" -done +else + __cdist_exit_err "Missing code for ${object}." +fi From 42af407d3ef7c814d8019c7cd518ac3e1e234271 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 01:31:30 +0100 Subject: [PATCH 0765/6109] refactor cdist-remote-code-run-all Signed-off-by: Nico Schottelius --- bin/cdist-config | 6 ++++++ bin/cdist-remote-code-run-all | 21 +++++++-------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 38f997fa..62337024 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -42,6 +42,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_bin:=bin} : ${__cdist_name_code:=code} +: ${__cdist_name_code_finished:=.codedone} : ${__cdist_name_conf_dir:=conf} : ${__cdist_name_explorer:=explorer} : ${__cdist_name_gencode:=gencode} @@ -239,6 +240,11 @@ __cdist_object_code() echo "$(__cdist_object_dir "$1")/${__cdist_name_code}" } +__cdist_object_code_finished() +{ + echo "$(__cdist_object_dir "$1")/${__cdist_name_code_finished}" +} + __cdist_object_parameter_dir() { echo "$(__cdist_object_dir "$1")/${__cdist_name_parameter}" diff --git a/bin/cdist-remote-code-run-all b/bin/cdist-remote-code-run-all index 7135037f..6c60337a 100755 --- a/bin/cdist-remote-code-run-all +++ b/bin/cdist-remote-code-run-all @@ -30,21 +30,14 @@ __cdist_out_object_dir="$1"; shift __cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file" -# FIXME post 1.0: add dependencies while read object; do code="$(__cdist_object_code "$object")" - echo "Running code for $object ..." - if [ -e "$code" ]; then - if [ -f "$code" ]; then - if [ -x "$code" ]; then - "$code" - else - __cdist_exit_err "$code exists, but is not executable." - fi - else - __cdist_exit_err "$code exists, but is not a file." - fi - else - __cdist_exit_err "Missing code for ${object}." + require="$(__cdist_object_require "$object")" + + # Object code depends on others, execute them before us + if [ -f "$require" ]; then + while read requirement; do + cdist-remote-code-run "$code" + done < "$require" fi done < "$__cdist_tmp_file" From 73364999957b5711ba1f5a3ee0e421524b4550d6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 01:34:34 +0100 Subject: [PATCH 0766/6109] shrink cdist-remote-code-run-all Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 2 -- bin/cdist-remote-code-run | 2 +- bin/cdist-remote-code-run-all | 10 +--------- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index d122ac08..d464c523 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -52,11 +52,9 @@ cdist-manifest-run-all "$__cdist_target_host" cdist-object-explorer-all "$__cdist_target_host" cdist-object-gencode-all "$__cdist_target_host" -# Transfer all objects including code cdist-dir push "$__cdist_target_host" "$__cdist_out_object_dir" \ "${__cdist_remote_out_object_base_dir}" -# And finally - execute the code cdist-code-run-all "$__cdist_target_host" echo "cdist $__cdist_version: Successfully finished run on $__cdist_target_host" diff --git a/bin/cdist-remote-code-run b/bin/cdist-remote-code-run index a9ecd886..a4958897 100755 --- a/bin/cdist-remote-code-run +++ b/bin/cdist-remote-code-run @@ -30,7 +30,7 @@ __cdist_out_object_dir="$1"; shift object="$1"; shift -finished="$(__cdist_object_code_finished "$__cdist_object")" +finished="$(__cdist_object_code_finished "$object")" code="$(__cdist_object_code "$object")" require="$(__cdist_object_require "$object")" diff --git a/bin/cdist-remote-code-run-all b/bin/cdist-remote-code-run-all index 6c60337a..1f051258 100755 --- a/bin/cdist-remote-code-run-all +++ b/bin/cdist-remote-code-run-all @@ -31,13 +31,5 @@ __cdist_out_object_dir="$1"; shift __cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file" while read object; do - code="$(__cdist_object_code "$object")" - require="$(__cdist_object_require "$object")" - - # Object code depends on others, execute them before us - if [ -f "$require" ]; then - while read requirement; do - cdist-remote-code-run "$code" - done < "$require" - fi + cdist-remote-code-run "$__cdist_out_object_dir" "$object" done < "$__cdist_tmp_file" From 84b4bf628e5b2afe4ab7575e22a4d2843e0c4fab Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 01:35:52 +0100 Subject: [PATCH 0767/6109] run dependency, not object again Signed-off-by: Nico Schottelius --- bin/cdist-remote-code-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-remote-code-run b/bin/cdist-remote-code-run index a4958897..2db9d0e7 100755 --- a/bin/cdist-remote-code-run +++ b/bin/cdist-remote-code-run @@ -45,7 +45,7 @@ echo "Checking code for $object ..." if [ -f "$require" ]; then while read requirement; do echo "Running dependency $requirement for $object ..." - cdist-remote-code-run "$__cdist_out_object_dir" "$object" + cdist-remote-code-run "$__cdist_out_object_dir" "$requirement" done < "$require" fi From 4cc237fa03e21302ef5eecbee7d6569196944eca Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 01:45:54 +0100 Subject: [PATCH 0768/6109] check for missing objects Signed-off-by: Nico Schottelius --- bin/cdist-config | 3 ++- bin/cdist-remote-code-run | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/cdist-config b/bin/cdist-config index 62337024..56c49772 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -227,7 +227,8 @@ __cdist_object_id_from_object() __cdist_object_dir() { - echo "${__cdist_out_object_dir}/$1" + __cdist_object_dir="${__cdist_out_object_dir}/$1" + echo "$__cdist_object_dir" } __cdist_remote_object_dir() diff --git a/bin/cdist-remote-code-run b/bin/cdist-remote-code-run index 2db9d0e7..af362470 100755 --- a/bin/cdist-remote-code-run +++ b/bin/cdist-remote-code-run @@ -30,6 +30,11 @@ __cdist_out_object_dir="$1"; shift object="$1"; shift +if [ ! -d "$(__cdist_object_dir "$object")" ]; then + __cdist_exit_err "Object $object missing." +fi + + finished="$(__cdist_object_code_finished "$object")" code="$(__cdist_object_code "$object")" require="$(__cdist_object_require "$object")" From 50f9d65d0d7f4c66174720572f2f5a8f84bdbbe6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 01:46:40 +0100 Subject: [PATCH 0769/6109] check for missing objects Signed-off-by: Nico Schottelius --- bin/cdist-remote-code-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-remote-code-run b/bin/cdist-remote-code-run index af362470..02487a89 100755 --- a/bin/cdist-remote-code-run +++ b/bin/cdist-remote-code-run @@ -45,7 +45,7 @@ if [ -f "$finished" ]; then exit 0 fi -echo "Checking code for $object ..." +echo "Checking code for $object ..." if [ -f "$require" ]; then while read requirement; do From 63416e4af83c2717a37e986f91620c1bc113c5f0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 01:48:30 +0100 Subject: [PATCH 0770/6109] indent messages Signed-off-by: Nico Schottelius --- bin/cdist-remote-code-run | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cdist-remote-code-run b/bin/cdist-remote-code-run index 02487a89..7fa6a4f6 100755 --- a/bin/cdist-remote-code-run +++ b/bin/cdist-remote-code-run @@ -31,7 +31,7 @@ __cdist_out_object_dir="$1"; shift object="$1"; shift if [ ! -d "$(__cdist_object_dir "$object")" ]; then - __cdist_exit_err "Object $object missing." + __cdist_exit_err "Object $object is missing." fi @@ -45,11 +45,11 @@ if [ -f "$finished" ]; then exit 0 fi -echo "Checking code for $object ..." +echo "Checking code for $object ..." if [ -f "$require" ]; then while read requirement; do - echo "Running dependency $requirement for $object ..." + echo "Requiring object $requirement for $object ..." cdist-remote-code-run "$__cdist_out_object_dir" "$requirement" done < "$require" fi From 96cbb37a29835741d48463b82b8987e462758243 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 01:51:44 +0100 Subject: [PATCH 0771/6109] fix example code in conf/manifest/init Signed-off-by: Nico Schottelius --- conf/manifest/init | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/manifest/init b/conf/manifest/init index e54f83aa..0b0dc9a5 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -13,8 +13,8 @@ case "$__target_host" in # Everybody has this localhost) __link /tmp/cdist-testfile --source /etc/cdist-configured --type symbolic - require="foo" __directory /tmp/cdist-test-dir --mode 4777 - __file /tmp/cdist-test-file --mode 0750 --owner nobody --group root + require="__directory/tmp/cdist-test-dir" __file /tmp/cdist-test-dir/test-file --mode 0750 --owner nobody --group root + __directory /tmp/cdist-test-dir --mode 4777 ;; # From c287d33ee3b0b7a57ec72ae1ee6587febb4c0d9b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 01:52:00 +0100 Subject: [PATCH 0772/6109] use correct finish variable Signed-off-by: Nico Schottelius --- bin/cdist-remote-code-run | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cdist-remote-code-run b/bin/cdist-remote-code-run index 7fa6a4f6..009c0743 100755 --- a/bin/cdist-remote-code-run +++ b/bin/cdist-remote-code-run @@ -49,7 +49,7 @@ echo "Checking code for $object ..." if [ -f "$require" ]; then while read requirement; do - echo "Requiring object $requirement for $object ..." + echo "Requiring dependency $requirement for $object ..." cdist-remote-code-run "$__cdist_out_object_dir" "$requirement" done < "$require" fi @@ -57,9 +57,9 @@ fi if [ -e "$code" ]; then if [ -f "$code" ]; then if [ -x "$code" ]; then - echo "Executing code for $object ..." + echo "Executing code for $object ..." "$code" - touch "$__cdist_finished" + touch "$finished" else __cdist_exit_err "$code exists, but is not executable." fi From 756226f15373ecdf351e8af41746e98ed8efd095 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 01:53:54 +0100 Subject: [PATCH 0773/6109] enhance example even further Signed-off-by: Nico Schottelius --- conf/manifest/init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/manifest/init b/conf/manifest/init index 0b0dc9a5..f6328971 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -12,7 +12,7 @@ __file /etc/cdist-configured case "$__target_host" in # Everybody has this localhost) - __link /tmp/cdist-testfile --source /etc/cdist-configured --type symbolic + require="__file/etc/cdist-configured" __link /tmp/cdist-testfile --source /etc/cdist-configured --type symbolic require="__directory/tmp/cdist-test-dir" __file /tmp/cdist-test-dir/test-file --mode 0750 --owner nobody --group root __directory /tmp/cdist-test-dir --mode 4777 ;; From d4d2f47b602784bccf74fde686c6fb5fc4a1fd96 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 02:01:37 +0100 Subject: [PATCH 0774/6109] more examples, document dependencies Signed-off-by: Nico Schottelius --- conf/manifest/init | 10 ++++++++-- doc/man/cdist-manifest.text | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/conf/manifest/init b/conf/manifest/init index f6328971..1863a784 100755 --- a/conf/manifest/init +++ b/conf/manifest/init @@ -12,9 +12,15 @@ __file /etc/cdist-configured case "$__target_host" in # Everybody has this localhost) - require="__file/etc/cdist-configured" __link /tmp/cdist-testfile --source /etc/cdist-configured --type symbolic - require="__directory/tmp/cdist-test-dir" __file /tmp/cdist-test-dir/test-file --mode 0750 --owner nobody --group root + require="__file/etc/cdist-configured" __link /tmp/cdist-testfile \ + --source /etc/cdist-configured --type symbolic + require="__directory/tmp/cdist-test-dir" __file /tmp/cdist-test-dir/test-file \ + --mode 0750 --owner nobody --group root __directory /tmp/cdist-test-dir --mode 4777 + + require="__file/etc/cdist-configured __link/tmp/cdist-testfile" \ + __file /tmp/cdist-another-testfile + ;; # diff --git a/doc/man/cdist-manifest.text b/doc/man/cdist-manifest.text index efa5a8eb..7da90f71 100644 --- a/doc/man/cdist-manifest.text +++ b/doc/man/cdist-manifest.text @@ -40,6 +40,28 @@ The manifest of the type "nologin" may look like this: __file /etc/nologin --type file --source "$__type/files/default.nologin" -------------------------------------------------------------------------------- +DEPENDENCIES +------------ +If you want to describe that something requires something else, just +setup the variable "require" to contain the requirements. Multiple +requirements can be added white space seperated. + + +-------------------------------------------------------------------------------- +# No dependency +__file /etc/cdist-configured + +# Require above object +require="__file/etc/cdist-configured" __link /tmp/cdist-testfile \ + --source /etc/cdist-configured --type symbolic + +# Require two objects +require="__file/etc/cdist-configured __link/tmp/cdist-testfile" \ + __file /tmp/cdist-another-testfile + + +-------------------------------------------------------------------------------- + SEE ALSO -------- From 4c54a6c15930270fe6a75844aa829ba778ee4aec Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 02:05:03 +0100 Subject: [PATCH 0775/6109] way less todo Signed-off-by: Nico Schottelius --- doc/changelog | 14 ++++++++++++-- doc/dev/todo/niconext | 18 +----------------- doc/dev/todo/post-1.1 | 6 ------ 3 files changed, 13 insertions(+), 25 deletions(-) diff --git a/doc/changelog b/doc/changelog index d69731ca..1d5ca3f8 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,5 +1,15 @@ -1.1.1: - * New type __removeline +1.2.0: + * Added dependencies + * New type __removeline (Daniel Roth) + * Document cdist-run-remote + * Document cdist-code-run-all + * Document cdist-object-gencode + * Document cdist-explorer-run-global + * Document cdist-manifest-run-init + * Document cdist-manifest-run-all + * Document cdist-object-gencode-all + * Document cdist-manifest-run + 1.1.0: 2011-03-16 * Replace type __file with __file, __directory, __link diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 48a3e125..6b456f35 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,17 +1 @@ -Dependencies: - Record in bin/cdist-type-emulator - Fix __cdist_object_base_dir issue (vs. $__cdist_out_object_dir in deploy-to) - go through cdist-deploy-to and do a cleanup round - - --------------------------------------------------------------------------------- -done: -* Document cdist-explorer-run-global -* Document cdist-manifest-run-init -* Document cdist-manifest-run-all -cdist-run-remote -cdist-code-run-all -cdist-object-gencode - -cdist-object-gencode-all -cdist-manifest-run +Cleanup and release 1.2.0 diff --git a/doc/dev/todo/post-1.1 b/doc/dev/todo/post-1.1 index d75d050d..00e69937 100644 --- a/doc/dev/todo/post-1.1 +++ b/doc/dev/todo/post-1.1 @@ -2,12 +2,6 @@ Core: - write test case: test.sh - probably remove grep -q (solaris does not have it) -Dependencies: - - via env - - Build dependency tree - - Exit on any error - - Check return codes - Types to be written/extended: - __ssh-keys (host/user) - __service From d2b7fd052071b509eccac68548eddaf6484860f7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 02:11:35 +0100 Subject: [PATCH 0776/6109] prepare more stuff for 1.2 Signed-off-by: Nico Schottelius --- README | 3 ++- doc/dev/todo/{post-1.1 => post-1.2} | 0 2 files changed, 2 insertions(+), 1 deletion(-) rename doc/dev/todo/{post-1.1 => post-1.2} (100%) diff --git a/README b/README index e229614d..7be8f013 100644 --- a/README +++ b/README @@ -115,11 +115,12 @@ how to use cdist. There are at least the following branches available: * master: the development branch - * 1.1: Current stable + * 1.2: Current stable: Dependencies supported Old versions: * 1.0: First official release + * 1.1: __file to __file, __directory, __link migration Other branches may be available for features or bugfixes, but they may vanish at any point. To select a specific branch use diff --git a/doc/dev/todo/post-1.1 b/doc/dev/todo/post-1.2 similarity index 100% rename from doc/dev/todo/post-1.1 rename to doc/dev/todo/post-1.2 From cbc8a254f462c2e66c26bd1aa08137cd5f767077 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 02:11:47 +0100 Subject: [PATCH 0777/6109] += Signed-off-by: Nico Schottelius --- conf/type/__group/man.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__group/man.text b/conf/type/__group/man.text index 26b52111..c57ae337 100644 --- a/conf/type/__group/man.text +++ b/conf/type/__group/man.text @@ -1,5 +1,5 @@ cdist-type__group(7) -=================== +==================== Steven Armstrong From 43afb07598c204240e0059be27bebc6f6c91d050 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 02:17:49 +0100 Subject: [PATCH 0778/6109] move init to init.sample to avoid conflicts with real world Signed-off-by: Nico Schottelius --- conf/manifest/{init => init.sample} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename conf/manifest/{init => init.sample} (100%) diff --git a/conf/manifest/init b/conf/manifest/init.sample similarity index 100% rename from conf/manifest/init rename to conf/manifest/init.sample From 6fa055fcc2fce2aa81a5b73e551175ded5bc22c1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 02:20:59 +0100 Subject: [PATCH 0779/6109] more todo for nico, less for 1.2.0 Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 8 ++++++++ doc/dev/todo/post-1.2 | 11 ++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 6b456f35..640288a6 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1 +1,9 @@ Cleanup and release 1.2.0 + - document init.sample + - update cdist-quickstart + - ensure every file in bin/ has a correspondent manpage + - cdist-remote-code-run-all + - cdist-remote-explorer-run + - cdist-type-build-emulation + - cdist-type-emulator + diff --git a/doc/dev/todo/post-1.2 b/doc/dev/todo/post-1.2 index 00e69937..90eb1664 100644 --- a/doc/dev/todo/post-1.2 +++ b/doc/dev/todo/post-1.2 @@ -5,13 +5,11 @@ Core: Types to be written/extended: - __ssh-keys (host/user) - __service - - __user - __file_edit - regexp replace (can probably cover all?) - - cron + - __cron - __issue: add --source - Documentation: - Describe Multi master setups - use ssh with master socket? @@ -21,10 +19,5 @@ Documentation: - cdist-trigger after first run from /var/lib/cdist/out/bin? - Different environments (production, integration, development) - via version control - - Check all references in manpages, ensure all manpages exist, generic ones: - - ensure every file in bin/ has a correspondent manpage - - cdist-remote-code-run-all - - cdist-remote-explorer-run - - cdist-type-build-emulation - - cdist-type-emulator + - Check all references in manpages, ensure all manpages exist - Ensure html output of manpages are published on the web From 34389e68fc867da3f0ca66c720a0c67877b5b1d0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 02:27:55 +0100 Subject: [PATCH 0780/6109] add cdist logo / slogan Signed-off-by: Nico Schottelius --- doc/gfx/cdist-automated.png | Bin 0 -> 1738 bytes doc/gfx/cdist-logo.png | Bin 0 -> 1542 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/gfx/cdist-automated.png create mode 100644 doc/gfx/cdist-logo.png diff --git a/doc/gfx/cdist-automated.png b/doc/gfx/cdist-automated.png new file mode 100644 index 0000000000000000000000000000000000000000..c964004d8964285f741f8cc12f3903d16ae4629e GIT binary patch literal 1738 zcmV;*1~vJKP)Px#22e~?MF0Q*|NsA`*`M720004EOGiWihy@);00009a7bBm000XU000XU0RWnu z7ytkO2XskIMF-mh5&;-CMgGKp000I(Nkl7<&RO3Sq!!nt! z*UDmu38kc9%w|i7n@gR1g0vKRtYx2)lUN!m%Q+a6qX~=f!T1zPk0EU16uGCIdvkkn zk0GC+@4XpmHPY^84}mOg277lr`uWZKH*aRd*vIxCYc>-TVRCgt^_*}VXMGcDdG2_D z-K_J;Sj_6IW~f4ee>x;lT-hEyM3mq@ZJP zy{seS27Yj&vSLCi_ zNm64K{RZ3;>E~g0b{r?jUJBm%uxdx1SFF$Cx%1*^u%~jk&G95lqvLCuV{fU_HAjye3Teq7tkxtd?igCrB<#_fD?xgu}Cd2wjS8^z7BrS$T*1Jc2H<05yMkR*_Iu-6{QORC%+ z&1jCFuW%=?@e(|qUyoErl6T}ih{uBAuOx1T`ax^JZLblR``=zX z2>w9F%$#xRG->uGyG_$keqhJ;4^`$^Co1qQ^$C>;#LS#!^Va&X(nALdL!$;|6CO#QjsfH~ zSSGu$LV=5kvug0b1`hmCYQrxOs4Y`@McXG2NZzxx?mzj3h!~J)T>{y&I55&~vL0#LyFrTeg zbX-V9H4l2(y%BeRTO9*%a8w>BZh__8h&*7;&8D>eQi_S4(@}AQ-T$g&Qp=0j7!HEg zcsI8cA0{l*&zRS=SL}SBFtC@-2T>&tMCQNx=4YH;RriSOg~<4~D<3=$IBMajLPjI6 zl=}P)9@FOXdXOOJ!bYI31~P7uJHZ`rT%QGpM>&TFhqzbaz)S9v7%mRvKOO-G^WHDd z8_|J;He1}M!QHO9=auB`s%xabufBlu4DM>ExSqO3`Y%RtT3%mWb4fou6GUBsheYXW zt{KvqQC)+yy)GUDQ-K@7BG-2GaevFMUyVXN=&CD-J7w<-sNGHZ)-lvhI3%*Wc>h`n z(s>3hc~n=xb@le=o=-Pv3;Yxj2N8e5+RVD8tC}2exNtDu0}hLU<~j@dUdq)A0~POr z!&cbfHbzBQy)aPmX3Wnnp2F}Ya-rg0(7@*-IrYLo$D1`q%hO!MiaTS8Lp#((QL8Vr zju;&b@u7T= gwPdFMKTp$t0cm;W#H0($-~a#s07*qoM6N<$f*So(djJ3c literal 0 HcmV?d00001 diff --git a/doc/gfx/cdist-logo.png b/doc/gfx/cdist-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..13c2792728d20511f18ae60df8524d68b8a35cbf GIT binary patch literal 1542 zcmV+h2Ko7kP)Px#22e~?MF0Q*|NsA`*`M72000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2ipS@ z0U8oZ%R(#w00o9gL_t(o!|j;OOC(1Wz^mIa(<@6fGKU5*AnRX5Vhb0Zp zl-0j^^}hPms}|z_>pi<{At%Dr`U@U4gF4RoGSKpzdV%|9@IftRZLXV9@rE>N@N!C~ zGe!OUp&qdMyVA_e*UFQ*nQ6FwG6UDY#;;ZQdr1m53*5jARMf$*1#sLK#5utjPU&db zU785>|Q;`jcYt&fW8y13Dv?GjzEFS5zgd^L_8Dcpp*UC7%Q|3g| zeW!0Xc2ln5Rr4S=Vw`9rom{QR%eaLoD99VfwGKs%e!wYXuc>Ro!YNg8JEj$j^K%vMI*!X+fZJ61zup&| z_&2@o@#j2c4Ow58Hv--l{9E;X!t)PThohc&SqQ&#?tli zeQ~q`w_7_Q4-|PvJ%@O73;v3uexPskGwxuUxYYml(wYAUI%ek9r9qEY?};s1j`9Ns zws+2%V_kFL`}_%&3B=6YnssgO7v^UEE^rn<`DuRG-WhWykyiNA+NRs7e#(n=#)dSo zC4b`2WX@hcQKUGP1Q;~i_~10#_Lg>}wnLWcfIX@<+++6!>FOsE(lNYg;o!>kuYLrZ zgn0Pmn(d&{8hK&l4S+j!SA~?-kZ(d{hS{KtRyo7mHqy$s_JuIA?hdVknB7 zLmcRLeo>TXD!t|!#KppS^(U1G?uTqIrW6TN&L%q)1U|fh!8$5_6|fyo5;wJD>?Nn8 z7@(SuyO_)`(2ft;4l8l7-_6;9W~(mlmj~#Vqtq{l($Q`rzu?yO%mX=fdC=B&2+U{e4Ydo2tmeVMoEvfXx48|#$#HqW zTvw#rm^=`@-JY`kV#Va)&A7P1?!T;r((*!4!$HtGcXKPzc`S^6g>{Se%ENDB0rpaV z5LWU)8vnI-KXJt}pCil*k@~kQ_nrqXYSH9EMl)|%efJ-1(-zZu5F_WnM!-h{74^xT z;0|clXTjlN%3T{{fFAO-|Ift!@>@-G2m|qxhyoK=0!BZA|iCn43h9NNJLMXkOv16dzyd&)Y5*|k+R=&8w!jnSNv6LK39 saY9X~U}r+kn~+ Date: Fri, 18 Mar 2011 02:28:47 +0100 Subject: [PATCH 0781/6109] +text versions of the logo Signed-off-by: Nico Schottelius --- doc/gfx/cdist-automated.text | 15 +++++++++++++++ doc/gfx/cdist-logo.text | 12 ++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 doc/gfx/cdist-automated.text create mode 100644 doc/gfx/cdist-logo.text diff --git a/doc/gfx/cdist-automated.text b/doc/gfx/cdist-automated.text new file mode 100644 index 00000000..58353099 --- /dev/null +++ b/doc/gfx/cdist-automated.text @@ -0,0 +1,15 @@ + .. . .x+=:. s + dF @88> z` ^% :8 + '88bu. %8P . z` ^% :8 + '88bu. %8P . Date: Fri, 18 Mar 2011 02:31:20 +0100 Subject: [PATCH 0782/6109] +extend title Signed-off-by: Nico Schottelius --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 7be8f013..8b4ae6b5 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -[[!meta title="cdist - configuration management"]] +[[!meta title="cdist - usable configuration management"]] .. . .x+=:. s From 581b29ca9755f7c3fd520a8e54bed96cd8d4d007 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 02:43:25 +0100 Subject: [PATCH 0783/6109] warn about missing manifest (i.e. abort) Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 240d446b..8561f1f7 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -47,6 +47,8 @@ cdist-type-build-emulation "${__cdist_out_type_bin_dir}" \ export PATH="${__cdist_out_type_bin_dir}:$PATH" # Force -x, so the user is aware the file is executed +[ -f "${__cdist_manifest}" ] \ + || __cdist_exit_err "Missing manifest ${__cdist_manifest}" [ -x "${__cdist_manifest}" ] \ || __cdist_exit_err "${__cdist_manifest} needs to be executable." mkdir -p "${__cdist_output_dir}" \ From 99054b7d825c68a26a1b2968082f2ab69b50161c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 02:48:11 +0100 Subject: [PATCH 0784/6109] update cdist-quickstart Signed-off-by: Nico Schottelius --- bin/cdist-quickstart | 63 ++++++++++++++++++++++++++++++++++++------- doc/dev/todo/niconext | 12 ++++----- 2 files changed, 59 insertions(+), 16 deletions(-) diff --git a/bin/cdist-quickstart b/bin/cdist-quickstart index 781c1b45..4d89180c 100755 --- a/bin/cdist-quickstart +++ b/bin/cdist-quickstart @@ -69,7 +69,7 @@ that the command cdist-deploy-to is the main cdist command. See also: - Source of cdist-deploy-to, cdist-stages(7) + Source of cdist-deploy-to(1), cdist-stages(7) eof __prompt "$continue" @@ -232,17 +232,60 @@ __prompt "$continue" cat << eof -Now you've got some basic knowledge about cdist, let's configure your localhost! +Now you've got some basic knowledge about cdist, let's configure your a host! -Ensure that you have a ssh server running locally and that you can login as root. - -The cdist distribution contains some sensible default initial manifest, which -will create 2 files, /etc/cdist-configured (for every host) and -/tmp/cdist-testfile (only for localhost). +Ensure that you have a ssh server running on the host and that you can login as root. eof -cmd="cdist-deploy-to localhost" +__prompt "Enter hostname or press enter for localhost: " + +if [ "$answer" ]; then + host="$answer" +else + host="localhost" +fi + +manifestinit="conf/manifest/init" +cat << eof + +I'll know setup $manifestinit, containing the following code: + +-------------------------------------------------------------------------------- +# Every machine becomes a marker, so sysadmins know that automatic +# configurations are happening +__file /etc/cdist-configured + +case "\$__target_host" in + $host) + __link /tmp/cdist-testfile --source /etc/cdist-configured --type symbolic + __addifnosuchline /tmp/cdist-welcome --line "Welcome to cdist" + ;; +esac +-------------------------------------------------------------------------------- + +WARNING: This will overwrite ${manifestinit}. + +eof + +cat > "$__cdist_abs_mydir/../$manifestinit" << eof + +# Every machine becomes a marker, so sysadmins know that automatic +# configurations are happening +__file /etc/cdist-configured + +case "\$__target_host" in + $host) + __link /tmp/cdist-testfile --source /etc/cdist-configured --type symbolic + __addifnosuchline /tmp/cdist-welcome --line "Welcome to cdist" + ;; +esac + +eof + +chmod u+x "$__cdist_abs_mydir/../$manifestinit" + +cmd="cdist-deploy-to $host" __prompt "Press enter to run \"$cmd\"" @@ -255,7 +298,9 @@ $cmd cat << eof -That's it, this is the end of the cdist-introduction. + +-------------------------------------------------------------------------------- +That's it, this is the end of the cdist-quickstart. I hope you've got some impression on how cdist works, here are again some pointers on where to continue to read: diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 640288a6..5a816f5b 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,9 +1,7 @@ Cleanup and release 1.2.0 - - document init.sample - - update cdist-quickstart - - ensure every file in bin/ has a correspondent manpage - - cdist-remote-code-run-all - - cdist-remote-explorer-run - - cdist-type-build-emulation - - cdist-type-emulator + - ensure every file in bin/ has a correspondent manpage + - cdist-remote-code-run-all + - cdist-remote-explorer-run + - cdist-type-build-emulation + - cdist-type-emulator From 3f19f924358a5e7cd65b1c6f887d162a2f31dee7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 10:17:35 +0100 Subject: [PATCH 0785/6109] remove obsolete cd call Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 8561f1f7..96ab4169 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -30,9 +30,6 @@ __cdist_target_host="$1"; shift __cdist_manifest="$1"; shift __cdist_output_dir="$1"; shift -# Always start from local base -__cdist_work_dir="$__cdist_local_base_dir" - # Export information for cdist-type-emulator export __cdist_conf_dir __cdist_output_dir __cdist_manifest __cdist_version @@ -46,14 +43,13 @@ cdist-type-build-emulation "${__cdist_out_type_bin_dir}" \ # prepend our path, so all cdist tools come before other tools export PATH="${__cdist_out_type_bin_dir}:$PATH" -# Force -x, so the user is aware the file is executed +# Sanity checks [ -f "${__cdist_manifest}" ] \ || __cdist_exit_err "Missing manifest ${__cdist_manifest}" [ -x "${__cdist_manifest}" ] \ || __cdist_exit_err "${__cdist_manifest} needs to be executable." mkdir -p "${__cdist_output_dir}" \ || __cdist_exit_err "Cannot create output dir ${__cdist_output_dir}" -cd "$__cdist_work_dir" \ - || __cdist_exit_err "Cannot change to work dir \"$__cdist_work_dir\"." +# FIXME remove $@? i think this has been deprecated! __cdist_exec_fail_on_error "${__cdist_manifest}" "$@" From fdea6edcd2d3b37fb56c41b26e0a36233748aaff Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 10:32:07 +0100 Subject: [PATCH 0786/6109] cleaupn cdist-manifest-run and in theory fix output problem Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 96ab4169..23c6792a 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -23,18 +23,32 @@ # . cdist-config -[ $# -eq 3 ] || __cdist_usage " " +[ $# -eq 3 ] || __cdist_usage " " set -u __cdist_target_host="$1"; shift __cdist_manifest="$1"; shift -__cdist_output_dir="$1"; shift -# Export information for cdist-type-emulator -export __cdist_conf_dir __cdist_output_dir __cdist_manifest __cdist_version +################################################################################ +# Export information for cdist-type-emulator or manifest +# + +# This is a special variable, as being used by __cdist_object_dir +# We need to adjust it, so cdist-type-emulator writes to the right location +export __cdist_out_object_dir="$1"; shift + +# Config dir should not get reset - FIXME: why did I do this? +export __cdist_conf_dir + +# Used to record the source in the object +export __cdist_manifest # Export information for manifests -export __global="$__cdist_out_dir" +export __global="$__cdist_out_object_dir" + +################################################################################ +# The actual run +# # Ensure binaries exist and are up-to-date cdist-type-build-emulation "${__cdist_out_type_bin_dir}" \ @@ -48,8 +62,7 @@ export PATH="${__cdist_out_type_bin_dir}:$PATH" || __cdist_exit_err "Missing manifest ${__cdist_manifest}" [ -x "${__cdist_manifest}" ] \ || __cdist_exit_err "${__cdist_manifest} needs to be executable." -mkdir -p "${__cdist_output_dir}" \ - || __cdist_exit_err "Cannot create output dir ${__cdist_output_dir}" +mkdir -p "${__cdist_out_object_dir}" \ + || __cdist_exit_err "Cannot create output dir ${__cdist_out_object_dir}" -# FIXME remove $@? i think this has been deprecated! -__cdist_exec_fail_on_error "${__cdist_manifest}" "$@" +__cdist_exec_fail_on_error "${__cdist_manifest}" From e39a810685b8ecdd8caea5e99eee79fd9e66cba2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 10:32:19 +0100 Subject: [PATCH 0787/6109] less todo for 1.2 for nico Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 2 -- doc/dev/todo/post-1.2 | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 5a816f5b..f6b8809a 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,7 +1,5 @@ Cleanup and release 1.2.0 - - ensure every file in bin/ has a correspondent manpage - cdist-remote-code-run-all - cdist-remote-explorer-run - cdist-type-build-emulation - cdist-type-emulator - diff --git a/doc/dev/todo/post-1.2 b/doc/dev/todo/post-1.2 index 90eb1664..c5b85d8b 100644 --- a/doc/dev/todo/post-1.2 +++ b/doc/dev/todo/post-1.2 @@ -21,3 +21,4 @@ Documentation: - via version control - Check all references in manpages, ensure all manpages exist - Ensure html output of manpages are published on the web + - ensure every file in bin/ has a correspondent manpage From 35a6eefc00882e9aa7e94098a0879bdbe6c5751d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 10:35:53 +0100 Subject: [PATCH 0788/6109] __global is not where it seems to be :-) Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 23c6792a..892f27cf 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -43,8 +43,8 @@ export __cdist_conf_dir # Used to record the source in the object export __cdist_manifest -# Export information for manifests -export __global="$__cdist_out_object_dir" +# Export information for manifests - __cdist_out_dir comes from cdist-config +export __global="$__cdist_out_dir" ################################################################################ # The actual run From 68adb9453a259dedd3abe61d3d1aa1cd5bef983d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 10:40:31 +0100 Subject: [PATCH 0789/6109] make the user aware of the copy process (waiting and nothing happens stinks) Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index d464c523..551575c3 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -43,7 +43,7 @@ echo "cdist $__cdist_version: Configuring $__cdist_target_host" __cdist_init_deploy "$__cdist_target_host" # Transfer cdist executables -echo "Transferring cdist binaries ..." +echo "Transferring cdist binaries to $__cdist_target_host ..." cdist-dir push "$__cdist_target_host" "${__cdist_abs_mydir}" "${__cdist_remote_bin_dir}" cdist-explorer-run-global "$__cdist_target_host" @@ -52,6 +52,7 @@ cdist-manifest-run-all "$__cdist_target_host" cdist-object-explorer-all "$__cdist_target_host" cdist-object-gencode-all "$__cdist_target_host" +echo "Transferring created objects to $__cdist_target_host ..." cdist-dir push "$__cdist_target_host" "$__cdist_out_object_dir" \ "${__cdist_remote_out_object_base_dir}" From 793d8b379d91dfa679b1e4f78246521f13f667bc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 10:43:13 +0100 Subject: [PATCH 0790/6109] remove config.guess: not really needed Signed-off-by: Nico Schottelius --- doc/dev/config.guess | 1354 ------------------------------------------ 1 file changed, 1354 deletions(-) delete mode 100644 doc/dev/config.guess diff --git a/doc/dev/config.guess b/doc/dev/config.guess deleted file mode 100644 index fd30ab03..00000000 --- a/doc/dev/config.guess +++ /dev/null @@ -1,1354 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002 Free Software Foundation, Inc. - -timestamp='2002-07-23' - -# This file 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 2 of the License, or -# (at your option) any later version. -# -# This program 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 this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; - --version | -v ) - echo "$version" ; exit 0 ;; - --help | --h* | -h ) - echo "$usage"; exit 0 ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# This shell variable is my proudest work .. or something. --bje - -set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ; -(old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old) - || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ; -dummy=$tmpdir/dummy ; -files="$dummy.c $dummy.o $dummy.rel $dummy" ; -trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - rm -f $files ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; -unset files' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mipseb-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - eval $set_cc_for_build - cat <$dummy.s - .data -\$Lformat: - .byte 37,100,45,37,120,10,0 # "%d-%x\n" - - .text - .globl main - .align 4 - .ent main -main: - .frame \$30,16,\$26,0 - ldgp \$29,0(\$27) - .prologue 1 - .long 0x47e03d80 # implver \$0 - lda \$2,-1 - .long 0x47e20c21 # amask \$2,\$1 - lda \$16,\$Lformat - mov \$0,\$17 - not \$1,\$18 - jsr \$26,printf - ldgp \$29,0(\$26) - mov 0,\$16 - jsr \$26,exit - .end main -EOF - $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null - if test "$?" = 0 ; then - case `$dummy` in - 0-0) - UNAME_MACHINE="alpha" - ;; - 1-0) - UNAME_MACHINE="alphaev5" - ;; - 1-1) - UNAME_MACHINE="alphaev56" - ;; - 1-101) - UNAME_MACHINE="alphapca56" - ;; - 2-303) - UNAME_MACHINE="alphaev6" - ;; - 2-307) - UNAME_MACHINE="alphaev67" - ;; - 2-1307) - UNAME_MACHINE="alphaev68" - ;; - 3-1307) - UNAME_MACHINE="alphaev7" - ;; - esac - fi - rm -f $dummy.s $dummy && rmdir $tmpdir - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit 0 ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit 0 ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit 0;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit 0 ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit 0;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit 0 ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit 0 ;; - DRS?6000:UNIX_SV:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit 0 ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit 0 ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD $dummy.c -o $dummy \ - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 - rm -f $dummy.c $dummy && rmdir $tmpdir - echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit 0 ;; - Night_Hawk:*:*:PowerMAX_OS) - echo powerpc-harris-powermax - exit 0 ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit 0 ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit 0 ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit 0 ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit 0 ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit 0 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit 0 ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit 0 ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit 0 ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit 0 ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit 0 ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 - rm -f $dummy.c $dummy && rmdir $tmpdir - echo rs6000-ibm-aix3.2.5 - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit 0 ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit 0 ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit 0 ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit 0 ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit 0 ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit 0 ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy` - if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi - rm -f $dummy.c $dummy && rmdir $tmpdir - fi ;; - esac - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 - rm -f $dummy.c $dummy && rmdir $tmpdir - echo unknown-hitachi-hiuxwe2 - exit 0 ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit 0 ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit 0 ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit 0 ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit 0 ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit 0 ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit 0 ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit 0 ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit 0 ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit 0 ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit 0 ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit 0 ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*T3D:*:*:*) - echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*) - # Determine whether the default compiler uses glibc. - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #if __GLIBC__ >= 2 - LIBC=gnu - #else - LIBC= - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - rm -f $dummy.c && rmdir $tmpdir - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} - exit 0 ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - x86:Interix*:3*) - echo i386-pc-interix3 - exit 0 ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i386-pc-interix - exit 0 ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit 0 ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - rm -f $dummy.c && rmdir $tmpdir - test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 - ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit 0 ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit 0 ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit 0 ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit 0 ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit 0 ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit 0 ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #ifdef __INTEL_COMPILER - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - rm -f $dummy.c && rmdir $tmpdir - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit 0 ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit 0 ;; - i*86:*:5:[78]*) - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit 0 ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit 0 ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit 0 ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit 0 ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit 0 ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit 0 ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit 0 ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit 0 ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit 0 ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit 0 ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit 0 ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit 0 ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit 0 ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit 0 ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit 0 ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; - *:Darwin:*:*) - echo `uname -p`-apple-darwin${UNAME_RELEASE} - exit 0 ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit 0 ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit 0 ;; - NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit 0 ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit 0 ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit 0 ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit 0 ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit 0 ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit 0 ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit 0 ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit 0 ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0 -rm -f $dummy.c $dummy && rmdir $tmpdir - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit 0 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - c34*) - echo c34-convex-bsd - exit 0 ;; - c38*) - echo c38-convex-bsd - exit 0 ;; - c4*) - echo c4-convex-bsd - exit 0 ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: From f48b67ecd63c3a24596d71c435529a378c932df1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 10:44:21 +0100 Subject: [PATCH 0791/6109] more changes for 1.2.0 Signed-off-by: Nico Schottelius --- doc/changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/changelog b/doc/changelog index 1d5ca3f8..0aedec10 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,6 +1,8 @@ 1.2.0: * Added dependencies * New type __removeline (Daniel Roth) + * New type __group (Steven Armstrong) + * New type __user (Steven Armstrong) * Document cdist-run-remote * Document cdist-code-run-all * Document cdist-object-gencode From e0304fad37c415b35bde122d0061d643c314a8fa Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 18 Mar 2011 21:08:18 +0100 Subject: [PATCH 0792/6109] hint on dependencies Signed-off-by: Nico Schottelius --- doc/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog b/doc/changelog index 0aedec10..32d5ac63 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,5 +1,5 @@ 1.2.0: - * Added dependencies + * Added dependencies (see cdist-type(7)) * New type __removeline (Daniel Roth) * New type __group (Steven Armstrong) * New type __user (Steven Armstrong) From cef58ae85f2cc5fba439e8d65942bab05a687fe7 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Fri, 18 Mar 2011 23:37:10 +0100 Subject: [PATCH 0793/6109] handle numeric group id as well as group name for consistency with usermod|groupmod Signed-off-by: Steven Armstrong --- conf/type/__user/explorer/group | 28 ++++++++++++++++++++++++++++ conf/type/__user/gencode | 22 +++++++++++++++++----- 2 files changed, 45 insertions(+), 5 deletions(-) create mode 100755 conf/type/__user/explorer/group diff --git a/conf/type/__user/explorer/group b/conf/type/__user/explorer/group new file mode 100755 index 00000000..9defba14 --- /dev/null +++ b/conf/type/__user/explorer/group @@ -0,0 +1,28 @@ +#!/bin/sh +# +# 2011 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 . +# +# +# Get an existing groups group entry. +# + +if [ -f "$__object/parameter/gid" ]; then + gid=$(cat "$__object/parameter/gid") + getent group "$gid" || true +fi + diff --git a/conf/type/__user/gencode b/conf/type/__user/gencode index 5990ac92..c53d8c40 100755 --- a/conf/type/__user/gencode +++ b/conf/type/__user/gencode @@ -35,27 +35,39 @@ fi get_current_value() { local key="$1" + local new_value="$2" + + local explorer="$__object/explorer/passwd" local index case "$key" in password) - cut -d':' -f 2 "$__object/explorer/shadow" - break + explorer="$__object/explorer/shadow" + index=2 ;; uid) index=3;; - gid) index=4;; + gid) + if [[ $new_value =~ ^[0-9]+$ ]]; then + # numeric gid + index=4 + else + # group name + explorer="$__object/explorer/group" + index=1 + fi + ;; comment) index=5;; home) index=6;; shell) index=7;; esac - cut -d':' -f $index "$__object/explorer/passwd" + cut -d':' -f $index "$explorer" } set -- "$@" cd "$__object/parameter" for property in $(ls .); do - current_value=$(get_current_value "$property") new_value="$(cat "$property")" + current_value=$(get_current_value "$property" "$new_value") if [ "$new_value" != "$current_value" ]; then # Shedule changed properties for update set -- "$@" "--$property" \"$new_value\" From 5985fafe86d334f158c0f6c093f53fd58a4c6546 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 02:17:17 +0100 Subject: [PATCH 0794/6109] move whole object Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index a111627f..4f468e2e 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -93,11 +93,8 @@ while [ "$__cdist_new_objects_created" = "y" ]; do # Source of the new object __cdist_new_object_dir="${__cdist_new_objects_dir}/$__cdist_new_object" - mkdir -p "$__cdist_object_dir" - - # Move parameters and source information - mv "${__cdist_new_object_dir}/"* "$__cdist_object_dir" - mv "${__cdist_new_object_dir}/${__cdist_name_object_source}" "$__cdist_object_dir" + # Move object, not only parts + mv "${__cdist_new_object_dir}/" "$__cdist_object_dir" done < "$__cdist_new_objects_list" # Remove listing and objects, otherwise the next type will reuse it... From 30a3514dfe78a377bc9903565a3ca9fd7c51ab91 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 02:23:09 +0100 Subject: [PATCH 0795/6109] create top level hierarchy on mv and move to object to one dir higher Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 4f468e2e..501da620 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -93,8 +93,11 @@ while [ "$__cdist_new_objects_created" = "y" ]; do # Source of the new object __cdist_new_object_dir="${__cdist_new_objects_dir}/$__cdist_new_object" + # Create top directory + __cdist_new_object_top_dir=${__cdist_new_object_dir%/*} + # Move object, not only parts - mv "${__cdist_new_object_dir}/" "$__cdist_object_dir" + mv "${__cdist_new_object_dir}/" "$__cdist_object_top_dir" done < "$__cdist_new_objects_list" # Remove listing and objects, otherwise the next type will reuse it... From 25664d26e955f5aa77d5bab9ea1404f99171812e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 02:24:22 +0100 Subject: [PATCH 0796/6109] +new Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 501da620..059d829f 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -97,7 +97,7 @@ while [ "$__cdist_new_objects_created" = "y" ]; do __cdist_new_object_top_dir=${__cdist_new_object_dir%/*} # Move object, not only parts - mv "${__cdist_new_object_dir}/" "$__cdist_object_top_dir" + mv "${__cdist_new_object_dir}/" "$__cdist_new_object_top_dir" done < "$__cdist_new_objects_list" # Remove listing and objects, otherwise the next type will reuse it... From 3d0cdfb7c3163bacd215946f1de38672c1e28dec Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 02:26:52 +0100 Subject: [PATCH 0797/6109] move to correct top dir, not to itself Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 059d829f..89ec0668 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -90,14 +90,15 @@ while [ "$__cdist_new_objects_created" = "y" ]; do # where to save the newly created object __cdist_object_dir="$__cdist_out_object_dir/$__cdist_new_object" + # Create top directory + __cdist_object_top_dir=${__cdist_object_dir%/*} + mkdir -p "$__cdist_object_top_dir" + # Source of the new object __cdist_new_object_dir="${__cdist_new_objects_dir}/$__cdist_new_object" - # Create top directory - __cdist_new_object_top_dir=${__cdist_new_object_dir%/*} - # Move object, not only parts - mv "${__cdist_new_object_dir}/" "$__cdist_new_object_top_dir" + mv "${__cdist_new_object_dir}/" "$__cdist_object_top_dir" done < "$__cdist_new_objects_list" # Remove listing and objects, otherwise the next type will reuse it... From 7525e82ce4524965f43b11a777627c1bcf40e0dc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 02:52:42 +0100 Subject: [PATCH 0798/6109] clearify what to move Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 89ec0668..050e4850 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -89,16 +89,26 @@ while [ "$__cdist_new_objects_created" = "y" ]; do # where to save the newly created object __cdist_object_dir="$__cdist_out_object_dir/$__cdist_new_object" + mkdir -p "$__cdist_object_dir" - # Create top directory - __cdist_object_top_dir=${__cdist_object_dir%/*} - mkdir -p "$__cdist_object_top_dir" + # Move parts of the object (CANNOT MOVE COMPLETLEY, HIERACHY!) + __cdist_new_object_dir="$__cdist_new_objects_dir/$__cdist_new_object" - # Source of the new object - __cdist_new_object_dir="${__cdist_new_objects_dir}/$__cdist_new_object" + # Source + mv "${__cdist_new_object_dir}/${__cdist_name_object_source}" \ + "$__cdist_object_dir" - # Move object, not only parts - mv "${__cdist_new_object_dir}/" "$__cdist_object_top_dir" + # Parameter + if [ -d "${__cdist_new_object_dir}/${__cdist_name_parameter}" ]; then + mv "${__cdist_new_object_dir}/${__cdist_name_parameter}" \ + "$__cdist_object_dir" + fi + + # Explorer + if [ -d "${__cdist_new_object_dir}/${__cdist_name_explorer}" ]; then + mv "${__cdist_new_object_dir}/${__cdist_name_explorer}" \ + "$__cdist_object_dir" + fi done < "$__cdist_new_objects_list" # Remove listing and objects, otherwise the next type will reuse it... From d4f07749d674539cc90dc0c587fd5343c64dfe45 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 03:00:46 +0100 Subject: [PATCH 0799/6109] postpone some stuff after 1.2 Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 4 ---- doc/dev/todo/post-1.2 | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index f6b8809a..6b456f35 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,5 +1 @@ Cleanup and release 1.2.0 - - cdist-remote-code-run-all - - cdist-remote-explorer-run - - cdist-type-build-emulation - - cdist-type-emulator diff --git a/doc/dev/todo/post-1.2 b/doc/dev/todo/post-1.2 index c5b85d8b..fef6c91e 100644 --- a/doc/dev/todo/post-1.2 +++ b/doc/dev/todo/post-1.2 @@ -22,3 +22,9 @@ Documentation: - Check all references in manpages, ensure all manpages exist - Ensure html output of manpages are published on the web - ensure every file in bin/ has a correspondent manpage + + - cdist-remote-code-run-all + - cdist-remote-explorer-run + - cdist-type-build-emulation + - cdist-type-emulator + From 8d4d5a5c15ece6133ef5384e6556d64480012acf Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 03:05:22 +0100 Subject: [PATCH 0800/6109] switch to cdist 1.2.0 Signed-off-by: Nico Schottelius --- README | 6 +++++- bin/cdist-config | 2 +- doc/changelog | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README b/README index 8b4ae6b5..cadb3e30 100644 --- a/README +++ b/README @@ -129,7 +129,7 @@ may vanish at any point. To select a specific branch use git checkout -b origin/ # Stay on version 1.1 - git checkout -b 1.1 origin/1.1 + git checkout -b 1.2 origin/1.2 ### Mirrors @@ -150,6 +150,10 @@ If you stay on a version branche (i.e. 1.0, 1.1., ...), nothing should break. The master branch on the other hand is the development branch and may not be working, break your setup or eat the tree in your garden. +### Upgrading from 1.1 to 1.2 + +No incompatiblities. + ### Upgrading from 1.0 to 1.1 In 1.1 the type **\_\_file** was split into **\_\_directory**, **\_\_file** and diff --git a/bin/cdist-config b/bin/cdist-config index 56c49772..ac94efa7 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -19,7 +19,7 @@ # # -__cdist_version="1.1.0" +__cdist_version="1.2.0" # Fail if something bogus is going on set -u diff --git a/doc/changelog b/doc/changelog index 32d5ac63..9b664c0b 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,4 +1,4 @@ -1.2.0: +1.2.0: 2011-03-19 * Added dependencies (see cdist-type(7)) * New type __removeline (Daniel Roth) * New type __group (Steven Armstrong) From cba3297587a953c1fcb58c3b172e5d68619b7861 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 13:08:03 +0100 Subject: [PATCH 0801/6109] add nexttodo Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 6b456f35..2a9df706 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1 +1,6 @@ -Cleanup and release 1.2.0 +Dependency problem: + +Generating code for __file/home/lyni/dos/scorch15/SCORCH.DOC ... +scp: /home/lyni/dos/scorch15/SCORCH.DOC: No such file or directory + +-> explorea cop file t a directory that does not yet exist! From da5e7e52bb8e204469128d437dda665ba4daabff Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 13:25:15 +0100 Subject: [PATCH 0802/6109] and a solution for todo Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 2a9df706..f00f6088 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -3,4 +3,21 @@ Dependency problem: Generating code for __file/home/lyni/dos/scorch15/SCORCH.DOC ... scp: /home/lyni/dos/scorch15/SCORCH.DOC: No such file or directory --> explorea cop file t a directory that does not yet exist! +-> Err, gencode does the wrong thing here. + +Gencode is also not very clean, doing stuff that should probably +done later. + +Maybe differentiate between local|remote execution? + -> does not help either if different run + + -> keep dependencies in execute, have local and remote exec? + +-------------------------------------------------------------------------------- +Possible solution: + + - remove gencode + - replace with gen_localcode and gen_remotecode + - run both in the execution stage of the object + + From ea2cbb176a8a56230df9a3847825da06f2a0c6fa Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 14:50:11 +0100 Subject: [PATCH 0803/6109] fix generation of manpage for cdist-type__removeline Signed-off-by: Nico Schottelius --- conf/type/__removeline/man.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__removeline/man.text b/conf/type/__removeline/man.text index 5cf7791f..dba8b625 100644 --- a/conf/type/__removeline/man.text +++ b/conf/type/__removeline/man.text @@ -1,5 +1,5 @@ cdist-type__removeline(7) -============================== +========================= Daniel Roth From 88e20abddbbe966475a9f9d754bd99e810df8812 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 15:11:03 +0100 Subject: [PATCH 0804/6109] remove obsolete call to $@ in bin/cdist-remote-explorer-run Signed-off-by: Nico Schottelius --- bin/cdist-remote-explorer-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-remote-explorer-run b/bin/cdist-remote-explorer-run index 0dae3007..1fdd1467 100755 --- a/bin/cdist-remote-explorer-run +++ b/bin/cdist-remote-explorer-run @@ -62,7 +62,7 @@ for explorer in "$__cdist_explorer_dir/"*; do fi # Execute explorers and save results in remote destination directory - "$explorer" "$@" > "${__cdist_my_out_dir}/$explorer_name" + "$explorer" > "${__cdist_my_out_dir}/$explorer_name" else if [ -e "$explorer" ]; then echo "Explorer \"$explorer\" exists, but is not a file." From c77a6c5901798350500105d73b910ef8a8f65f88 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 15:14:45 +0100 Subject: [PATCH 0805/6109] add changes for 1.2.1 Signed-off-by: Nico Schottelius --- doc/changelog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/changelog b/doc/changelog index 9b664c0b..c5a32b1f 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,3 +1,8 @@ +1.2.1: + * Bugfix: Remove obsolete $@ call in cdist-remote-explorer-run + * Bugfix: Correct manpage for __removeline (broke manpage generation) + + 1.2.0: 2011-03-19 * Added dependencies (see cdist-type(7)) * New type __removeline (Daniel Roth) From 1af34c74b8bc1be01d64731c13be2dbf8efb6af1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 22:15:54 +0100 Subject: [PATCH 0806/6109] begin to differentiate local and remote object code generation Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 ++ bin/cdist-object-gencode | 3 ++- bin/cdist-object-gencode-all | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index ac94efa7..45792200 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -46,6 +46,8 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_conf_dir:=conf} : ${__cdist_name_explorer:=explorer} : ${__cdist_name_gencode:=gencode} +: ${__cdist_name_gencode_local:=$__cdist_name_gencode-local} +: ${__cdist_name_gencode_remote:=$__cdist_name_gencode-remote} : ${__cdist_name_global:=global} : ${__cdist_name_host:=host} : ${__cdist_name_init:=init} diff --git a/bin/cdist-object-gencode b/bin/cdist-object-gencode index aea1da07..61f85a4d 100755 --- a/bin/cdist-object-gencode +++ b/bin/cdist-object-gencode @@ -23,11 +23,12 @@ # . cdist-config -[ $# -eq 2 ] || __cdist_usage "" "" +[ $# -eq 2 ] || __cdist_usage "" "" "" set -eu __cdist_target_host="$1"; shift __cdist_object="$1"; shift +__cdist_gencode_type="$1"; shift __cdist_object_dir="$(__cdist_object_dir "$__cdist_object")" __cdist_type="$(__cdist_type_from_object "$__cdist_object")" diff --git a/bin/cdist-object-gencode-all b/bin/cdist-object-gencode-all index 90090c8a..3edfe4cc 100755 --- a/bin/cdist-object-gencode-all +++ b/bin/cdist-object-gencode-all @@ -31,7 +31,7 @@ __cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file" while read object; do code="$(__cdist_object_code "$object")" - echo "Generating code for $object ..." + echo "Generating local code for $object ..." cdist-object-gencode "$__cdist_target_host" "$object" > "${code}" From c5590cb648f60aa8c182267d741c12e43687b7f4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 22:19:44 +0100 Subject: [PATCH 0807/6109] extend cdist-object-gencode* to include remote/local extension Signed-off-by: Nico Schottelius --- bin/cdist-config | 4 ++-- bin/cdist-object-gencode | 2 +- bin/cdist-object-gencode-all | 9 +++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 45792200..d200e275 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -46,8 +46,8 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_conf_dir:=conf} : ${__cdist_name_explorer:=explorer} : ${__cdist_name_gencode:=gencode} -: ${__cdist_name_gencode_local:=$__cdist_name_gencode-local} -: ${__cdist_name_gencode_remote:=$__cdist_name_gencode-remote} +: ${__cdist_name_gencode_local:=local} +: ${__cdist_name_gencode_remote:=remote} : ${__cdist_name_global:=global} : ${__cdist_name_host:=host} : ${__cdist_name_init:=init} diff --git a/bin/cdist-object-gencode b/bin/cdist-object-gencode index 61f85a4d..7190779d 100755 --- a/bin/cdist-object-gencode +++ b/bin/cdist-object-gencode @@ -35,7 +35,7 @@ __cdist_type="$(__cdist_type_from_object "$__cdist_object")" __cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")" # Full path to where the executable of the type should exist, if the type has one -gencode="$(__cdist_type_gencode "$__cdist_type")" +gencode="$(__cdist_type_gencode "$__cdist_type")-${__cdist_gencode_type}" # export variables for gencode export __object_id="$__cdist_object_id" diff --git a/bin/cdist-object-gencode-all b/bin/cdist-object-gencode-all index 3edfe4cc..336ba263 100755 --- a/bin/cdist-object-gencode-all +++ b/bin/cdist-object-gencode-all @@ -31,9 +31,14 @@ __cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file" while read object; do code="$(__cdist_object_code "$object")" - echo "Generating local code for $object ..." - cdist-object-gencode "$__cdist_target_host" "$object" > "${code}" + echo "Generating local code for $object ..." + cdist-object-gencode "$__cdist_target_host" "$object" \ + "${__cdist_name_gencode_local}" > "${code}" + + echo "Generating remote code for $object ..." + cdist-object-gencode "$__cdist_target_host" "$object" \ + "${__cdist_name_gencode_remote}" > "${code}" chmod u+x "${code}" done < "$__cdist_tmp_file" From c086e7fcc1b5eceaccfd163a12a9570e67e9572c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 22:26:00 +0100 Subject: [PATCH 0808/6109] adjust argument usage in bin/cdist-object-gencode Signed-off-by: Nico Schottelius --- bin/cdist-object-gencode | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-object-gencode b/bin/cdist-object-gencode index 7190779d..7b8f01b3 100755 --- a/bin/cdist-object-gencode +++ b/bin/cdist-object-gencode @@ -23,7 +23,7 @@ # . cdist-config -[ $# -eq 2 ] || __cdist_usage "" "" "" +[ $# -eq 3 ] || __cdist_usage "" "" "" set -eu __cdist_target_host="$1"; shift From 4368e00c57220f3489bac9a68f47da80c8279c96 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 22:33:18 +0100 Subject: [PATCH 0809/6109] save generated code in its own file Signed-off-by: Nico Schottelius --- bin/cdist-object-gencode-all | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/cdist-object-gencode-all b/bin/cdist-object-gencode-all index 336ba263..00ac1664 100755 --- a/bin/cdist-object-gencode-all +++ b/bin/cdist-object-gencode-all @@ -30,15 +30,16 @@ __cdist_target_host="$1"; shift __cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file" while read object; do - code="$(__cdist_object_code "$object")" + code_local="$(__cdist_object_code "$object")-${__cdist_name_gencode_local}" + code_remote="$(__cdist_object_code "$object")-${__cdist_name_gencode_remote}" echo "Generating local code for $object ..." cdist-object-gencode "$__cdist_target_host" "$object" \ - "${__cdist_name_gencode_local}" > "${code}" + "${__cdist_name_gencode_local}" > "${code_local}" echo "Generating remote code for $object ..." cdist-object-gencode "$__cdist_target_host" "$object" \ - "${__cdist_name_gencode_remote}" > "${code}" + "${__cdist_name_gencode_remote}" > "${code_remote}" - chmod u+x "${code}" + chmod u+x "${code_local}" "${code_remote}" done < "$__cdist_tmp_file" From 3eed0f97cee5827c5af86516b07c26addac8ec74 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 22:38:36 +0100 Subject: [PATCH 0810/6109] begin to migrate __file to new local/remote scheme Signed-off-by: Nico Schottelius --- conf/type/__file/{gencode => gencode-remote} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename conf/type/__file/{gencode => gencode-remote} (100%) diff --git a/conf/type/__file/gencode b/conf/type/__file/gencode-remote similarity index 100% rename from conf/type/__file/gencode rename to conf/type/__file/gencode-remote From 6f79f01206117acf1010806c3601e5cd1109fd45 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 23:01:35 +0100 Subject: [PATCH 0811/6109] cdist-remote-code-run is now also locally used: name it cdist-code-run Signed-off-by: Nico Schottelius --- bin/{cdist-remote-code-run => cdist-code-run} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename bin/{cdist-remote-code-run => cdist-code-run} (100%) diff --git a/bin/cdist-remote-code-run b/bin/cdist-code-run similarity index 100% rename from bin/cdist-remote-code-run rename to bin/cdist-code-run From 1785f5acd07388a1e04e6846e3bcb4b3826cd924 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 23:12:49 +0100 Subject: [PATCH 0812/6109] add local/remote code run capability Signed-off-by: Nico Schottelius --- bin/cdist-code-run | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/cdist-code-run b/bin/cdist-code-run index 009c0743..42b4901d 100755 --- a/bin/cdist-code-run +++ b/bin/cdist-code-run @@ -22,30 +22,30 @@ # . cdist-config -[ $# -eq 2 ] || __cdist_usage " " +[ $# -eq 3 ] || __cdist_usage " " set -ue # This variable MUST be exactly like this - see __cdist_object_dir __cdist_out_object_dir="$1"; shift object="$1"; shift +__cdist_gencode_type="$1"; shift if [ ! -d "$(__cdist_object_dir "$object")" ]; then __cdist_exit_err "Object $object is missing." fi - finished="$(__cdist_object_code_finished "$object")" -code="$(__cdist_object_code "$object")" require="$(__cdist_object_require "$object")" +code="$(__cdist_object_code "$object")-${__cdist_gencode_type}" # Do nothing if our work has been done if [ -f "$finished" ]; then exit 0 fi -echo "Checking code for $object ..." +echo "Checking code-${__cdist_gencode_type} for $object ..." if [ -f "$require" ]; then while read requirement; do @@ -57,7 +57,7 @@ fi if [ -e "$code" ]; then if [ -f "$code" ]; then if [ -x "$code" ]; then - echo "Executing code for $object ..." + echo "Executing code-${__cdist_gencode_type} for $object ..." "$code" touch "$finished" else From 8b43913366fcba329915c27e29a02bf8e89fff05 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 23:14:48 +0100 Subject: [PATCH 0813/6109] include local+remote run in bin/cdist-code-run-all Signed-off-by: Nico Schottelius --- bin/cdist-code-run-all | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/bin/cdist-code-run-all b/bin/cdist-code-run-all index 27935ee3..f435006f 100755 --- a/bin/cdist-code-run-all +++ b/bin/cdist-code-run-all @@ -18,7 +18,7 @@ # along with cdist. If not, see . # # -# Exec code on the remote side +# Exec code locally and remote # . cdist-config @@ -27,5 +27,21 @@ set -e __cdist_target_host="$1"; shift +__cdist_out_object_dir="$1"; shift + +__cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file" + +while read object; do + # Code local + cdist-code-run "$__cdist_out_object_dir" "$object" "${__cdist_name_gencode_local}" + + # Code remote + cdist-run-remote "$__cdist_target_host" "cdist-code-run" \ + "${__cdist_remote_out_object_base_dir}" "${__cdist_name_gencode_remote}" +done < "$__cdist_tmp_file" + +exit 0 + +# OLD: cdist-run-remote "$__cdist_target_host" \ "cdist-remote-code-run-all" "${__cdist_remote_out_object_base_dir}" From 1099c55c9a10251da76156bb2234c444d47d95ab Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 23:14:58 +0100 Subject: [PATCH 0814/6109] args==3 Signed-off-by: Nico Schottelius --- bin/cdist-object-gencode | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-object-gencode b/bin/cdist-object-gencode index 7b8f01b3..1ba1116b 100755 --- a/bin/cdist-object-gencode +++ b/bin/cdist-object-gencode @@ -23,7 +23,7 @@ # . cdist-config -[ $# -eq 3 ] || __cdist_usage "" "" "" +[ $# -eq 3 ] || __cdist_usage "" "" "" set -eu __cdist_target_host="$1"; shift From 418c3db23e95b4b12b8a37154f8292d78a9a35a2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 23:15:55 +0100 Subject: [PATCH 0815/6109] remove almost obsolete bin/cdist-remote-code-run-all Signed-off-by: Nico Schottelius --- bin/cdist-remote-code-run-all | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100755 bin/cdist-remote-code-run-all diff --git a/bin/cdist-remote-code-run-all b/bin/cdist-remote-code-run-all deleted file mode 100755 index 1f051258..00000000 --- a/bin/cdist-remote-code-run-all +++ /dev/null @@ -1,35 +0,0 @@ -#!/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 . -# -# -# This binary is executed on the remote side to execute code -# - -. cdist-config -[ $# -eq 1 ] || __cdist_usage "" -set -ue - -# Warning: Variable is special, as interpreted by __cdist_object_dir() -__cdist_out_object_dir="$1"; shift - -__cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file" - -while read object; do - cdist-remote-code-run "$__cdist_out_object_dir" "$object" -done < "$__cdist_tmp_file" From 20e4e73bcd8f7535a176d9067057ec611a97976a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 23:17:40 +0100 Subject: [PATCH 0816/6109] fixup cdist-code-run-all and remove obsolete code Signed-off-by: Nico Schottelius --- bin/cdist-code-run-all | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/bin/cdist-code-run-all b/bin/cdist-code-run-all index f435006f..070d0e71 100755 --- a/bin/cdist-code-run-all +++ b/bin/cdist-code-run-all @@ -27,8 +27,6 @@ set -e __cdist_target_host="$1"; shift -__cdist_out_object_dir="$1"; shift - __cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file" while read object; do @@ -37,11 +35,6 @@ while read object; do # Code remote cdist-run-remote "$__cdist_target_host" "cdist-code-run" \ - "${__cdist_remote_out_object_base_dir}" "${__cdist_name_gencode_remote}" + "${__cdist_remote_out_object_base_dir}" "$object" \ + "${__cdist_name_gencode_remote}" done < "$__cdist_tmp_file" - -exit 0 - -# OLD: -cdist-run-remote "$__cdist_target_host" \ - "cdist-remote-code-run-all" "${__cdist_remote_out_object_base_dir}" From a761a035fe771d5b72d8f9c299eaaf670f762479 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 23:26:41 +0100 Subject: [PATCH 0817/6109] update __file with gencode-local and gencode-remote Signed-off-by: Nico Schottelius --- conf/type/__file/gencode-local | 44 +++++++++++++++++++++++++++++++++ conf/type/__file/gencode-remote | 22 ++--------------- 2 files changed, 46 insertions(+), 20 deletions(-) create mode 100755 conf/type/__file/gencode-local diff --git a/conf/type/__file/gencode-local b/conf/type/__file/gencode-local new file mode 100755 index 00000000..1168919e --- /dev/null +++ b/conf/type/__file/gencode-local @@ -0,0 +1,44 @@ +#!/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 . +# +# +# __file is a very basic type, which will probably be reused quite often +# + +destination="/$__object_id" + +if [ -f "$__object/parameter/source" ]; then + source="$(cat "$__object/parameter/source")" + + if [ -f "$source" ]; then + local_cksum="$(cksum < "$source")" + remote_cksum="$(cat "$__object/explorer/cksum")" + + if [ "$local_cksum" != "$remote_cksum" ]; then + # FIXME: The username 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... + echo scp "$source" "root@${__target_host}:${destination}" + fi + else + echo "Source \"$source\" does not exist." >&2 + exit 1 + fi +fi diff --git a/conf/type/__file/gencode-remote b/conf/type/__file/gencode-remote index ef8c5501..7c5cf7ce 100755 --- a/conf/type/__file/gencode-remote +++ b/conf/type/__file/gencode-remote @@ -23,31 +23,13 @@ destination="/$__object_id" -if [ -f "$__object/parameter/source" ]; then - source="$(cat "$__object/parameter/source")" - - if [ -f "$source" ]; then - local_cksum="$(cksum < "$source")" - remote_cksum="$(cat "$__object/explorer/cksum")" - - if [ "$local_cksum" != "$remote_cksum" ]; then - # FIXME: The username 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 - else - echo "Source \"$source\" does not exist." >&2 - exit 1 - fi -else +# No source? Create empty file +if [ ! -f "$__object/parameter/source" ]; then if [ no = "$(cat "$__object/explorer/exists")" ]; then echo touch \"$destination\" fi fi - # Mode settings if [ -f "$__object/parameter/mode" ]; then echo chmod \"$(cat "$__object/parameter/mode")\" \"$destination\" From e57ec326230fd1183fd7a733697330f9dce11f50 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 23:31:51 +0100 Subject: [PATCH 0818/6109] ++todo > 1.2 Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.2 | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/dev/todo/post-1.2 b/doc/dev/todo/post-1.2 index fef6c91e..eccf78c3 100644 --- a/doc/dev/todo/post-1.2 +++ b/doc/dev/todo/post-1.2 @@ -1,6 +1,7 @@ Core: - write test case: test.sh - probably remove grep -q (solaris does not have it) + - export remote user name -> $__user Types to be written/extended: - __ssh-keys (host/user) From 5472e06cbe485be163faa86299910bd37b16bb21 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 23:36:58 +0100 Subject: [PATCH 0819/6109] [DOC] add references to gencode-local and gencode-remote Signed-off-by: Nico Schottelius --- doc/man/cdist-reference.text.sh | 5 ++++- doc/man/cdist-type.text | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/man/cdist-reference.text.sh b/doc/man/cdist-reference.text.sh index f900e35e..8fdd831c 100755 --- a/doc/man/cdist-reference.text.sh +++ b/doc/man/cdist-reference.text.sh @@ -89,7 +89,10 @@ conf/type//man.text:: conf/type//manifest:: Used to generate additional objects from a type. -conf/type//gencode:: +conf/type//gencode-local:: + Used to generate code to be executed on the server. + +conf/type//gencode-remote:: Used to generate code to be executed on the client. conf/type//parameters/required:: diff --git a/doc/man/cdist-type.text b/doc/man/cdist-type.text index f8811a16..8d1b9ae4 100644 --- a/doc/man/cdist-type.text +++ b/doc/man/cdist-type.text @@ -155,6 +155,10 @@ fi WRITING THE GENCODE SCRIPT -------------------------- +There are two gencode scripts: gencode-local and gencode-remote. +The output of gencode-local is executed locally, whereas +the output of gencode-remote is executed on the target. + The gencode script can make use of the parameters, the global explorers and the type specific explorers. The output (stdout) of this script is saved by cdist and will be executed on the target. From c6012987604361bf2f4012728e4604f96717e1ef Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 23:39:01 +0100 Subject: [PATCH 0820/6109] gencode -> gencode-remote in types Signed-off-by: Nico Schottelius --- conf/type/__addifnosuchline/{gencode => gencode-remote} | 0 conf/type/__directory/{gencode => gencode-remote} | 0 conf/type/__group/{gencode => gencode-remote} | 0 conf/type/__link/{gencode => gencode-remote} | 0 conf/type/__package_apt/{gencode => gencode-remote} | 0 conf/type/__package_pacman/{gencode => gencode-remote} | 0 conf/type/__removeline/{gencode => gencode-remote} | 0 conf/type/__user/{gencode => gencode-remote} | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename conf/type/__addifnosuchline/{gencode => gencode-remote} (100%) rename conf/type/__directory/{gencode => gencode-remote} (100%) rename conf/type/__group/{gencode => gencode-remote} (100%) rename conf/type/__link/{gencode => gencode-remote} (100%) rename conf/type/__package_apt/{gencode => gencode-remote} (100%) rename conf/type/__package_pacman/{gencode => gencode-remote} (100%) rename conf/type/__removeline/{gencode => gencode-remote} (100%) rename conf/type/__user/{gencode => gencode-remote} (100%) diff --git a/conf/type/__addifnosuchline/gencode b/conf/type/__addifnosuchline/gencode-remote similarity index 100% rename from conf/type/__addifnosuchline/gencode rename to conf/type/__addifnosuchline/gencode-remote diff --git a/conf/type/__directory/gencode b/conf/type/__directory/gencode-remote similarity index 100% rename from conf/type/__directory/gencode rename to conf/type/__directory/gencode-remote diff --git a/conf/type/__group/gencode b/conf/type/__group/gencode-remote similarity index 100% rename from conf/type/__group/gencode rename to conf/type/__group/gencode-remote diff --git a/conf/type/__link/gencode b/conf/type/__link/gencode-remote similarity index 100% rename from conf/type/__link/gencode rename to conf/type/__link/gencode-remote diff --git a/conf/type/__package_apt/gencode b/conf/type/__package_apt/gencode-remote similarity index 100% rename from conf/type/__package_apt/gencode rename to conf/type/__package_apt/gencode-remote diff --git a/conf/type/__package_pacman/gencode b/conf/type/__package_pacman/gencode-remote similarity index 100% rename from conf/type/__package_pacman/gencode rename to conf/type/__package_pacman/gencode-remote diff --git a/conf/type/__removeline/gencode b/conf/type/__removeline/gencode-remote similarity index 100% rename from conf/type/__removeline/gencode rename to conf/type/__removeline/gencode-remote diff --git a/conf/type/__user/gencode b/conf/type/__user/gencode-remote similarity index 100% rename from conf/type/__user/gencode rename to conf/type/__user/gencode-remote From 27fca7613d4e0e16f852401e923bb7a0d80ea799 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 23:43:11 +0100 Subject: [PATCH 0821/6109] document changes for 1.3.0 Signed-off-by: Nico Schottelius --- doc/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/changelog b/doc/changelog index c5a32b1f..a0a65428 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,4 +1,5 @@ -1.2.1: +1.3.0: + * Add support for local and remote code generation and execution * Bugfix: Remove obsolete $@ call in cdist-remote-explorer-run * Bugfix: Correct manpage for __removeline (broke manpage generation) From c87ecbe23f3d72fd086b53d5f31b65e39b7509b5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 19 Mar 2011 23:44:25 +0100 Subject: [PATCH 0822/6109] update comment for __link Signed-off-by: Nico Schottelius --- conf/type/__link/gencode-remote | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conf/type/__link/gencode-remote b/conf/type/__link/gencode-remote index 2e13755c..07da987c 100755 --- a/conf/type/__link/gencode-remote +++ b/conf/type/__link/gencode-remote @@ -18,8 +18,7 @@ # along with cdist. If not, see . # # -# __file is a very basic type and should be able to be used as an -# example for typewrites later +# Mostly a wrapper for ln # destination="/$__object_id" From 6f480810f34023dd90a6d91d456044727acc509c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 00:02:44 +0100 Subject: [PATCH 0823/6109] Update to 1.3.0 Signed-off-by: Nico Schottelius --- README | 3 ++- bin/cdist-config | 2 +- doc/changelog | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README b/README index cadb3e30..6e46db87 100644 --- a/README +++ b/README @@ -115,12 +115,13 @@ how to use cdist. There are at least the following branches available: * master: the development branch - * 1.2: Current stable: Dependencies supported + * 1.3: Support for local and remote code execution (current stable) Old versions: * 1.0: First official release * 1.1: __file to __file, __directory, __link migration + * 1.2: Dependencies supported Other branches may be available for features or bugfixes, but they may vanish at any point. To select a specific branch use diff --git a/bin/cdist-config b/bin/cdist-config index d200e275..23b24025 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -19,7 +19,7 @@ # # -__cdist_version="1.2.0" +__cdist_version="1.3.0" # Fail if something bogus is going on set -u diff --git a/doc/changelog b/doc/changelog index a0a65428..12e3c8f1 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,4 +1,4 @@ -1.3.0: +1.3.0: 2011-03-20 * Add support for local and remote code generation and execution * Bugfix: Remove obsolete $@ call in cdist-remote-explorer-run * Bugfix: Correct manpage for __removeline (broke manpage generation) From c8de837c98fe7029d6fd8450ecdd33521dc04e0c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 00:12:47 +0100 Subject: [PATCH 0824/6109] todo after 1.3, 1.2 is old :-) Signed-off-by: Nico Schottelius --- doc/dev/todo/{post-1.2 => post-1.3} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/dev/todo/{post-1.2 => post-1.3} (100%) diff --git a/doc/dev/todo/post-1.2 b/doc/dev/todo/post-1.3 similarity index 100% rename from doc/dev/todo/post-1.2 rename to doc/dev/todo/post-1.3 From faa6267bc95baaf706dfe6f869cf1d892806543d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 00:15:19 +0100 Subject: [PATCH 0825/6109] and new stuff todo for nico Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 24 +----------------------- doc/dev/todo/post-1.3 | 7 ------- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index f00f6088..ce8412de 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,23 +1 @@ -Dependency problem: - -Generating code for __file/home/lyni/dos/scorch15/SCORCH.DOC ... -scp: /home/lyni/dos/scorch15/SCORCH.DOC: No such file or directory - --> Err, gencode does the wrong thing here. - -Gencode is also not very clean, doing stuff that should probably -done later. - -Maybe differentiate between local|remote execution? - -> does not help either if different run - - -> keep dependencies in execute, have local and remote exec? - --------------------------------------------------------------------------------- -Possible solution: - - - remove gencode - - replace with gen_localcode and gen_remotecode - - run both in the execution stage of the object - - +Ensure bin/* is documented diff --git a/doc/dev/todo/post-1.3 b/doc/dev/todo/post-1.3 index eccf78c3..00aca9c7 100644 --- a/doc/dev/todo/post-1.3 +++ b/doc/dev/todo/post-1.3 @@ -22,10 +22,3 @@ Documentation: - via version control - Check all references in manpages, ensure all manpages exist - Ensure html output of manpages are published on the web - - ensure every file in bin/ has a correspondent manpage - - - cdist-remote-code-run-all - - cdist-remote-explorer-run - - cdist-type-build-emulation - - cdist-type-emulator - From 9aa60b3b1d21ac820127312014a4db6ce5497b02 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 00:30:19 +0100 Subject: [PATCH 0826/6109] Add manpage for cdist-type-build-emulation Signed-off-by: Nico Schottelius --- Makefile | 1 + doc/changelog | 3 +++ doc/dev/todo/niconext | 4 +++ doc/man/cdist-type-build-emulation.text | 33 +++++++++++++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 doc/man/cdist-type-build-emulation.text diff --git a/Makefile b/Makefile index 6c28a88b..391190ae 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,7 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-run-remote.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-type.text \ + $(MANDIR)/cdist-type-build-emulation.text \ $(MANDIR)/cdist-type-template.text \ diff --git a/doc/changelog b/doc/changelog index 12e3c8f1..a10d9de5 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,3 +1,6 @@ +1.3.1: + * Document cdist-type-build-emulation + 1.3.0: 2011-03-20 * Add support for local and remote code generation and execution * Bugfix: Remove obsolete $@ call in cdist-remote-explorer-run diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index ce8412de..a90df593 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1 +1,5 @@ Ensure bin/* is documented + - cdist-remote-code-run-all + - cdist-remote-explorer-run + - cdist-type-emulator + diff --git a/doc/man/cdist-type-build-emulation.text b/doc/man/cdist-type-build-emulation.text new file mode 100644 index 00000000..81c56e7c --- /dev/null +++ b/doc/man/cdist-type-build-emulation.text @@ -0,0 +1,33 @@ +cdist-type-build-emulation(1) +============================= +Nico Schottelius + + +NAME +---- +cdist-type-build-emulation - Build executables for types + + +SYNOPSIS +-------- +cdist-type-build-emulation OUT_DIR + + +DESCRIPTION +----------- +cdist-type-build-emulation creates a link to cdist-type-emulator +for every TYPE. These links are placed in a OUT_DIR, which +is prepended into $PATH. This way the user can use TYPE in the +manifests like any other executable. + + +SEE ALSO +-------- +- cdist(7) +- cdist-type-emulator(1) + + +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). From 0d4f2a6c4b9c06d5c42196f8e20ecdee9290ff85 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 00:31:34 +0100 Subject: [PATCH 0827/6109] use __cdist_abs_mydir instead of which Signed-off-by: Nico Schottelius --- bin/cdist-type-build-emulation | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-type-build-emulation b/bin/cdist-type-build-emulation index 9a207e33..51c2f5b4 100755 --- a/bin/cdist-type-build-emulation +++ b/bin/cdist-type-build-emulation @@ -26,7 +26,7 @@ set -eu __cdist_output_dir="$1"; shift -__cdist_type_emulator="$(which cdist-type-emulator)" +__cdist_type_emulator="$__cdist_abs_mydir/cdist-type-emulator" if [ ! -d "${__cdist_type_dir}" ]; then __cdist_exit_err "$__cdist_type_dir must exist and contain available types" From bda2adb22cb30c20efd5e11ba49c35a1fb2c9be7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 00:43:08 +0100 Subject: [PATCH 0828/6109] document cdist-type-emulator Signed-off-by: Nico Schottelius --- Makefile | 1 + doc/changelog | 1 + doc/dev/todo/niconext | 2 -- doc/man/cdist-type-emulator.text | 56 ++++++++++++++++++++++++++++++++ 4 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 doc/man/cdist-type-emulator.text diff --git a/Makefile b/Makefile index 391190ae..20f961cd 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,7 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-type.text \ $(MANDIR)/cdist-type-build-emulation.text \ + $(MANDIR)/cdist-type-emulator.text \ $(MANDIR)/cdist-type-template.text \ diff --git a/doc/changelog b/doc/changelog index a10d9de5..054b9f71 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,5 +1,6 @@ 1.3.1: * Document cdist-type-build-emulation + * Document cdist-type-emulator 1.3.0: 2011-03-20 * Add support for local and remote code generation and execution diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index a90df593..4e90e2b1 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,5 +1,3 @@ Ensure bin/* is documented - cdist-remote-code-run-all - cdist-remote-explorer-run - - cdist-type-emulator - diff --git a/doc/man/cdist-type-emulator.text b/doc/man/cdist-type-emulator.text new file mode 100644 index 00000000..507c1054 --- /dev/null +++ b/doc/man/cdist-type-emulator.text @@ -0,0 +1,56 @@ +cdist-type-emulator(1) +====================== +Nico Schottelius + + +NAME +---- +cdist-type-emulator - Emulate type and record parameters and dependencies + + +SYNOPSIS +-------- +cdist-type-emulator [TYPE ARGS] + + +DESCRIPTION +----------- +cdist-type-emulator is normally called through a link to it of the +name of a specifc type. It saves the given parameters into +a parameters directory and the requirements into a require file. + +It checks whether the parameters are valid: + +- are required parameter given? +- are all other required parameters specified as optional? + + +EXAMPLES +-------- +Your manifest may contain stuff like this: + + +-------------------------------------------------------------------------------- +__addifnosuchline /tmp/linetest --line "test" + +__motd +-------------------------------------------------------------------------------- + +In both cases, cdist-type-emulator is called instead of a real type. +In the first case, the object id "/tmp/linetest" is recorded and the +parameter "line" stored with the content "test". + +In the second case, __motd must be decleared as a singleton, as the +object id is missing. + + +SEE ALSO +-------- +- cdist(7) +- cdist-type-build-emulation(1) + + +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). From 0f60a2387aa57cb30179a78661bee3b6f786afb9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 00:51:45 +0100 Subject: [PATCH 0829/6109] document cdist-remote-explorer-run.text Signed-off-by: Nico Schottelius --- Makefile | 1 + doc/changelog | 1 + doc/dev/todo/niconext | 7 ++++-- doc/man/cdist-remote-explorer-run.text | 33 ++++++++++++++++++++++++++ 4 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 doc/man/cdist-remote-explorer-run.text diff --git a/Makefile b/Makefile index 20f961cd..9168fc9f 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,7 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-object-gencode.text \ $(MANDIR)/cdist-object-gencode-all.text \ $(MANDIR)/cdist-quickstart.text \ + $(MANDIR)/cdist-remote-explorer-run.text \ $(MANDIR)/cdist-run-remote.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-type.text \ diff --git a/doc/changelog b/doc/changelog index 054b9f71..a799335d 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,6 +1,7 @@ 1.3.1: * Document cdist-type-build-emulation * Document cdist-type-emulator + * Document cdist-remote-explorer-run 1.3.0: 2011-03-20 * Add support for local and remote code generation and execution diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 4e90e2b1..e299766b 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,3 +1,6 @@ Ensure bin/* is documented - - cdist-remote-code-run-all - - cdist-remote-explorer-run + +[0:43] kr:bin% for a in *; do test -f ../doc/man/${a}.text || echo $a missing ; done +cdist-code-run missing +[0:44] kr:bin% + diff --git a/doc/man/cdist-remote-explorer-run.text b/doc/man/cdist-remote-explorer-run.text new file mode 100644 index 00000000..64951e2c --- /dev/null +++ b/doc/man/cdist-remote-explorer-run.text @@ -0,0 +1,33 @@ +cdist-remote-explorer-run(1) +============================ +Nico Schottelius + + +NAME +---- +cdist-remote-explorer-run - Run explorer remotely + + +SYNOPSIS +-------- +cdist-remote-explorer-run VARIABLE_NAME EXPLORER_DIR OUT_DIR + + +DESCRIPTION +----------- +cdist-remote-explorer-run is executed on the target. +It sets up the variable VARIABLE_NAME to point to the given +EXPLORER_DIR and runs all explorer found in EXPLORER_DIR. +The output of every run explorer is saved into OUT_DIR. + + +SEE ALSO +-------- +- cdist(7) +- cdist-explorer-run-global(1) + + +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). From 45e72938402aa19c32d12545094bcdaca2f70441 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 01:08:11 +0100 Subject: [PATCH 0830/6109] document cdist-code-run Signed-off-by: Nico Schottelius --- Makefile | 1 + doc/dev/todo/niconext | 6 ----- doc/man/cdist-code-run.text | 34 +++++++++++++++++++++++++++ doc/man/cdist-object-gencode-all.text | 1 + doc/man/cdist-object-gencode.text | 1 + 5 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 doc/man/cdist-code-run.text diff --git a/Makefile b/Makefile index 9168fc9f..5cc89547 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,7 @@ MANGENERATED=$(MANDIR)/cdist-reference.text MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-code-run-all.text \ + $(MANDIR)/cdist-code-run.text \ $(MANDIR)/cdist-config.text \ $(MANDIR)/cdist-dir.text \ $(MANDIR)/cdist-env.text \ diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index e299766b..e69de29b 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,6 +0,0 @@ -Ensure bin/* is documented - -[0:43] kr:bin% for a in *; do test -f ../doc/man/${a}.text || echo $a missing ; done -cdist-code-run missing -[0:44] kr:bin% - diff --git a/doc/man/cdist-code-run.text b/doc/man/cdist-code-run.text new file mode 100644 index 00000000..f412f6da --- /dev/null +++ b/doc/man/cdist-code-run.text @@ -0,0 +1,34 @@ +cdist-code-run(1) +============================ +Nico Schottelius + + +NAME +---- +cdist-code-run - Run explorer remotely + + +SYNOPSIS +-------- +cdist-code-run OBJECT_DIR OBJECT TYPE + + +DESCRIPTION +----------- +cdist-code-run executes generated code from a given OBJECT. +The OBJECT must be located below OBJECT_DIR. +TYPE must be either local or remote and determines which +code part is to be executed. + + +SEE ALSO +-------- +- cdist(7) +- cdist-object-gencode(1) +- cdist-object-gencode-all(1) + + +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/doc/man/cdist-object-gencode-all.text b/doc/man/cdist-object-gencode-all.text index 40d4335d..b1c96748 100644 --- a/doc/man/cdist-object-gencode-all.text +++ b/doc/man/cdist-object-gencode-all.text @@ -21,6 +21,7 @@ For every object that exists, the cdist-object-gencode is executed. SEE ALSO -------- - cdist(7) +- cdist-code-run(1) - cdist-deploy-to(1) - cdist-object-gencode(1) diff --git a/doc/man/cdist-object-gencode.text b/doc/man/cdist-object-gencode.text index c6fc8b18..83f4b4c1 100644 --- a/doc/man/cdist-object-gencode.text +++ b/doc/man/cdist-object-gencode.text @@ -22,6 +22,7 @@ executable on stdout will be used by cdist-object-gencode-all(1). SEE ALSO -------- - cdist(7) +- cdist-code-run(1) - cdist-deploy-to(1) - cdist-object-gencode-all(1) From a90cca865872be9b3e78036a1d28d329431a21cb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 01:57:24 +0100 Subject: [PATCH 0831/6109] do not care about solaris until someone needs it Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.3 | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/dev/todo/post-1.3 b/doc/dev/todo/post-1.3 index 00aca9c7..61adacc7 100644 --- a/doc/dev/todo/post-1.3 +++ b/doc/dev/todo/post-1.3 @@ -1,6 +1,5 @@ Core: - write test case: test.sh - - probably remove grep -q (solaris does not have it) - export remote user name -> $__user Types to be written/extended: From c7ccedd463ee63474090cb52652f5f62ae137df8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 02:01:02 +0100 Subject: [PATCH 0832/6109] DO NOT DO WHILE READ LOOP WITH SSH Signed-off-by: Nico Schottelius --- bin/cdist-code-run-all | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/bin/cdist-code-run-all b/bin/cdist-code-run-all index 070d0e71..b8a17430 100755 --- a/bin/cdist-code-run-all +++ b/bin/cdist-code-run-all @@ -29,12 +29,22 @@ __cdist_target_host="$1"; shift __cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file" +# NEED TO CREATE ARRAY, SSH DESTROYS WHILE READ LOOP while read object; do + set -- "$@" "$object" +done < "$__cdist_tmp_file" + +while [ $# -ge 1 ]; do + object="$1"; shift + # Code local - cdist-code-run "$__cdist_out_object_dir" "$object" "${__cdist_name_gencode_local}" + cdist-code-run "$__cdist_out_object_dir" "$object" \ + "${__cdist_name_gencode_local}" \ + || __exit_err "Remote code failed for $object" # Code remote cdist-run-remote "$__cdist_target_host" "cdist-code-run" \ "${__cdist_remote_out_object_base_dir}" "$object" \ - "${__cdist_name_gencode_remote}" + "${__cdist_name_gencode_remote}" \ + || __exit_err "Remote code failed for $object" done < "$__cdist_tmp_file" From 6800bbff10456ce92a1f0c629f3052e4bdd54042 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 02:01:23 +0100 Subject: [PATCH 0833/6109] call new name in requirement block Signed-off-by: Nico Schottelius --- bin/cdist-code-run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-code-run b/bin/cdist-code-run index 42b4901d..9528650d 100755 --- a/bin/cdist-code-run +++ b/bin/cdist-code-run @@ -23,7 +23,7 @@ . cdist-config [ $# -eq 3 ] || __cdist_usage " " -set -ue +set -uex # This variable MUST be exactly like this - see __cdist_object_dir __cdist_out_object_dir="$1"; shift @@ -50,7 +50,7 @@ echo "Checking code-${__cdist_gencode_type} for $object ..." if [ -f "$require" ]; then while read requirement; do echo "Requiring dependency $requirement for $object ..." - cdist-remote-code-run "$__cdist_out_object_dir" "$requirement" + cdist-code-run "$__cdist_out_object_dir" "$requirement" "$__cdist_gencode_type" done < "$require" fi From 04a07cfaf66db10ad155e56581cb0d28c3cb4ea3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 02:04:30 +0100 Subject: [PATCH 0834/6109] enhance and fix __issue Signed-off-by: Nico Schottelius --- conf/type/__issue/manifest | 24 +++++++++++++++--------- doc/changelog | 2 ++ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/conf/type/__issue/manifest b/conf/type/__issue/manifest index 1fab9a07..eff6b808 100755 --- a/conf/type/__issue/manifest +++ b/conf/type/__issue/manifest @@ -20,15 +20,21 @@ # destination=/etc/issue -source="$(cat "out/explorer/os")" -case "$os" in - archlinux|redhat) - source="$__type/files/$os" - ;; - *) - source="$__type/files/default" - ;; -esac +os="$(cat "$__global/explorer/os")" + +if [ -f "$__object/parameter/source" ]; then + source="$(cat "$__object/parameter/source")" + echo using $source +else + case "$os" in + archlinux|redhat) + source="$__type/files/$os" + ;; + *) + source="$__type/files/default" + ;; + esac +fi __file "$destination" --source "$source" diff --git a/doc/changelog b/doc/changelog index a799335d..f386faf1 100644 --- a/doc/changelog +++ b/doc/changelog @@ -2,6 +2,8 @@ * Document cdist-type-build-emulation * Document cdist-type-emulator * Document cdist-remote-explorer-run + * Fix dependencies in cdist-code-run + * Add --source to __issue and fix os check 1.3.0: 2011-03-20 * Add support for local and remote code generation and execution From a6b4c468e3d347d64386826470125428696e87b8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 02:04:50 +0100 Subject: [PATCH 0835/6109] and add __issue parameter Signed-off-by: Nico Schottelius --- conf/type/__issue/parameter/optional | 1 + 1 file changed, 1 insertion(+) create mode 100644 conf/type/__issue/parameter/optional diff --git a/conf/type/__issue/parameter/optional b/conf/type/__issue/parameter/optional new file mode 100644 index 00000000..5a18cd2f --- /dev/null +++ b/conf/type/__issue/parameter/optional @@ -0,0 +1 @@ +source From 2830e2e894edc4f3d02dd996d8f376c0156a7ff2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 02:12:35 +0100 Subject: [PATCH 0836/6109] -very verbose debug Signed-off-by: Nico Schottelius --- bin/cdist-code-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-code-run b/bin/cdist-code-run index 9528650d..229d4d1d 100755 --- a/bin/cdist-code-run +++ b/bin/cdist-code-run @@ -23,7 +23,7 @@ . cdist-config [ $# -eq 3 ] || __cdist_usage " " -set -uex +set -ue # This variable MUST be exactly like this - see __cdist_object_dir __cdist_out_object_dir="$1"; shift From 69fc63df1e99309111b870a7239abf49cc94ba4c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 02:44:31 +0100 Subject: [PATCH 0837/6109] export __target_user to non-core Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 ++ bin/cdist-deploy-to | 1 + doc/dev/todo/post-1.3 | 4 ++-- doc/man/cdist-reference.text.sh | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 23b24025..676a743c 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -63,6 +63,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_require:=require} : ${__cdist_name_singleton:=singleton} : ${__cdist_name_target_host:=target_host} +: ${__cdist_name_target_user:=target_user} : ${__cdist_name_type:=type} : ${__cdist_name_type_bin:=type_bin} : ${__cdist_name_type_explorer:=type_explorer} @@ -82,6 +83,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_var_global:=__$__cdist_name_global} : ${__cdist_name_var_manifest:=__$__cdist_name_manifest} : ${__cdist_name_var_target_host:=__$__cdist_name_target_host} +: ${__cdist_name_var_target_user:=__$__cdist_name_target_user} : ${__cdist_name_var_object:=__$__cdist_name_object} : ${__cdist_name_var_object_id:=__$__cdist_name_object_id} : ${__cdist_name_var_type:=__$__cdist_name_type} diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 551575c3..a288b189 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -29,6 +29,7 @@ __cdist_target_host="$1" # Make target host available for non-core export $__cdist_name_var_target_host="$__cdist_target_host" +export $__cdist_name_var_target_user="$__cdist_remote_user" # Export variables for core, which others do not reset export __cdist_local_base_dir diff --git a/doc/dev/todo/post-1.3 b/doc/dev/todo/post-1.3 index 61adacc7..3a23d44d 100644 --- a/doc/dev/todo/post-1.3 +++ b/doc/dev/todo/post-1.3 @@ -1,9 +1,10 @@ Core: - write test case: test.sh + - doc/man/cdist-reference.text.sh: use static version from cdist-config - export remote user name -> $__user Types to be written/extended: - - __ssh-keys (host/user) + j __ssh-keys (host/user) - __service - __file_edit - regexp replace (can probably cover all?) @@ -19,5 +20,4 @@ Documentation: - cdist-trigger after first run from /var/lib/cdist/out/bin? - Different environments (production, integration, development) - via version control - - Check all references in manpages, ensure all manpages exist - Ensure html output of manpages are published on the web diff --git a/doc/man/cdist-reference.text.sh b/doc/man/cdist-reference.text.sh index 8fdd831c..2c1f03c7 100755 --- a/doc/man/cdist-reference.text.sh +++ b/doc/man/cdist-reference.text.sh @@ -169,6 +169,9 @@ __object_id:: __target_host:: The host we are deploying to. Available for: initial manifest, type manifest, type codegen +__target_user:: + User to use for authentication on remote host. + Currently static in core. __type:: Path to the current type. Available for: type manifest From 72da7351c89ca48bea7a6d1c9d52ba63e2f4a3ba Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 02:48:15 +0100 Subject: [PATCH 0838/6109] remove pull idea until we need it Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.3 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/doc/dev/todo/post-1.3 b/doc/dev/todo/post-1.3 index 3a23d44d..a762737e 100644 --- a/doc/dev/todo/post-1.3 +++ b/doc/dev/todo/post-1.3 @@ -1,7 +1,5 @@ Core: - write test case: test.sh - - doc/man/cdist-reference.text.sh: use static version from cdist-config - - export remote user name -> $__user Types to be written/extended: j __ssh-keys (host/user) @@ -9,15 +7,12 @@ Types to be written/extended: - __file_edit - regexp replace (can probably cover all?) - __cron - - __issue: add --source Documentation: - Describe Multi master setups - use ssh with master socket? - saves connection delay for new connections: -M - hint: http://protempore.net/~calvins/howto/ssh-connection-sharing/ - - Describe pull architecture and requirements - - cdist-trigger after first run from /var/lib/cdist/out/bin? - Different environments (production, integration, development) - via version control - Ensure html output of manpages are published on the web From 4c5b6077a774643f24b02338b71f775025cb0c31 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 02:57:49 +0100 Subject: [PATCH 0839/6109] remove version information from the reference (redundant) Signed-off-by: Nico Schottelius --- doc/man/cdist-reference.text.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/cdist-reference.text.sh b/doc/man/cdist-reference.text.sh index 2c1f03c7..f6840880 100755 --- a/doc/man/cdist-reference.text.sh +++ b/doc/man/cdist-reference.text.sh @@ -40,7 +40,7 @@ Nico Schottelius NAME ---- -cdist-reference - Variable, path and type reference for cdist $(git describe) +cdist-reference - Variable, path and type reference for cdist DESCRIPTION From 14d6fccd0581592c2f81cb0eef929329896f1315 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 03:23:13 +0100 Subject: [PATCH 0840/6109] begin html generation of manpages Signed-off-by: Nico Schottelius --- .gitignore | 6 ++++++ Makefile | 17 +++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index d7c6f7c2..fdf9184f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,10 @@ doc/man/*.[1-9] doc/man/.marker doc/man/man*/ + +doc/html + conf/type/*/*.7 +conf/type/*/man.html + + diff --git a/Makefile b/Makefile index 5cc89547..c06adfc4 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,11 @@ PREFIX=/usr BINDIR=$(PREFIX)/bin MANDIR=$(PREFIX)/share/man -A2X=a2x -f manpage --no-xmllint + +# Manpage and HTML +A2XM=a2x -f manpage --no-xmllint +# A2XH=a2x -f xhtml --no-xmllint +A2XH=asciidoc -b xhtml11 # Developer only WEBDIR=$$HOME/niconetz @@ -60,11 +64,11 @@ doc/man/.marker: $(MANDIR)/cdist-reference.text # Manual from core mancore: $(MANSRC) - for mansrc in $^; do $(A2X) $$mansrc; done + for mansrc in $^; do $(A2XM) $$mansrc; $(A2XH) $$mansrc; done # Manuals from types mantype: - for man in conf/type/*/man.text; do $(A2X) $$man; done + for man in conf/type/*/man.text; do $(A2XM) $$man; $(A2XH) $$man; done # Move into manpath directories manmove: mantype mancore @@ -74,16 +78,21 @@ manmove: mantype mancore mkdir -p $$mandir; \ mv $$manpage $$mandir; \ done + mkdir -p doc/html + mv doc/man/*.html doc/html + mv conf/type/*/man # 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 + $(A2XM) $(MANDIR)/cdist-reference.text + $(A2XH) $(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) + rm -f conf/type/*/man.html conf/type/*/docbook-xsl.css ################################################################################ # Developer targets From bd939567ad4b88bd7c81c74dad79f6eddf620321 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 03:25:46 +0100 Subject: [PATCH 0841/6109] fix manpage cdist-code-run Signed-off-by: Nico Schottelius --- doc/man/cdist-code-run.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/cdist-code-run.text b/doc/man/cdist-code-run.text index f412f6da..e5d8c976 100644 --- a/doc/man/cdist-code-run.text +++ b/doc/man/cdist-code-run.text @@ -1,5 +1,5 @@ cdist-code-run(1) -============================ +================= Nico Schottelius From 8722c03c1246e48c5f2884954d9f049bc20b5b82 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 22:41:22 +0100 Subject: [PATCH 0842/6109] work on html output of manpages Signed-off-by: Nico Schottelius --- Makefile | 8 ++++++-- doc/dev/todo/niconext | 1 + doc/dev/todo/post-1.3 | 1 - 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c06adfc4..6f1b08a7 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,11 @@ manmove: mantype mancore done mkdir -p doc/html mv doc/man/*.html doc/html - mv conf/type/*/man + + for mantype in conf/type/*/man.html; do \ + mannew=$$(echo $$mantype | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;');\ + mv $$mantype doc/html/$$mannew; \ + done # Reference depends on conf/type/*/man.text - HOWTO with posix make? $(MANDIR)/cdist-reference.text: manmove $(MANDIR)/cdist-reference.text.sh @@ -92,7 +96,7 @@ $(MANDIR)/cdist-reference.text: manmove $(MANDIR)/cdist-reference.text.sh clean: rm -rf doc/man/*.html doc/man/*.[1-9] doc/man/man[1-9] $(MANGENERATED) - rm -f conf/type/*/man.html conf/type/*/docbook-xsl.css + rm -f conf/type/*/man.html ################################################################################ # Developer targets diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index e69de29b..107023dd 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -0,0 +1 @@ + - Ensure html output of manpages are published on the web diff --git a/doc/dev/todo/post-1.3 b/doc/dev/todo/post-1.3 index a762737e..4988504b 100644 --- a/doc/dev/todo/post-1.3 +++ b/doc/dev/todo/post-1.3 @@ -15,4 +15,3 @@ Documentation: - hint: http://protempore.net/~calvins/howto/ssh-connection-sharing/ - Different environments (production, integration, development) - via version control - - Ensure html output of manpages are published on the web From be3080b24766f7a956f5eb35bc222244e278b584 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 20 Mar 2011 22:42:00 +0100 Subject: [PATCH 0843/6109] __cdist_exit_err, not __exit_err Signed-off-by: Nico Schottelius --- bin/cdist-code-run-all | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-code-run-all b/bin/cdist-code-run-all index b8a17430..3a360715 100755 --- a/bin/cdist-code-run-all +++ b/bin/cdist-code-run-all @@ -40,11 +40,11 @@ while [ $# -ge 1 ]; do # Code local cdist-code-run "$__cdist_out_object_dir" "$object" \ "${__cdist_name_gencode_local}" \ - || __exit_err "Remote code failed for $object" + || __cdist_exit_err "Remote code failed for $object" # Code remote cdist-run-remote "$__cdist_target_host" "cdist-code-run" \ "${__cdist_remote_out_object_base_dir}" "$object" \ "${__cdist_name_gencode_remote}" \ - || __exit_err "Remote code failed for $object" + || __cdist_exit_err "Remote code failed for $object" done < "$__cdist_tmp_file" From 5c9f85fd269cb47a826eae3e0be1548f0dab3e74 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 08:30:25 +0100 Subject: [PATCH 0844/6109] more todo Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/dev/todo/post-1.3 b/doc/dev/todo/post-1.3 index 4988504b..bf65d2cf 100644 --- a/doc/dev/todo/post-1.3 +++ b/doc/dev/todo/post-1.3 @@ -1,5 +1,6 @@ Core: - - write test case: test.sh + - think about using .cdist for meta information? + - otherwise: parameter, gencode-local, etc. are not valid object id stuff Types to be written/extended: j __ssh-keys (host/user) From 0d39da6a2bec856a0c9413b47d0ff9390d9d803e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 08:31:32 +0100 Subject: [PATCH 0845/6109] output dependencies to the user Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index fcfbe60f..063afd92 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -110,4 +110,5 @@ fi set +u for requirement in $require; do echo $requirement >> "$(__cdist_object_require "$__cdist_object")" + echo Recording: $__cdist_object requires $requirement done From 0f2eeda8387b6424c1963684d167d4cdaf4d27a8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 08:35:25 +0100 Subject: [PATCH 0846/6109] include move of requirements and make move a loop Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 050e4850..80cd47be 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -98,17 +98,18 @@ while [ "$__cdist_new_objects_created" = "y" ]; do mv "${__cdist_new_object_dir}/${__cdist_name_object_source}" \ "$__cdist_object_dir" - # Parameter - if [ -d "${__cdist_new_object_dir}/${__cdist_name_parameter}" ]; then - mv "${__cdist_new_object_dir}/${__cdist_name_parameter}" \ - "$__cdist_object_dir" - fi - - # Explorer - if [ -d "${__cdist_new_object_dir}/${__cdist_name_explorer}" ]; then - mv "${__cdist_new_object_dir}/${__cdist_name_explorer}" \ - "$__cdist_object_dir" - fi + # Explorer, Parameter, Require + for __cdist_object_file in \ + ${__cdist_name_explorer} \ + ${__cdist_name_parameter} \ + ${__cdist_name_require} \ + ; do + + if [ -e "${__cdist_new_object_dir}/${__cdist_name_parameter}" ]; then + mv "${__cdist_new_object_dir}/${__cdist_object_file}" \ + "$__cdist_object_dir" + fi + done done < "$__cdist_new_objects_list" # Remove listing and objects, otherwise the next type will reuse it... From 6f02112aeb8985d9486731c4f71c9a67357c37b9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 08:46:54 +0100 Subject: [PATCH 0847/6109] check for correct entry on move, not parameter ;-) Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 80cd47be..884f46ee 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -105,7 +105,7 @@ while [ "$__cdist_new_objects_created" = "y" ]; do ${__cdist_name_require} \ ; do - if [ -e "${__cdist_new_object_dir}/${__cdist_name_parameter}" ]; then + if [ -e "${__cdist_new_object_dir}/${__cdist_object_file}" ]; then mv "${__cdist_new_object_dir}/${__cdist_object_file}" \ "$__cdist_object_dir" fi From c0705c1efd62323894c18cbecb5f3c897431f312 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 08:54:12 +0100 Subject: [PATCH 0848/6109] update documentation for __issue Signed-off-by: Nico Schottelius --- conf/type/__issue/man.text | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/conf/type/__issue/man.text b/conf/type/__issue/man.text index 18d88947..40ed920e 100644 --- a/conf/type/__issue/man.text +++ b/conf/type/__issue/man.text @@ -20,13 +20,19 @@ None. OPTIONAL PARAMETERS ------------------- -None +source:: + If supplied, use this file as /etc/issue instead of default. + + EXAMPLES -------- -------------------------------------------------------------------------------- __issue + +# When called from another type +__issue --source "$__type/files/myfancyissue" -------------------------------------------------------------------------------- From c0e21136436b94065b8199ef8deabc3cdedf764e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 08:59:04 +0100 Subject: [PATCH 0849/6109] update files for 1.3.1 Signed-off-by: Nico Schottelius --- README | 4 ++-- bin/cdist-config | 2 +- doc/changelog | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README b/README index 6e46db87..c0ecbbbf 100644 --- a/README +++ b/README @@ -129,8 +129,8 @@ may vanish at any point. To select a specific branch use # Generic code git checkout -b origin/ - # Stay on version 1.1 - git checkout -b 1.2 origin/1.2 + # Stay on a specific version + git checkout -b 1.3 origin/1.3 ### Mirrors diff --git a/bin/cdist-config b/bin/cdist-config index 676a743c..6a2c1d90 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -19,7 +19,7 @@ # # -__cdist_version="1.3.0" +__cdist_version="1.3.1" # Fail if something bogus is going on set -u diff --git a/doc/changelog b/doc/changelog index f386faf1..df18aa43 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,8 +1,9 @@ -1.3.1: +1.3.1: 2011-03-21 * Document cdist-type-build-emulation * Document cdist-type-emulator * Document cdist-remote-explorer-run * Fix dependencies in cdist-code-run + * Fix dependencies in cdist-manifest-run-all * Add --source to __issue and fix os check 1.3.0: 2011-03-20 From 240b4aebbc5ff01c4fdc10aed5c33ca0e433d320 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 09:14:42 +0100 Subject: [PATCH 0850/6109] begin to add --preseed to __package_apt Signed-off-by: Nico Schottelius --- conf/type/__package_apt/parameter/optional | 1 + doc/dev/todo/niconext | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/conf/type/__package_apt/parameter/optional b/conf/type/__package_apt/parameter/optional index a52167d3..2dae648e 100644 --- a/conf/type/__package_apt/parameter/optional +++ b/conf/type/__package_apt/parameter/optional @@ -1,2 +1,3 @@ name +preseed version diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 107023dd..4751c54a 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1 +1,2 @@ - - Ensure html output of manpages are published on the web +- add --preseed to __package_apt +- Ensure html output of manpages are published on the web From 1a4fd4854ca8094dbfb890211cfef1c92b5681bc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 09:30:42 +0100 Subject: [PATCH 0851/6109] __motd now supports --source as well Signed-off-by: Nico Schottelius --- conf/type/__motd/manifest | 2 +- conf/type/__motd/parameter/optional | 1 + doc/changelog | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 conf/type/__motd/parameter/optional diff --git a/conf/type/__motd/manifest b/conf/type/__motd/manifest index 4716f530..286d1ff3 100755 --- a/conf/type/__motd/manifest +++ b/conf/type/__motd/manifest @@ -26,7 +26,7 @@ else source="$__type/files/motd" fi -os=$(cat $__global/explorer/os) +os=$(cat "$__global/explorer/os") case "$os" in diff --git a/conf/type/__motd/parameter/optional b/conf/type/__motd/parameter/optional new file mode 100644 index 00000000..5a18cd2f --- /dev/null +++ b/conf/type/__motd/parameter/optional @@ -0,0 +1 @@ +source diff --git a/doc/changelog b/doc/changelog index df18aa43..2c2aec57 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,3 +1,6 @@ +1.3.2: + * Add --source to __motd + 1.3.1: 2011-03-21 * Document cdist-type-build-emulation * Document cdist-type-emulator From 3927da66b64688ad7b25245853d1012c2b8fce80 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 09:44:14 +0100 Subject: [PATCH 0852/6109] update __directory documentation Signed-off-by: Nico Schottelius --- conf/type/__directory/man.text | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/conf/type/__directory/man.text b/conf/type/__directory/man.text index f7272df9..02a41754 100644 --- a/conf/type/__directory/man.text +++ b/conf/type/__directory/man.text @@ -30,7 +30,7 @@ owner:: User to chown to. parents:: - Whether to create parents as well (mkdir -p behaviour) + Whether to create parents as well (mkdir -p behaviour). Must be yes or no. EXAMPLES @@ -41,7 +41,10 @@ EXAMPLES __directory /tmp/foobar # Ensure /etc exists correctly -__file /etc --owner root --group root --mode 0755 +__directory /etc --owner root --group root --mode 0755 + +# Create nfs service directory, including parents +__directory /home/services/nfs --parents yes -------------------------------------------------------------------------------- From 4ff794b11ab4085df262312ca54e6bfd0ddc1d13 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 10:07:38 +0100 Subject: [PATCH 0853/6109] __file now supports --preseed (including the documentation) Signed-off-by: Nico Schottelius --- conf/type/__package_apt/gencode-remote | 8 +++++++- conf/type/__package_apt/man.text | 6 ++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/conf/type/__package_apt/gencode-remote b/conf/type/__package_apt/gencode-remote index 370f0102..b2c7179d 100755 --- a/conf/type/__package_apt/gencode-remote +++ b/conf/type/__package_apt/gencode-remote @@ -27,8 +27,14 @@ else name="$__object_id" fi -state="$(cat "$__object/parameter/state")" +# Check for preseeding and add preseed as here document +if [ -f "$__object/parameter/preseed" ]; then + echo "debconf-set-selections << __file-eof" + cat "$(cat "$__object/parameter/preseed")" + echo "__file-eof" +fi +state="$(cat "$__object/parameter/state")" is_installed="$(grep "^Status: install ok installed" "$__object/explorer/pkg_status" || true)" case "$state" in diff --git a/conf/type/__package_apt/man.text b/conf/type/__package_apt/man.text index 0780124d..8b7476b4 100644 --- a/conf/type/__package_apt/man.text +++ b/conf/type/__package_apt/man.text @@ -25,6 +25,9 @@ OPTIONAL PARAMETERS name:: If supplied, use the name and not the object id as the package name. +preseed:: + If supplied, use the given filename as input for debconf-set-selections(1) + EXAMPLES -------- @@ -36,6 +39,9 @@ __package_apt zsh --state installed # In case you only want *a* webserver, but don't care which one __package_apt webserver --state installed --name nginx +# Install package with defaults (from a type) +__package_apt postfix --state installed --preseed "$__type/files/postfix-seed" + # Remove obsolete package __package_apt puppet --state deinstalled -------------------------------------------------------------------------------- From 3f39c809b0cd7be1481ac4ad9197c996cb632042 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 10:08:15 +0100 Subject: [PATCH 0854/6109] more stuff for 1.3.2 Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index 2c2aec57..6f7db0bf 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,5 +1,6 @@ 1.3.2: * Add --source to __motd + * Add --preseed to __package_apt 1.3.1: 2011-03-21 * Document cdist-type-build-emulation From 30c2b017d42c868582e70bb0af2af84b7d4ac65f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 12:24:42 +0100 Subject: [PATCH 0855/6109] also name source of object when running type manifests Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 8 ++++++-- doc/changelog | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index 884f46ee..fe8263ea 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -78,8 +78,12 @@ while [ "$__cdist_new_objects_created" = "y" ]; do # Verify no conflicting objects have been created while read __cdist_new_object; do - grep -q "^$__cdist_new_object\$" "$__cdist_objects_list" && \ - __cdist_exit_err "${__cdist_manifest}: Tried to recreate ${__cdist_new_object}" + __cdist_object_found=$(grep "^$__cdist_new_object\$" "$__cdist_objects_list" || true) + + if [ "$__cdist_object_found" ]; then + __cdist_object_source="$(cat "$(__cdist_object_dir "$__cdist_new_object")/${__cdist_name_object_source}")" + __cdist_exit_err "${__cdist_manifest}: ${__cdist_new_object} already exists (source: $__cdist_object_source)" + fi done < "$__cdist_new_objects_list" # Safe harbour: We can merge all objects into main tree diff --git a/doc/changelog b/doc/changelog index 6f7db0bf..4b985c30 100644 --- a/doc/changelog +++ b/doc/changelog @@ -15,7 +15,6 @@ * Bugfix: Remove obsolete $@ call in cdist-remote-explorer-run * Bugfix: Correct manpage for __removeline (broke manpage generation) - 1.2.0: 2011-03-19 * Added dependencies (see cdist-type(7)) * New type __removeline (Daniel Roth) From 87cc5c2bbf289001a064d71a2ab25821f878db00 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 13:31:00 +0100 Subject: [PATCH 0856/6109] claenup cdist-quickstart Signed-off-by: Nico Schottelius --- doc/man/cdist-quickstart.text | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/doc/man/cdist-quickstart.text b/doc/man/cdist-quickstart.text index ddcbbccc..087fd2d5 100644 --- a/doc/man/cdist-quickstart.text +++ b/doc/man/cdist-quickstart.text @@ -20,10 +20,8 @@ of the first tools you use when you begin with cdist. EXAMPLES -------- - -To use cdist-quickstart, add the bin directory to your PATH, -execute cdist-quickstart and enjoy cdist: - +To use cdist-quickstart, add the bin directory to your PATH, execute +cdist-quickstart and enjoy cdist: -------------------------------------------------------------------------------- # Bourne shell example @@ -37,7 +35,6 @@ cdist-quickstart -------------------------------------------------------------------------------- - SEE ALSO -------- - cdist(7) @@ -48,4 +45,3 @@ COPYING ------- Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is granted under the terms of the GNU General Public License version 3 (GPLv3). -## How to use cdist? From 4553333ddbec68bb8c4c5f65438485ea918235f6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 13:48:40 +0100 Subject: [PATCH 0857/6109] Begin to include html version of manpages Signed-off-by: Nico Schottelius --- Makefile | 14 +++++++++----- README | 9 +++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 6f1b08a7..7f975c92 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,8 @@ A2XM=a2x -f manpage --no-xmllint A2XH=asciidoc -b xhtml11 # Developer only -WEBDIR=$$HOME/niconetz -WEBPAGE=software/cdist.mdwn +WEBPAGEBASE=$$HOME/niconetz/software/cdist +WEBPAGE=$(WEBPAGEBASE).mdwn # Documentation MANDIR=doc/man @@ -52,7 +52,7 @@ all: @echo '' @echo 'Here are the possible targets:' @echo '' - @echo ' man: Build manpages (requires Asciidoc (a2x binary))' + @echo ' man: Build manpages (requires Asciidoc)' @echo ' clean: Remove build stuff' @echo '' @echo '' @@ -97,6 +97,7 @@ $(MANDIR)/cdist-reference.text: manmove $(MANDIR)/cdist-reference.text.sh clean: rm -rf doc/man/*.html doc/man/*.[1-9] doc/man/man[1-9] $(MANGENERATED) rm -f conf/type/*/man.html + rm -rf doc/html ################################################################################ # Developer targets @@ -110,9 +111,12 @@ test: # gentoo .rsync nicosc@ru3.inf.ethz.ch:cdist +#web: manmove web: - cp README $(WEBDIR)/$(WEBPAGE) - cd $(WEBDIR) && git commit -m "cdist update" $(WEBPAGE) + cp README $(WEBPAGE) + cp -r doc/html/* $(WEBPAGEBASE)/man + exit 1 + cd $(WEBDIR) && git commit -m "cdist update" $(WEBPAGEBASE) cd $(WEBDIR) && make pub pub: diff --git a/README b/README index c0ecbbbf..2aab45c1 100644 --- a/README +++ b/README @@ -37,6 +37,11 @@ it ticks differently: * cdist is written in POSIX shell * No special requirements like high level interpreters needed on server or target +### Documentation + +The cdist documentation is included as manpages in the distribution. +You can [browse them online](man) as well. + ### Architecture * Push mode (server pushes configuration) @@ -151,6 +156,10 @@ If you stay on a version branche (i.e. 1.0, 1.1., ...), nothing should break. The master branch on the other hand is the development branch and may not be working, break your setup or eat the tree in your garden. +### Upgrading from 1.2 to 1.3 + +Rename **gencode** of every type to **gencode-remote**. + ### Upgrading from 1.1 to 1.2 No incompatiblities. From b36f2fb28253ee15de90db81fc2427b1f11f4b4b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 13:48:58 +0100 Subject: [PATCH 0858/6109] -exit(1) Signed-off-by: Nico Schottelius --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 7f975c92..853feea1 100644 --- a/Makefile +++ b/Makefile @@ -115,7 +115,6 @@ test: web: cp README $(WEBPAGE) cp -r doc/html/* $(WEBPAGEBASE)/man - exit 1 cd $(WEBDIR) && git commit -m "cdist update" $(WEBPAGEBASE) cd $(WEBDIR) && make pub From f4dc8b28af97a15ec21a74ebfc02e0d1addecd6f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 14:00:00 +0100 Subject: [PATCH 0859/6109] fix webbpage copy Signed-off-by: Nico Schottelius --- Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 853feea1..45407702 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,10 @@ A2XM=a2x -f manpage --no-xmllint A2XH=asciidoc -b xhtml11 # Developer only -WEBPAGEBASE=$$HOME/niconetz/software/cdist -WEBPAGE=$(WEBPAGEBASE).mdwn +WEBDIR=$$HOME/niconetz +WEBBASE=software/cdist +WEBPAGE=$(WEBBASE).mdwn + # Documentation MANDIR=doc/man @@ -113,9 +115,9 @@ test: #web: manmove web: - cp README $(WEBPAGE) - cp -r doc/html/* $(WEBPAGEBASE)/man - cd $(WEBDIR) && git commit -m "cdist update" $(WEBPAGEBASE) + cp README $(WEBDIR)/$(WEBPAGE) + cp -r doc/html/* $(WEBDIR)/$(WEBBASE)/man + cd $(WEBDIR) && git commit -m "cdist update" $(WEBBASE) $(WEBPAGE) cd $(WEBDIR) && make pub pub: From 556cb574ca8a94beaf9440736c6ad49158132177 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 14:04:26 +0100 Subject: [PATCH 0860/6109] update todos Signed-off-by: Nico Schottelius --- doc/changelog | 1 + doc/dev/todo/post-1.3 | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/changelog b/doc/changelog index 4b985c30..6f7cac71 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,6 +1,7 @@ 1.3.2: * Add --source to __motd * Add --preseed to __package_apt + * Include HTML documentation of manpages 1.3.1: 2011-03-21 * Document cdist-type-build-emulation diff --git a/doc/dev/todo/post-1.3 b/doc/dev/todo/post-1.3 index bf65d2cf..a798114a 100644 --- a/doc/dev/todo/post-1.3 +++ b/doc/dev/todo/post-1.3 @@ -3,13 +3,13 @@ Core: - otherwise: parameter, gencode-local, etc. are not valid object id stuff Types to be written/extended: - j __ssh-keys (host/user) + - __ssh-keys (host/user) - __service - __file_edit - regexp replace (can probably cover all?) - __cron -Documentation: +Further Documentation: (probably cdist-best-practises?) - Describe Multi master setups - use ssh with master socket? - saves connection delay for new connections: -M From bbf762a4d95f0f48cdd79b2c861552647f8ee955 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 14:05:17 +0100 Subject: [PATCH 0861/6109] more todo for nico Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 9 +++++++-- doc/dev/todo/post-1.3 | 8 -------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 4751c54a..fd604139 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,2 +1,7 @@ -- add --preseed to __package_apt -- Ensure html output of manpages are published on the web +Further Documentation: (probably cdist-best-practises?) + - Describe Multi master setups + - use ssh with master socket? + - saves connection delay for new connections: -M + - hint: http://protempore.net/~calvins/howto/ssh-connection-sharing/ + - Different environments (production, integration, development) + - via version control diff --git a/doc/dev/todo/post-1.3 b/doc/dev/todo/post-1.3 index a798114a..284b56b4 100644 --- a/doc/dev/todo/post-1.3 +++ b/doc/dev/todo/post-1.3 @@ -8,11 +8,3 @@ Types to be written/extended: - __file_edit - regexp replace (can probably cover all?) - __cron - -Further Documentation: (probably cdist-best-practises?) - - Describe Multi master setups - - use ssh with master socket? - - saves connection delay for new connections: -M - - hint: http://protempore.net/~calvins/howto/ssh-connection-sharing/ - - Different environments (production, integration, development) - - via version control From cccd9b32837d43da2557e43c9b9932d52c9f825b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 14:07:17 +0100 Subject: [PATCH 0862/6109] add hint on html documentation version Signed-off-by: Nico Schottelius --- README | 2 +- doc/changelog | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README b/README index 2aab45c1..211f1073 100644 --- a/README +++ b/README @@ -40,7 +40,7 @@ it ticks differently: ### Documentation The cdist documentation is included as manpages in the distribution. -You can [browse them online](man) as well. +You can [browse the documentation for the latest version online](man) as well. ### Architecture diff --git a/doc/changelog b/doc/changelog index 6f7cac71..5b6b03a9 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,7 +1,7 @@ -1.3.2: +1.3.2: 2011-03-21 * Add --source to __motd * Add --preseed to __package_apt - * Include HTML documentation of manpages + * Include HTML documentation of manpages and publish them 1.3.1: 2011-03-21 * Document cdist-type-build-emulation From b41c1f764928d1b0b8212266a891865cb877a7b4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 14:11:24 +0100 Subject: [PATCH 0863/6109] upgrade to 1.3.2 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 6a2c1d90..946c88b4 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -19,7 +19,7 @@ # # -__cdist_version="1.3.1" +__cdist_version="1.3.2" # Fail if something bogus is going on set -u From e163a2baec715faf0abb1c70e6d232a71a8b2436 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 14:19:07 +0100 Subject: [PATCH 0864/6109] begin to write cdist-best-practise Signed-off-by: Nico Schottelius --- Makefile | 5 +++-- doc/dev/todo/niconext | 6 +++--- doc/man/cdist-best-practise.text | 23 +++++++++++++++++++++++ 3 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 doc/man/cdist-best-practise.text diff --git a/Makefile b/Makefile index 45407702..29d86c67 100644 --- a/Makefile +++ b/Makefile @@ -19,8 +19,9 @@ MANDIR=doc/man MANGENERATED=$(MANDIR)/cdist-reference.text MANSRC=$(MANDIR)/cdist.text \ - $(MANDIR)/cdist-code-run-all.text \ + $(MANDIR)/cdist-best-practise.text \ $(MANDIR)/cdist-code-run.text \ + $(MANDIR)/cdist-code-run-all.text \ $(MANDIR)/cdist-config.text \ $(MANDIR)/cdist-dir.text \ $(MANDIR)/cdist-env.text \ @@ -29,8 +30,8 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-explorer.text \ $(MANDIR)/cdist-manifest.text \ $(MANDIR)/cdist-manifest-run.text \ - $(MANDIR)/cdist-manifest-run-init.text \ $(MANDIR)/cdist-manifest-run-all.text \ + $(MANDIR)/cdist-manifest-run-init.text \ $(MANDIR)/cdist-object-explorer-all.text \ $(MANDIR)/cdist-object-gencode.text \ $(MANDIR)/cdist-object-gencode-all.text \ diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index fd604139..fe7125b5 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,6 +1,6 @@ -Further Documentation: (probably cdist-best-practises?) - - Describe Multi master setups - - use ssh with master socket? +Write cdist-best-practise: + - Multi master setups + - ssh with master socket? - saves connection delay for new connections: -M - hint: http://protempore.net/~calvins/howto/ssh-connection-sharing/ - Different environments (production, integration, development) diff --git a/doc/man/cdist-best-practise.text b/doc/man/cdist-best-practise.text new file mode 100644 index 00000000..159da51d --- /dev/null +++ b/doc/man/cdist-best-practise.text @@ -0,0 +1,23 @@ +cdist-best-practise(1) +====================== +Nico Schottelius + +NAME +---- +cdist-best-practise - Practises used in real environments + + +TOPIC1 +------ + + + +SEE ALSO +-------- +- cdist(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). From 3599eeb42ba1bbd2627caaba1eed7542620bccbb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 14:27:23 +0100 Subject: [PATCH 0865/6109] add link and some content to cdist-best-practise Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 3 --- doc/man/cdist-best-practise.text | 26 +++++++++++++++++++++++--- doc/man/cdist.text | 1 + 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index fe7125b5..d4fe1ae4 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,7 +1,4 @@ Write cdist-best-practise: - Multi master setups - - ssh with master socket? - - saves connection delay for new connections: -M - - hint: http://protempore.net/~calvins/howto/ssh-connection-sharing/ - Different environments (production, integration, development) - via version control diff --git a/doc/man/cdist-best-practise.text b/doc/man/cdist-best-practise.text index 159da51d..4d4b8edb 100644 --- a/doc/man/cdist-best-practise.text +++ b/doc/man/cdist-best-practise.text @@ -1,4 +1,4 @@ -cdist-best-practise(1) +cdist-best-practise(7) ====================== Nico Schottelius @@ -7,8 +7,28 @@ NAME cdist-best-practise - Practises used in real environments -TOPIC1 ------- +PASSWORDLESS CONNECTIONS +------------------------ +It is recommended to run cdist with public key authentication. +This requires a private/public key pair and the entry +"PermitRootLogin without-password" in the sshd server. +See sshd_config(5) and ssh-keygen(1). + + +SPEEDING UP SSH CONNECTIONS +--------------------------- +When connecting to a new host, the initial delay with ssh connections +is pretty big. You can work around this by +"sharing of multiple sessions over a single network connection" +(quote from ssh_config(5)). The following code is suitable for +inclusion into your ~/.ssh/config: + +-------------------------------------------------------------------------------- +Host * + ControlPath ~/.ssh/master-%l-%r@%h:%p + ControlMaster auto + ControlPersist 10 +-------------------------------------------------------------------------------- diff --git a/doc/man/cdist.text b/doc/man/cdist.text index 570b6b95..957e7cb4 100644 --- a/doc/man/cdist.text +++ b/doc/man/cdist.text @@ -30,6 +30,7 @@ pull mechanism (client requests configuration). SEE ALSO -------- - Website: http://www.nico.schottelius.org/cdist/[] +- cdist-best-practise(7) - cdist-deploy-to(1) - cdist-manifest(7) - cdist-quickstart(1) From 70f2d1040fc6d3bc286cbc06a8bfd733217d09cd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 14:38:53 +0100 Subject: [PATCH 0866/6109] document multi-master and multi-environment workflow Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 4 ---- doc/man/cdist-best-practise.text | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index d4fe1ae4..e69de29b 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,4 +0,0 @@ -Write cdist-best-practise: - - Multi master setups - - Different environments (production, integration, development) - - via version control diff --git a/doc/man/cdist-best-practise.text b/doc/man/cdist-best-practise.text index 4d4b8edb..af06084e 100644 --- a/doc/man/cdist-best-practise.text +++ b/doc/man/cdist-best-practise.text @@ -31,6 +31,36 @@ Host * -------------------------------------------------------------------------------- +MULTI MASTER OR ENVIRONMENT SETUPS +---------------------------------- +If you plan to distribute cdist among servers or use different +environments, you can do so easily with the included version +control git. For instance if you plan to use the typical three +environments production, integration and development, you can +realise this with git branches: + +-------------------------------------------------------------------------------- +# Go to cdist checkout +cd /path/to/cdist + +# Create branches +git branch development +git branch integration +git branch production + +# Make use of a branch, for instance production +git checkout production +-------------------------------------------------------------------------------- + +Similar if you want to have cdist checked out at multiple machines, +you can clone it multiple times: + +-------------------------------------------------------------------------------- +machine-a % git clone git://your-git-server/cdist +machine-b % git clone git://your-git-server/cdist +-------------------------------------------------------------------------------- + + SEE ALSO -------- From 9ae1026dc497a4b0cab6bcf8628bc21bafdf7437 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 14:46:15 +0100 Subject: [PATCH 0867/6109] update todos - WARNING: TODO IS almost EMPTY Signed-off-by: Nico Schottelius --- doc/dev/todo/cache | 18 ------------------ doc/dev/todo/daninext | 0 doc/dev/todo/niconext | 2 ++ doc/dev/todo/post-1.3 | 22 +++++++++++++++++++--- 4 files changed, 21 insertions(+), 21 deletions(-) delete mode 100644 doc/dev/todo/cache delete mode 100644 doc/dev/todo/daninext diff --git a/doc/dev/todo/cache b/doc/dev/todo/cache deleted file mode 100644 index b513e340..00000000 --- a/doc/dev/todo/cache +++ /dev/null @@ -1,18 +0,0 @@ -Assume you want to configure stuff one host ("monitor node"), -depending on the configuration of other hosts ("cluster nodes"). - -For instance, the monitor host would like to know, -which hosts are configured with the provider -"apache" and option --start true. - -This requires the monitor node to be able to -query all other configured nodes. It can't -ask for all hosts, because cdist does not -know which hosts are configured or may exist. - -Example implementation - -If cdist keeps ("caches") the configuration of every -node it configures, each new node can query the -cache for existing nodes that acquired the given -configuration. diff --git a/doc/dev/todo/daninext b/doc/dev/todo/daninext deleted file mode 100644 index e69de29b..00000000 diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index e69de29b..6179c017 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -0,0 +1,2 @@ +- think about using .cdist for meta information? + - otherwise: parameter, gencode-local, etc. are not valid object id stuff diff --git a/doc/dev/todo/post-1.3 b/doc/dev/todo/post-1.3 index 284b56b4..82a6dd3d 100644 --- a/doc/dev/todo/post-1.3 +++ b/doc/dev/todo/post-1.3 @@ -1,6 +1,22 @@ -Core: - - think about using .cdist for meta information? - - otherwise: parameter, gencode-local, etc. are not valid object id stuff +Cache: + Assume you want to configure stuff one host ("monitor node"), + depending on the configuration of other hosts ("cluster nodes"). + + For instance, the monitor host would like to know, + which hosts are configured with the provider + "apache" and option --start true. + + This requires the monitor node to be able to + query all other configured nodes. It can't + ask for all hosts, because cdist does not + know which hosts are configured or may exist. + + Example implementation + + If cdist keeps ("caches") the configuration of every + node it configures, each new node can query the + cache for existing nodes that acquired the given + configuration. Types to be written/extended: - __ssh-keys (host/user) From 7f3e22239f2464ac831f0247e212496470789d0c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 21 Mar 2011 16:18:04 +0100 Subject: [PATCH 0868/6109] add dot-cdist to cdist-config Signed-off-by: Nico Schottelius --- bin/cdist-config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cdist-config b/bin/cdist-config index 946c88b4..a5eb9485 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -44,6 +44,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_code:=code} : ${__cdist_name_code_finished:=.codedone} : ${__cdist_name_conf_dir:=conf} +: ${__cdist_name_dot_cdist:=.cdist} : ${__cdist_name_explorer:=explorer} : ${__cdist_name_gencode:=gencode} : ${__cdist_name_gencode_local:=local} @@ -231,7 +232,7 @@ __cdist_object_id_from_object() __cdist_object_dir() { - __cdist_object_dir="${__cdist_out_object_dir}/$1" + __cdist_object_dir="${__cdist_out_object_dir}/$1/${__cdist_name_dot_cdist}" echo "$__cdist_object_dir" } From 2007fc17ccb2d960483903a3cf6432bc8529e4c6 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 21 Mar 2011 17:24:09 +0100 Subject: [PATCH 0869/6109] README: users++ Signed-off-by: Steven Armstrong --- README | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README b/README index 211f1073..b637c50f 100644 --- a/README +++ b/README @@ -214,3 +214,9 @@ Yes, I'm actually eating my own dogfood and currently managing with cdist on a total of **5** production machines of the [Systems Group](http://www.systems.ethz.ch) at the [ETH Zurich](http://www.ethz.ch). + +### Steven Armstrong, CBRG ETH Zurich + +The CBRG is managing most of their compute clusters with cdist. + + From 29edf58809d0b2e7ce3c3542005236da3bc05cd2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Mar 2011 00:43:44 +0100 Subject: [PATCH 0870/6109] +commercial support Signed-off-by: Nico Schottelius --- README | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README b/README index b637c50f..f5345fde 100644 --- a/README +++ b/README @@ -187,6 +187,11 @@ 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). +## Commercial support + +You can request commercial support for cdist from +[my company](http://firma.schottelius.org/english/). + ## Used by If you're using cdist, feel free to send a report to the mailing list. From 8a76143e33f46dfabbbd359583a8f4daa3169bbb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Mar 2011 08:29:59 +0100 Subject: [PATCH 0871/6109] shrink cdist env and make it usable for . ./bin/cdist-env (in sh) Signed-off-by: Nico Schottelius --- bin/cdist-env | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/bin/cdist-env b/bin/cdist-env index 3a477e85..2aac5e6b 100755 --- a/bin/cdist-env +++ b/bin/cdist-env @@ -21,23 +21,13 @@ # Setup environment for use with cdist - must be standalone! # -__cdist_pwd="$(pwd -P)" -__cdist_mydir="${0%/*}"; -__cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" -__cdist_myname=${0##*/}; -__cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" +export PATH="$(cd "${0%/*}" && pwd -P):$PATH" +export MANPATH="$(cd "${0%/*}/../doc/man" && pwd -P):$MANPATH" -shell_binary=${SHELL##*/} - -NEWPATH="$__cdist_abs_mydir:$PATH" -cd "$__cdist_abs_mydir/../doc/man" -NEWMANPATH="$(pwd -P):$MANPATH" - -# Match csh, tcsh to handle differently -if [ "$(echo $shell_binary | grep 'csh$')" ]; then - echo setenv PATH $NEWPATH \; - echo setenv MANPATH $NEWMANPATH +if [ "$(echo ${SHELL##*/} | grep 'csh$')" ]; then + echo setenv PATH $PATH \; + echo setenv MANPATH $MANPATH else - echo export PATH=$NEWPATH - echo export MANPATH=$NEWMANPATH + echo export PATH=$PATH + echo export MANPATH=$MANPATH fi From e921986e32f9fb049a4b22f4de925eedfb797a73 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Mar 2011 08:57:19 +0100 Subject: [PATCH 0872/6109] remove double slash in __cdist_object in bin/cdist-type-emulator Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 063afd92..9f272569 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -40,7 +40,13 @@ fi echo "$__cdist_object_id" | grep -q "^${__cdist_sane_regexp}\$" || \ __cdist_usage "Insane object id, ${__cdist_object_id}." -__cdist_object="${__cdist_type}/${__cdist_object_id}" +# Remove double slash if id begins with / +if [ "$(echo $__cdist_object_id | grep "^/")" ]; then + __cdist_object="${__cdist_type}${__cdist_object_id}" +else + __cdist_object="${__cdist_type}/${__cdist_object_id}" +fi + __cdist_ddir="$(__cdist_object_dir "$__cdist_object")" __cdist_parameter_dir="$(__cdist_object_parameter_dir "$__cdist_object")" From e4190c3d0a9d44faef0f4fc17cbc787cf5b4c64a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Mar 2011 09:59:41 +0100 Subject: [PATCH 0873/6109] add --recursive to __directory (man, gencode, parameter, changelog) Signed-off-by: Nico Schottelius --- conf/type/__directory/gencode-remote | 10 ++++++++-- conf/type/__directory/man.text | 8 ++++++++ conf/type/__directory/parameter/optional | 1 + doc/changelog | 3 +++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/conf/type/__directory/gencode-remote b/conf/type/__directory/gencode-remote index 6d226aae..a5458b4b 100755 --- a/conf/type/__directory/gencode-remote +++ b/conf/type/__directory/gencode-remote @@ -36,6 +36,12 @@ if [ -f "$__object/parameter/parents" ]; then fi fi +if [ -f "$__object/parameter/recursive" ]; then + if [ yes = "$(cat "$__object/parameter/recursive")" ]; then + recursive="-R" + fi +fi + # Only create if not already existent if [ no = "$(cat "$__object/explorer/exists")" ]; then echo mkdir $mkdiropt \"$destination\" @@ -48,10 +54,10 @@ fi # Group if [ -f "$__object/parameter/group" ]; then - echo chgrp \"$(cat "$__object/parameter/group")\" \"$destination\" + echo chgrp $recursive \"$(cat "$__object/parameter/group")\" \"$destination\" fi # Owner if [ -f "$__object/parameter/owner" ]; then - echo chown \"$(cat "$__object/parameter/owner")\" \"$destination\" + echo chown $recursive \"$(cat "$__object/parameter/owner")\" \"$destination\" fi diff --git a/conf/type/__directory/man.text b/conf/type/__directory/man.text index 02a41754..8e1484de 100644 --- a/conf/type/__directory/man.text +++ b/conf/type/__directory/man.text @@ -32,6 +32,11 @@ owner:: parents:: Whether to create parents as well (mkdir -p behaviour). Must be yes or no. +recursive:: + If supplied the chgrp and chown call will run recursively. + This does *not* influence the behaviour of chmod. + Must be yes or no. + EXAMPLES -------- @@ -45,6 +50,9 @@ __directory /etc --owner root --group root --mode 0755 # Create nfs service directory, including parents __directory /home/services/nfs --parents yes + +# Change permissions recursively +__directory /home/services --recursive yes --owner root --group root -------------------------------------------------------------------------------- diff --git a/conf/type/__directory/parameter/optional b/conf/type/__directory/parameter/optional index 752c3989..247e2f64 100644 --- a/conf/type/__directory/parameter/optional +++ b/conf/type/__directory/parameter/optional @@ -2,3 +2,4 @@ group mode owner parents +recursive diff --git a/doc/changelog b/doc/changelog index 5b6b03a9..f120e47d 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,3 +1,6 @@ +1.3.3: + * Add --recursive to __directory + 1.3.2: 2011-03-21 * Add --source to __motd * Add --preseed to __package_apt From 6a0a5fb09c98e00c462cb6a2ea581d129b81d0ad Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Mar 2011 12:37:32 +0100 Subject: [PATCH 0874/6109] +private Signed-off-by: Nico Schottelius --- README | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README b/README index f5345fde..e7345a78 100644 --- a/README +++ b/README @@ -202,7 +202,7 @@ Interesting information are for instance * What are the pros/cons you see in cdist? * General comments/critics -### Nico Schottelius, Systems Group ETH Zurich +### Nico Schottelius, Systems Group ETH Zurich and privately Yes, I'm actually eating my own dogfood and currently managing @@ -216,9 +216,9 @@ Yes, I'm actually eating my own dogfood and currently managing * [xfce](http://www.xfce.org/) (lightweight desktop environment) * [slim](http://slim.berlios.de/) (graphical login manager for X11) -with cdist on a total of **5** production machines of the +with cdist on a total of **9** production machines of the [Systems Group](http://www.systems.ethz.ch) at the -[ETH Zurich](http://www.ethz.ch). +[ETH Zurich](http://www.ethz.ch) as well at home. ### Steven Armstrong, CBRG ETH Zurich From 221e0341ae2456cb7457718cf5ab7241113b8ceb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Mar 2011 12:37:40 +0100 Subject: [PATCH 0875/6109] +todo Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.3 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/dev/todo/post-1.3 b/doc/dev/todo/post-1.3 index 82a6dd3d..301dfdb2 100644 --- a/doc/dev/todo/post-1.3 +++ b/doc/dev/todo/post-1.3 @@ -1,3 +1,9 @@ +Core: + - allow redefine object, if everything same + - support $__self = relative_type/object_id + - .cdist + - cache + Cache: Assume you want to configure stuff one host ("monitor node"), depending on the configuration of other hosts ("cluster nodes"). @@ -23,4 +29,5 @@ Types to be written/extended: - __service - __file_edit - regexp replace (can probably cover all?) + -> aka sed. - __cron From 0c593f5c5beada213ee7cbe7e106e495ca76bab6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 22 Mar 2011 16:48:02 +0100 Subject: [PATCH 0876/6109] -created in text 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 a288b189..9a2fd303 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -53,7 +53,7 @@ cdist-manifest-run-all "$__cdist_target_host" cdist-object-explorer-all "$__cdist_target_host" cdist-object-gencode-all "$__cdist_target_host" -echo "Transferring created objects to $__cdist_target_host ..." +echo "Transferring objects to $__cdist_target_host ..." cdist-dir push "$__cdist_target_host" "$__cdist_out_object_dir" \ "${__cdist_remote_out_object_base_dir}" From 0c8432fd4806cc161214bfa0767215dba2d130f8 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 23 Mar 2011 08:11:56 +0100 Subject: [PATCH 0877/6109] add ideas about dependecies Signed-off-by: Steven Armstrong --- doc/dev/logs/2011-03-23.autorequire | 32 +++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 doc/dev/logs/2011-03-23.autorequire diff --git a/doc/dev/logs/2011-03-23.autorequire b/doc/dev/logs/2011-03-23.autorequire new file mode 100644 index 00000000..6660d0eb --- /dev/null +++ b/doc/dev/logs/2011-03-23.autorequire @@ -0,0 +1,32 @@ + +Ziel: type __gugus soll abhaengig von type __foo sein + + +-------------------------------------------------------------------------------- + +__foo/manifest + + __file /nice/file --source /some/where + __file /nice/other/file --source /some/where/else + __package gurk --state installed + +-------------------------------------------------------------------------------- + +a) ohne autorequire + +__gugus/manifest + + require="__file/nice/file __file/nice/other/file __package/gurk" __file /whatever + +-------------------------------------------------------------------------------- + +b) mit autorequire + +__gugus/manifest + + require="__foo/someid" __file /whatever + +-------------------------------------------------------------------------------- + +Behauptung: __gugus sollte nicht ueber die internas von __foo bescheid wissen muessen + From ab7635512827f82993b97ae9795f8273361900d0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 09:29:41 +0100 Subject: [PATCH 0878/6109] add hint to . ./bin/cdist-env Signed-off-by: Nico Schottelius --- doc/man/cdist-env.text | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/man/cdist-env.text b/doc/man/cdist-env.text index 8d10aa85..cf54d363 100644 --- a/doc/man/cdist-env.text +++ b/doc/man/cdist-env.text @@ -32,7 +32,10 @@ in csh variants (csh, tcsh): eval `./bin/cdist-env` -------------------------------------------------------------------------------- -Replace "./" with the checkout directory of cdist. +For bourne shell, the is also a shorter version: +-------------------------------------------------------------------------------- +. ./bin/cdist-env +-------------------------------------------------------------------------------- SEE ALSO From 1924e0cc6374bb872d89c92c9579a5f97e00e723 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 23 Mar 2011 10:32:20 +0100 Subject: [PATCH 0879/6109] +log: should a type manifest be able to use type explorer values? Signed-off-by: Steven Armstrong --- doc/dev/logs/2011-03-23.manifest_use_explorer | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 doc/dev/logs/2011-03-23.manifest_use_explorer diff --git a/doc/dev/logs/2011-03-23.manifest_use_explorer b/doc/dev/logs/2011-03-23.manifest_use_explorer new file mode 100644 index 00000000..26571027 --- /dev/null +++ b/doc/dev/logs/2011-03-23.manifest_use_explorer @@ -0,0 +1,22 @@ +== Henne/Ei Problem == +manifest will explorer benutzen der noch gar nicht existiert, +weil explorer ja auch object benutzen kann/soll/will welches erst von manifest +erzuegt wird. + + +-------------------------------------------------------------------------------- + +__foo/manifest + + state_should="$(cat "$__object/parameter/state")" + state_is="$(cat "$__object/explorer/state")" + # BANG -> $__object/explorer/state does not exist at this point + + if [ "$state_should" != "$state_is" ]; then + __file /some/file --source /some/source + fi + + + + + From 0a028785c315c5cf32a470d19022057046b9b286 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 10:39:45 +0100 Subject: [PATCH 0880/6109] remove check whether object already exists Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 9f272569..0b9a10ed 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -53,10 +53,10 @@ __cdist_parameter_dir="$(__cdist_object_parameter_dir "$__cdist_object")" # Append id for error messages __cdist_myname="$__cdist_myname ($__cdist_object_id)" -if [ -e "${__cdist_ddir}" ]; then - source="$(__cdist_object_source "${__cdist_ddir}")" - __cdist_exit_err "${__cdist_object} already exists (source: $source)" -fi +# if [ -e "${__cdist_ddir}" ]; then +# source="$(__cdist_object_source "${__cdist_ddir}")" +# __cdist_exit_err "${__cdist_object} already exists (source: $source)" +# fi mkdir -p "${__cdist_ddir}" mkdir -p "${__cdist_parameter_dir}" From 19e6ea9c801704d40dfe33df6c978d33b4e19c53 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 10:47:13 +0100 Subject: [PATCH 0881/6109] begin restructure, use name __cdist_object_self for type/object_id combination Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 0b9a10ed..17b6cae6 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -27,26 +27,39 @@ . cdist-config set -eu +################################################################################ +# Prepare object and 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" + __cdist_object_id="$__cdist_name_singleton" else [ $# -ge 1 ] || __cdist_usage " " __cdist_object_id="$1"; shift fi -echo "$__cdist_object_id" | grep -q "^${__cdist_sane_regexp}\$" || \ +# Verify object id +__cdist_object_id_sane=$(echo "$__cdist_object_id" | grep "^${__cdist_sane_regexp}\$") +if [ -z "$__cdist_object_id_sane" ]; then __cdist_usage "Insane object id, ${__cdist_object_id}." - -# Remove double slash if id begins with / -if [ "$(echo $__cdist_object_id | grep "^/")" ]; then - __cdist_object="${__cdist_type}${__cdist_object_id}" -else - __cdist_object="${__cdist_type}/${__cdist_object_id}" fi +# Prevent double slash if id begins with / +if [ "$(echo $__cdist_object_id | grep "^/")" ]; then + __cdist_object_self="${__cdist_type}${__cdist_object_id}" +else + __cdist_object_self="${__cdist_type}/${__cdist_object_id}" +fi + +################################################################################ +# Verify object +# + + + __cdist_ddir="$(__cdist_object_dir "$__cdist_object")" __cdist_parameter_dir="$(__cdist_object_parameter_dir "$__cdist_object")" From 117232ce9d599ab1929e5261a8c5d20b9e170701 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 11:05:02 +0100 Subject: [PATCH 0882/6109] begin rewrite of cdist-type-emulator Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 17b6cae6..8be6e819 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -55,28 +55,41 @@ else fi ################################################################################ -# Verify object +# Internal quirks # - - -__cdist_ddir="$(__cdist_object_dir "$__cdist_object")" -__cdist_parameter_dir="$(__cdist_object_parameter_dir "$__cdist_object")" - # Append id for error messages __cdist_myname="$__cdist_myname ($__cdist_object_id)" -# if [ -e "${__cdist_ddir}" ]; then -# source="$(__cdist_object_source "${__cdist_ddir}")" +################################################################################ +# Create object in tmpdir +# + +__cdist_new_object_dir="$__cdist_tmp_dir/$__cdist_object_self" +mkdir -p "${__cdist_new_object_dir}" + +# Record source +echo "${__cdist_manifest}" > "${__cdist_new_object_dir}/${__cdist_name_object_source}" + + + +################################################################################ +# Try to merge object into global object directory +# + +# +__cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" +__cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" + +__cdist_parameter_dir="$(__cdist_object_parameter_dir "$__cdist_object")" + +# if [ -e "${__cdist_new_object_dir}" ]; then +# source="$(__cdist_object_source "${__cdist_new_object_dir}")" # __cdist_exit_err "${__cdist_object} already exists (source: $source)" # fi -mkdir -p "${__cdist_ddir}" mkdir -p "${__cdist_parameter_dir}" -# Record (correct ;-) source -echo "${__cdist_manifest}" > "${__cdist_ddir}/${__cdist_name_object_source}" - # Record parameters to tmpdir tempparameter="${__cdist_tmp_dir}/${__cdist_name_parameter}" mkdir -p "$tempparameter" From 359e252ef7b840e7348aa0f8ae2361b6e02b3033 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 11:12:39 +0100 Subject: [PATCH 0883/6109] begin to sort cdist-config by alphabet Signed-off-by: Nico Schottelius --- bin/cdist-config | 216 +++++++++++++++++++++++++---------------------- 1 file changed, 114 insertions(+), 102 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index a5eb9485..9a7cea91 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -134,7 +134,7 @@ __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") : ${__cdist_remote_out_object_base_dir:=$__cdist_remote_out_dir/$__cdist_name_object} ################################################################################ -# Function list +# Internal functions # __cdist_debug_echo() { @@ -143,6 +143,12 @@ __cdist_debug_echo() fi } +__cdist_exec_fail_on_error() +{ + sh -e "$@" + [ "$?" -eq 0 ] || __cdist_exit_err "Error: $1 exited non-zero." +} + __cdist_exit_err() { echo "$@" >&2 @@ -170,76 +176,9 @@ __cdist_init_deploy() ln -sf "$__cdist_conf_dir" "$__cdist_local_base_dir/$__cdist_name_conf_dir" } -__cdist_type_has_explorer() -{ - # We only create output, if there's at least one explorer - # and can thus be used as a boolean ;-) - if [ -d "$(__cdist_type_explorer_dir "$1")" ]; then - ls -1 "$(__cdist_type_explorer_dir "$1")" - fi -} - -__cdist_type_dir() -{ - echo "${__cdist_type_dir}/$1" -} - -__cdist_type_explorer_dir() -{ - echo "${__cdist_type_dir}/$1/${__cdist_name_explorer}" -} - -__cdist_remote_type_explorer_dir() -{ - echo "${__cdist_remote_type_dir}/$1/${__cdist_name_explorer}" -} - -__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}" -} - -# Shorthand for required and optional -__cdist_type_parameter_required() -{ - echo "$(__cdist_type_parameter_dir "$1")/$__cdist_name_parameter_required" -} - -__cdist_type_parameter_optional() -{ - echo "$(__cdist_type_parameter_dir "$1")/$__cdist_name_parameter_optional" -} - -__cdist_type_from_object() -{ - echo "${1%%/*}" -} - -__cdist_object_id_from_object() -{ - echo "${1#*/}" -} - -__cdist_object_dir() -{ - __cdist_object_dir="${__cdist_out_object_dir}/$1/${__cdist_name_dot_cdist}" - echo "$__cdist_object_dir" -} - -__cdist_remote_object_dir() -{ - echo "${__cdist_remote_out_object_base_dir}/$1" -} +################################################################################ +# Object +# __cdist_object_code() { @@ -251,31 +190,6 @@ __cdist_object_code_finished() echo "$(__cdist_object_dir "$1")/${__cdist_name_code_finished}" } -__cdist_object_parameter_dir() -{ - echo "$(__cdist_object_dir "$1")/${__cdist_name_parameter}" -} - -__cdist_remote_object_parameter_dir() -{ - echo "$(__cdist_remote_object_dir "$1")/${__cdist_name_parameter}" -} - -__cdist_object_require() -{ - echo "$(__cdist_object_dir "$1")/${__cdist_name_require}" -} - -__cdist_object_type_explorer_dir() -{ - echo "$(__cdist_object_dir "$1")/${__cdist_name_explorer}" -} - -__cdist_remote_object_type_explorer_dir() -{ - echo "$(__cdist_remote_object_dir "$1")/${__cdist_name_explorer}" -} - # Find objects, remove ./ and /MARKER __cdist_object_list() { @@ -298,19 +212,117 @@ __cdist_object_source() cat "${object_dir}/${__cdist_name_object_source}" } -__cdist_exec_fail_on_error() +__cdist_object_parameter_dir() { - sh -e "$@" - [ "$?" -eq 0 ] || __cdist_exit_err "Error: $1 exited non-zero." + echo "$(__cdist_object_dir "$1")/${__cdist_name_parameter}" +} + +__cdist_remote_object_parameter_dir() +{ + echo "$(__cdist_remote_object_dir "$1")/${__cdist_name_parameter}" +} + +__cdist_object_require() +{ + echo "$(__cdist_object_dir "$1")/${__cdist_name_require}" +} + +__cdist_object_type_explorer_dir() +{ + echo "$(__cdist_object_dir "$1")/${__cdist_name_explorer}" +} + +__cdist_object_id_from_object() +{ + echo "${1#*/}" +} + +__cdist_object_dir() +{ + __cdist_object_dir="${__cdist_out_object_dir}/$1/${__cdist_name_dot_cdist}" + echo "$__cdist_object_dir" +} + +################################################################################ +# Remote +# + +__cdist_remote_object_dir() +{ + echo "${__cdist_remote_out_object_base_dir}/$1" +} + +__cdist_remote_object_type_explorer_dir() +{ + echo "$(__cdist_remote_object_dir "$1")/${__cdist_name_explorer}" } +__cdist_remote_type_explorer_dir() +{ + echo "${__cdist_remote_type_dir}/$1/${__cdist_name_explorer}" +} + + +################################################################################ +# Temp clenup +# __cdist_tmp_removal() { rm -rf "${__cdist_tmp_dir}" } -################################################################################ -# Trap for tmp removal -# trap __cdist_tmp_removal EXIT + + +################################################################################ +# Type +# +__cdist_type_dir() +{ + echo "${__cdist_type_dir}/$1" +} + +__cdist_type_explorer_dir() +{ + echo "${__cdist_type_dir}/$1/${__cdist_name_explorer}" +} + +__cdist_type_from_object() +{ + echo "${1%%/*}" +} + +__cdist_type_has_explorer() +{ + # We only create output, if there's at least one explorer + # and can thus be used as a boolean ;-) + if [ -d "$(__cdist_type_explorer_dir "$1")" ]; then + ls -1 "$(__cdist_type_explorer_dir "$1")" + fi +} + +__cdist_type_gencode() +{ + echo "${__cdist_type_dir}/$1/${__cdist_name_gencode}" +} + +__cdist_type_parameter_dir() +{ + echo "$(__cdist_type_dir "$1")/${__cdist_name_parameter}" +} + +__cdist_type_parameter_optional() +{ + echo "$(__cdist_type_parameter_dir "$1")/$__cdist_name_parameter_optional" +} + +__cdist_type_parameter_required() +{ + echo "$(__cdist_type_parameter_dir "$1")/$__cdist_name_parameter_required" +} + +__cdist_type_singleton() +{ + echo "${__cdist_type_dir}/$1/${__cdist_name_singleton}" +} From 6f67911a0b9c5e06a274e38fb0c12c1e8d5d392d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 11:19:05 +0100 Subject: [PATCH 0884/6109] sort object area in cdist-config Signed-off-by: Nico Schottelius --- bin/cdist-config | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 9a7cea91..3f7d7c3c 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -190,6 +190,18 @@ __cdist_object_code_finished() echo "$(__cdist_object_dir "$1")/${__cdist_name_code_finished}" } +__cdist_object_dir() +{ + __cdist_object_dir="${__cdist_out_object_dir}/$1/${__cdist_name_dot_cdist}" + echo "$__cdist_object_dir" +} + + +__cdist_object_id_from_object() +{ + echo "${1#*/}" +} + # Find objects, remove ./ and /MARKER __cdist_object_list() { @@ -205,44 +217,26 @@ __cdist_object_list() } -__cdist_object_source() -{ - local object_dir="$1"; shift - - cat "${object_dir}/${__cdist_name_object_source}" -} - __cdist_object_parameter_dir() { echo "$(__cdist_object_dir "$1")/${__cdist_name_parameter}" } -__cdist_remote_object_parameter_dir() -{ - echo "$(__cdist_remote_object_dir "$1")/${__cdist_name_parameter}" -} - __cdist_object_require() { echo "$(__cdist_object_dir "$1")/${__cdist_name_require}" } +__cdist_object_source() +{ + cat "$1/${__cdist_name_object_source}" +} + __cdist_object_type_explorer_dir() { echo "$(__cdist_object_dir "$1")/${__cdist_name_explorer}" } -__cdist_object_id_from_object() -{ - echo "${1#*/}" -} - -__cdist_object_dir() -{ - __cdist_object_dir="${__cdist_out_object_dir}/$1/${__cdist_name_dot_cdist}" - echo "$__cdist_object_dir" -} - ################################################################################ # Remote # @@ -252,6 +246,11 @@ __cdist_remote_object_dir() echo "${__cdist_remote_out_object_base_dir}/$1" } +__cdist_remote_object_parameter_dir() +{ + echo "$(__cdist_remote_object_dir "$1")/${__cdist_name_parameter}" +} + __cdist_remote_object_type_explorer_dir() { echo "$(__cdist_remote_object_dir "$1")/${__cdist_name_explorer}" From ab02adf01a67b71dc191f6f95215628022224cd8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 11:27:38 +0100 Subject: [PATCH 0885/6109] abort after manifest-run-init to verify new methods Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 9a2fd303..34662081 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -49,6 +49,9 @@ cdist-dir push "$__cdist_target_host" "${__cdist_abs_mydir}" "${__cdist_remote_b cdist-explorer-run-global "$__cdist_target_host" cdist-manifest-run-init "$__cdist_target_host" + +exit 1 + cdist-manifest-run-all "$__cdist_target_host" cdist-object-explorer-all "$__cdist_target_host" cdist-object-gencode-all "$__cdist_target_host" From 69453feaa51ac322451bad26be9bbb01ba073f35 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 11:30:22 +0100 Subject: [PATCH 0886/6109] add __cdist_object_source_add Signed-off-by: Nico Schottelius --- bin/cdist-config | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/cdist-config b/bin/cdist-config index 3f7d7c3c..71bc3672 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -227,9 +227,19 @@ __cdist_object_require() echo "$(__cdist_object_dir "$1")/${__cdist_name_require}" } +__cdist_object_source_name() +{ + echo "$1/${__cdist_name_object_source}" +} + __cdist_object_source() { - cat "$1/${__cdist_name_object_source}" + cat "$(__cdist_object_source_name "$1")" +} + +__cdist_object_source_add() +{ + echo "$__cdist_manifest" >> "$(__cdist_object_source_name "$1")" } __cdist_object_type_explorer_dir() From a6702cc8045d3d3d3d2cf3455e5f1d31e80ef116 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 11:32:22 +0100 Subject: [PATCH 0887/6109] do not setup variables in cdist-config Signed-off-by: Nico Schottelius --- bin/cdist-config | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 71bc3672..531e4384 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -192,8 +192,7 @@ __cdist_object_code_finished() __cdist_object_dir() { - __cdist_object_dir="${__cdist_out_object_dir}/$1/${__cdist_name_dot_cdist}" - echo "$__cdist_object_dir" + echo "${__cdist_out_object_dir}/$1/${__cdist_name_dot_cdist}" } From b46850cd12398ca5cf1392d53e3b9696e559b159 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 11:39:17 +0100 Subject: [PATCH 0888/6109] begin to reintegrate parameter recording Signed-off-by: Nico Schottelius --- bin/cdist-config | 1 - bin/cdist-type-emulator | 52 +++++++++++++++++++++++------------------ 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 531e4384..fbdbe719 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -213,7 +213,6 @@ __cdist_object_list() find . -name "$__cdist_name_object_source" | \ sed -e 's;^./;;' -e "s;/${__cdist_name_object_source}\$;;" ) - } __cdist_object_parameter_dir() diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 8be6e819..06369895 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -62,38 +62,28 @@ fi __cdist_myname="$__cdist_myname ($__cdist_object_id)" ################################################################################ -# Create object in tmpdir +# Create object in tmpdir first # -__cdist_new_object_dir="$__cdist_tmp_dir/$__cdist_object_self" -mkdir -p "${__cdist_new_object_dir}" +# Save original destination +__cdist_out_object_dir_orig="$__cdist_out_object_dir" + +# Store to tmp now +__cdist_out_object_dir="$__cdist_tmp_dir" + +__cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" + +set -x # Record source -echo "${__cdist_manifest}" > "${__cdist_new_object_dir}/${__cdist_name_object_source}" +mkdir -p "${__cdist_object_dir}" +__cdist_object_source_add "${__cdist_object_dir}" - -################################################################################ -# Try to merge object into global object directory -# - -# -__cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" -__cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" - +# Record parameter __cdist_parameter_dir="$(__cdist_object_parameter_dir "$__cdist_object")" - -# if [ -e "${__cdist_new_object_dir}" ]; then -# source="$(__cdist_object_source "${__cdist_new_object_dir}")" -# __cdist_exit_err "${__cdist_object} already exists (source: $source)" -# fi - mkdir -p "${__cdist_parameter_dir}" -# Record parameters to tmpdir -tempparameter="${__cdist_tmp_dir}/${__cdist_name_parameter}" -mkdir -p "$tempparameter" - while [ $# -gt 0 ]; do opt="$1"; shift @@ -109,6 +99,14 @@ while [ $# -gt 0 ]; do echo "${value}" > "${tempparameter}/${opt_file}" done +exit 1 + + +################################################################################ +# Try to merge object into global object directory +# + + # Ensure required parameters are given if [ -f "$(__cdist_type_parameter_required "$__cdist_type")" ]; then while read required; do @@ -144,3 +142,11 @@ for requirement in $require; do echo $requirement >> "$(__cdist_object_require "$__cdist_object")" echo Recording: $__cdist_object requires $requirement done + + +# old stuff +# if [ -e "${__cdist_new_object_dir}" ]; then +# source="$(__cdist_object_source "${__cdist_new_object_dir}")" +# __cdist_exit_err "${__cdist_object} already exists (source: $source)" +# fi + From fa0a3af2a0d2e5fd0e14c753ca76a4fbef084b28 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 11:44:33 +0100 Subject: [PATCH 0889/6109] correctly record parameter, remove sed (not required) Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 06369895..18171233 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -73,15 +73,15 @@ __cdist_out_object_dir="$__cdist_tmp_dir" __cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" -set -x - # Record source mkdir -p "${__cdist_object_dir}" __cdist_object_source_add "${__cdist_object_dir}" # Record parameter -__cdist_parameter_dir="$(__cdist_object_parameter_dir "$__cdist_object")" +set -x + +__cdist_parameter_dir="$(__cdist_object_parameter_dir "$__cdist_object_self")" mkdir -p "${__cdist_parameter_dir}" while [ $# -gt 0 ]; do @@ -90,15 +90,17 @@ while [ $# -gt 0 ]; do echo "$opt" | grep -q "^--${__cdist_sane_regexp}\$" || \ __cdist_usage "Provide sane options" - opt_file="$(echo $opt | sed 's/^--//')" + opt_file="${opt#--}" [ $# -ge 1 ] || __cdist_usage "Missing value for $opt" value="$1"; shift - echo "${value}" > "${tempparameter}/${opt_file}" + echo "${value}" > "${__cdist_parameter_dir}/${opt_file}" done +find $__cdist_object_dir + exit 1 From d8f7ebc73f352734018b6552ff72231903c47296 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 11:45:50 +0100 Subject: [PATCH 0890/6109] move .dotfiles to .cdist/dotfiles (without dot) Signed-off-by: Nico Schottelius --- bin/cdist-config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index fbdbe719..21b797bb 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -42,7 +42,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_bin:=bin} : ${__cdist_name_code:=code} -: ${__cdist_name_code_finished:=.codedone} +: ${__cdist_name_code_finished:=codedone} : ${__cdist_name_conf_dir:=conf} : ${__cdist_name_dot_cdist:=.cdist} : ${__cdist_name_explorer:=explorer} @@ -54,9 +54,9 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_init:=init} : ${__cdist_name_manifest:=manifest} : ${__cdist_name_object:=object} -: ${__cdist_name_object_finished:=.done} +: ${__cdist_name_object_finished:=done} : ${__cdist_name_object_id:=object_id} -: ${__cdist_name_object_source:=.source} +: ${__cdist_name_object_source:=source} : ${__cdist_name_out_dir:=out} : ${__cdist_name_parameter:=parameter} : ${__cdist_name_parameter_required:=required} From 6e5ed1c8e80e1afb184b2bc498ea080ad5feca12 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 11:56:19 +0100 Subject: [PATCH 0891/6109] re-include requirement recording Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 18171233..7cb8e450 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -99,16 +99,20 @@ while [ $# -gt 0 ]; do echo "${value}" > "${__cdist_parameter_dir}/${opt_file}" done -find $__cdist_object_dir +# Record requirements +# it's fine, if it's not set +set +u +for requirement in $require; do + echo $requirement >> "$(__cdist_object_require "$__cdist_object_self")" + echo Object $__cdist_object_self requires $requirement +done + exit 1 - - ################################################################################ -# Try to merge object into global object directory +# Check newly created object # - # Ensure required parameters are given if [ -f "$(__cdist_type_parameter_required "$__cdist_type")" ]; then while read required; do @@ -133,17 +137,12 @@ fi cd "${tempparameter}" other="$(ls)" +exit 1 + if [ "$other" ]; then __cdist_usage "Unsupported parameter: $other" fi -# Record requirements -# it's fine, if it's not set -set +u -for requirement in $require; do - echo $requirement >> "$(__cdist_object_require "$__cdist_object")" - echo Recording: $__cdist_object requires $requirement -done # old stuff From 34b5e44091576579d4d74f55bdeba71a22205a1d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 12:12:03 +0100 Subject: [PATCH 0892/6109] re-include parameter check Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 53 ++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 7cb8e450..10e0534d 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -79,8 +79,6 @@ __cdist_object_source_add "${__cdist_object_dir}" # Record parameter -set -x - __cdist_parameter_dir="$(__cdist_object_parameter_dir "$__cdist_object_self")" mkdir -p "${__cdist_parameter_dir}" @@ -106,44 +104,55 @@ for requirement in $require; do echo $requirement >> "$(__cdist_object_require "$__cdist_object_self")" echo Object $__cdist_object_self requires $requirement done +set -u - -exit 1 ################################################################################ # Check newly created object # +set -x + +# # Ensure required parameters are given +# if [ -f "$(__cdist_type_parameter_required "$__cdist_type")" ]; then while read required; do - if [ ! -f "${tempparameter}/${required}" ]; then + if [ ! -f "${__cdist_parameter_dir}/${required}" ]; then __cdist_usage "Missing required parameter $required" fi - - mv "${tempparameter}/${required}" "${__cdist_parameter_dir}" done < "$(__cdist_type_parameter_required "$__cdist_type")" fi -# Allow optional parameters -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 +# +# Ensure that only optional or required parameters are given +# -# Error out on other paramaters -cd "${tempparameter}" -other="$(ls)" +if [ -f "$(__cdist_type_parameter_optional "$__cdist_type")" ]; then + cat "$(__cdist_type_parameter_optional "$__cdist_type")" > \ + "$__cdist_tmp_file" +fi + +if [ -f "$(__cdist_type_parameter_required "$__cdist_type")" ]; then + cat "$(__cdist_type_parameter_required "$__cdist_type")" >> \ + "$__cdist_tmp_file" +fi + +cd "$__cdist_parameter_dir" +for parameter in $(ls -1); do + is_valid=$(grep "^$parameter\$" "$__cdist_tmp_file") + + [ "$is_valid" ] || "Unknown parameter $parameter" +done exit 1 -if [ "$other" ]; then - __cdist_usage "Unsupported parameter: $other" -fi - +################################################################################ +# Merge object +# +# +# Ensure that only optional or required parameters are given +# # old stuff # if [ -e "${__cdist_new_object_dir}" ]; then From 2ef17f9bf20ae743908fb90d361bddb4dc00c8ef Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 12:15:00 +0100 Subject: [PATCH 0893/6109] begin merge section in cdist-type-emulator Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 10e0534d..0b709a13 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -149,14 +149,18 @@ exit 1 ################################################################################ # Merge object # +# Save original destination +__cdist_out_object_dir="$__cdist_out_object_dir_orig" + +__cdist_object_destination_dir="$(__cdist_object_dir "$__cdist_object_self")" # -# Ensure that only optional or required parameters are given +# If the object already exists and is exactly the same, merge it. Otherwise fail. # +if [ -e "${__cdist_new_object_dir}" ]; then + source="$(__cdist_object_source "${__cdist_new_object_dir}")" + __cdist_exit_err "${__cdist_object} already exists (source: $source)" -# old stuff -# if [ -e "${__cdist_new_object_dir}" ]; then -# source="$(__cdist_object_source "${__cdist_new_object_dir}")" -# __cdist_exit_err "${__cdist_object} already exists (source: $source)" -# fi + +fi From 92860706b2d643d5b142db5e82134e9e1066ed7d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 12:20:09 +0100 Subject: [PATCH 0894/6109] import merge code from cdist-manifest-run-all into cdist-type-emulator Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 53 +++++++++++++++++++++++++++++++++++++++++ doc/dev/todo/niconext | 3 +++ 2 files changed, 56 insertions(+) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 0b709a13..8451ec9d 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -164,3 +164,56 @@ if [ -e "${__cdist_new_object_dir}" ]; then fi + + +# -------------------------------------------------------------------------------- + + # Verify no conflicting objects have been created + while read __cdist_new_object; do + __cdist_object_found=$(grep "^$__cdist_new_object\$" "$__cdist_objects_list" || true) + + if [ "$__cdist_object_found" ]; then + __cdist_object_source="$(cat "$(__cdist_object_dir "$__cdist_new_object")/${__cdist_name_object_source}")" + __cdist_exit_err "${__cdist_manifest}: ${__cdist_new_object} already exists (source: $__cdist_object_source)" + fi + done < "$__cdist_new_objects_list" + + # Safe harbour: We can merge all objects into main tree + # Merge = mkdir + mv parameters and source information + while read __cdist_new_object; do + [ "$__cdist_new_objects_created" = "n" ] && __cdist_new_objects_created="y" + + # where to save the newly created object + __cdist_object_dir="$__cdist_out_object_dir/$__cdist_new_object" + mkdir -p "$__cdist_object_dir" + + # Move parts of the object (CANNOT MOVE COMPLETLEY, HIERACHY!) + __cdist_new_object_dir="$__cdist_new_objects_dir/$__cdist_new_object" + + # Source + mv "${__cdist_new_object_dir}/${__cdist_name_object_source}" \ + "$__cdist_object_dir" + + # Explorer, Parameter, Require + for __cdist_object_file in \ + ${__cdist_name_explorer} \ + ${__cdist_name_parameter} \ + ${__cdist_name_require} \ + ; do + + if [ -e "${__cdist_new_object_dir}/${__cdist_object_file}" ]; then + mv "${__cdist_new_object_dir}/${__cdist_object_file}" \ + "$__cdist_object_dir" + fi + done + done < "$__cdist_new_objects_list" + + # Remove listing and objects, otherwise the next type will reuse it... + rm -rf "$__cdist_new_objects_dir" "$__cdist_new_objects_list" + else + # Be nice, warn user if manifests exists, but is not executable + if [ -f "${__cdist_manifest}" ]; then + echo "Warning ${__cdist_manifest} exists, but is not executable." >&2 + fi + fi + fi diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 6179c017..75790fb8 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,2 +1,5 @@ - think about using .cdist for meta information? - otherwise: parameter, gencode-local, etc. are not valid object id stuff + +- check cdist-manifest-run-all whether -x -f to manifest shouldn't be better + in cdist-manifest-run From 08a53cb130b63a6a4f9d4263387060e39e9e3dcf Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 23 Mar 2011 13:18:13 +0100 Subject: [PATCH 0895/6109] new type: __apt_ppa Signed-off-by: Steven Armstrong --- conf/type/__apt_ppa/explorer/state | 28 +++++++++++ .../type/__apt_ppa/files/check-apt-repository | 42 +++++++++++++++++ .../__apt_ppa/files/remove-apt-repository | 42 +++++++++++++++++ conf/type/__apt_ppa/gencode-remote | 35 ++++++++++++++ conf/type/__apt_ppa/man.text | 47 +++++++++++++++++++ conf/type/__apt_ppa/manifest | 33 +++++++++++++ conf/type/__apt_ppa/parameter/required | 1 + 7 files changed, 228 insertions(+) create mode 100755 conf/type/__apt_ppa/explorer/state create mode 100755 conf/type/__apt_ppa/files/check-apt-repository create mode 100755 conf/type/__apt_ppa/files/remove-apt-repository create mode 100755 conf/type/__apt_ppa/gencode-remote create mode 100644 conf/type/__apt_ppa/man.text create mode 100755 conf/type/__apt_ppa/manifest create mode 100644 conf/type/__apt_ppa/parameter/required diff --git a/conf/type/__apt_ppa/explorer/state b/conf/type/__apt_ppa/explorer/state new file mode 100755 index 00000000..c50af3f0 --- /dev/null +++ b/conf/type/__apt_ppa/explorer/state @@ -0,0 +1,28 @@ +#!/bin/sh +# +# 2011 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 . +# +# +# Get the current state of the ppa. +# + +name="$__object_id" + +# FIXME: on first run check-apt-repository may not be installed +check-apt-repository "$name" && echo enabled || echo disabled + diff --git a/conf/type/__apt_ppa/files/check-apt-repository b/conf/type/__apt_ppa/files/check-apt-repository new file mode 100755 index 00000000..4f4252c1 --- /dev/null +++ b/conf/type/__apt_ppa/files/check-apt-repository @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# Check if the given apt repository is installed or not. +# Exit with: +# 0: if it is installed +# 1: if not +# 2: on error +# + +import sys +from aptsources import distro, sourceslist +from softwareproperties import ppa + + +def is_repository_installed(repository): + #print 'repository:', repository + codename = distro.get_distro().codename + #print 'codename:', codename + (line, file) = ppa.expand_ppa_line(repository.strip(), codename) + #print 'line:', line + #print 'file:', file + sources_list = sourceslist.SourcesList() + source_entry = sourceslist.SourceEntry(line, file) + + if source_entry in sources_list: + #print 'yes' + return True + else: + #print 'no' + return False + +if __name__ == '__main__': + if (len(sys.argv) != 2): + print 'Error: need a repository as argument' + sys.exit(2) + #repository = 'ppa:freenx-team' + repository = sys.argv[1] + if is_repository_installed(repository): + sys.exit(0) + else: + sys.exit(1) + diff --git a/conf/type/__apt_ppa/files/remove-apt-repository b/conf/type/__apt_ppa/files/remove-apt-repository new file mode 100755 index 00000000..b57a07f6 --- /dev/null +++ b/conf/type/__apt_ppa/files/remove-apt-repository @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# +# Remove the given apt repository. +# +# Exit with: +# 0: if it worked +# 1: if not +# 2: on other error + + +import sys +from aptsources import distro, sourceslist +from softwareproperties import ppa +from softwareproperties.SoftwareProperties import SoftwareProperties + + +def remove_repository(repository): + #print 'repository:', repository + codename = distro.get_distro().codename + #print 'codename:', codename + (line, file) = ppa.expand_ppa_line(repository.strip(), codename) + #print 'line:', line + #print 'file:', file + source_entry = sourceslist.SourceEntry(line, file) + + try: + sp = SoftwareProperties() + sp.remove_source(source_entry) + return True + except ValueError: + print >> sys.stderr, "Error: '%s' doesn't exists in a sourcelist file" % line + return False + +if __name__ == '__main__': + if (len(sys.argv) != 2): + print >> sys.stderr, 'Error: need a repository as argument' + sys.exit(2) + repository = sys.argv[1] + if remove_repository(repository): + sys.exit(0) + else: + sys.exit(1) diff --git a/conf/type/__apt_ppa/gencode-remote b/conf/type/__apt_ppa/gencode-remote new file mode 100755 index 00000000..0e7fe163 --- /dev/null +++ b/conf/type/__apt_ppa/gencode-remote @@ -0,0 +1,35 @@ +#!/bin/sh +# +# 2011 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 . +# + +name="$__object_id" +state_should="$(cat "$__object/parameter/state")" +state_is="$(cat "$__object/explorer/state")" + +if [ "$state_should" != "$state_is" ]; then + case "$state_should" in + enabled) + echo add-apt-repository \"$name\" + ;; + disabled) + echo remove-apt-repository \"$name\" + ;; + esac +fi + diff --git a/conf/type/__apt_ppa/man.text b/conf/type/__apt_ppa/man.text new file mode 100644 index 00000000..73fabc7f --- /dev/null +++ b/conf/type/__apt_ppa/man.text @@ -0,0 +1,47 @@ +cdist-type__apt_ppa(7) +========================== +Steven Armstrong + + +NAME +---- +cdist-type__apt_ppa - Manage ppa repositories + + +DESCRIPTION +----------- +This cdist type allows manage ubuntu ppa repositories. + + +REQUIRED PARAMETERS +------------------- +state:: + The state the ppa should be in, either "enabled" or "disabled". + + +OPTIONAL PARAMETERS +------------------- +None. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Enable a ppa repository +__apt_ppa ppa:sans-intern/missing-bits --state enabled + +# Disable a ppa repository +__apt_ppa ppa:sans-intern/missing-bits --state disabled +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +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). diff --git a/conf/type/__apt_ppa/manifest b/conf/type/__apt_ppa/manifest new file mode 100755 index 00000000..a97ced75 --- /dev/null +++ b/conf/type/__apt_ppa/manifest @@ -0,0 +1,33 @@ +#!/bin/sh +# +# 2011 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 . +# + + +__package python-software-properties --state installed + +require="__package/python-software-properties" \ + __file /usr/local/bin/check-apt-repository \ + --source "$__type/files/check-apt-repository" \ + --mode 0755 + +require="__package/python-software-properties" \ + __file /usr/local/bin/remove-apt-repository \ + --source "$__type/files/remove-apt-repository" \ + --mode 0755 + diff --git a/conf/type/__apt_ppa/parameter/required b/conf/type/__apt_ppa/parameter/required new file mode 100644 index 00000000..ff72b5c7 --- /dev/null +++ b/conf/type/__apt_ppa/parameter/required @@ -0,0 +1 @@ +state From 8d32e00114b7c01f7ae06334c6b498f877174e10 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 13:21:18 +0100 Subject: [PATCH 0896/6109] add more todo Signed-off-by: Nico Schottelius --- doc/dev/todo/post-1.3 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/dev/todo/post-1.3 b/doc/dev/todo/post-1.3 index 301dfdb2..ec186d3a 100644 --- a/doc/dev/todo/post-1.3 +++ b/doc/dev/todo/post-1.3 @@ -3,6 +3,7 @@ Core: - support $__self = relative_type/object_id - .cdist - cache + - display changes if object cannot be merged to user Cache: Assume you want to configure stuff one host ("monitor node"), @@ -31,3 +32,4 @@ Types to be written/extended: - regexp replace (can probably cover all?) -> aka sed. - __cron + From 175660872092958b9e0a30c2de0dd06e8ce440c9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 13:33:26 +0100 Subject: [PATCH 0897/6109] in theory finish new algorithm to allow same objects Signed-off-by: Nico Schottelius --- bin/cdist-config | 7 ++++++- bin/cdist-type-emulator | 33 ++++++++++++++++++++++++++++----- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 21b797bb..e5dc46c0 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -192,7 +192,12 @@ __cdist_object_code_finished() __cdist_object_dir() { - echo "${__cdist_out_object_dir}/$1/${__cdist_name_dot_cdist}" + echo "$(__cdist_object_dir_base "$1")/${__cdist_name_dot_cdist}" +} + +__cdist_object_dir_base() +{ + echo "${__cdist_out_object_dir}/$1" } diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 8451ec9d..cf2bc418 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -77,7 +77,6 @@ __cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" mkdir -p "${__cdist_object_dir}" __cdist_object_source_add "${__cdist_object_dir}" - # Record parameter __cdist_parameter_dir="$(__cdist_object_parameter_dir "$__cdist_object_self")" mkdir -p "${__cdist_parameter_dir}" @@ -152,19 +151,43 @@ exit 1 # Save original destination __cdist_out_object_dir="$__cdist_out_object_dir_orig" -__cdist_object_destination_dir="$(__cdist_object_dir "$__cdist_object_self")" +__cdist_new_object_dir="$(__cdist_object_dir "$__cdist_object_self")" # # If the object already exists and is exactly the same, merge it. Otherwise fail. # if [ -e "${__cdist_new_object_dir}" ]; then - source="$(__cdist_object_source "${__cdist_new_object_dir}")" - __cdist_exit_err "${__cdist_object} already exists (source: $source)" - + # Allow diff to fail + set +e + diff -ru "${__cdist_object_dir}" "${__cdist_new_object_dir}" \ + > "$__cdist_tmp_file"; ret=$? + set -e + + if [ "$ret" != 0 ]; then + # Go to standard error + exec >&2 + echo "${__cdist_object_self} already exists differently." + echo "Recorded source(s):" + __cdist_object_source "${__cdist_new_object_dir}" + echo "Differences:" + cat "$__cdist_tmp_file" + __cdist_exit_err "Aborting due to object conflict." + fi + # Add ourselves, if we're compatible + __cdist_object_source_add "${__cdist_new_object_dir}" +else + # + # Move object into tree: + # Create full path minus .cdist and move .cdist + # + __cdist_new_object_base_dir="$(__cdist_object_base_dir "$__cdist_object_self")" + mkdir -p "$__cdist_new_object_base_dir" + mv "$__cdist_object_dir" "$__cdist_new_object_base_dir" fi +exit 0 # -------------------------------------------------------------------------------- From d7b765e498f7df4eca15f355223d7547083d8089 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 13:38:14 +0100 Subject: [PATCH 0898/6109] base_dir not dir_base 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 e5dc46c0..653d993f 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -192,10 +192,10 @@ __cdist_object_code_finished() __cdist_object_dir() { - echo "$(__cdist_object_dir_base "$1")/${__cdist_name_dot_cdist}" + echo "$(__cdist_object_base_dir "$1")/${__cdist_name_dot_cdist}" } -__cdist_object_dir_base() +__cdist_object_base_dir() { echo "${__cdist_out_object_dir}/$1" } From 9ba61ac0442dd038c7552ce68c956fb9c7afebb1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 13:41:56 +0100 Subject: [PATCH 0899/6109] remove debug Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 61 +---------------------------------------- 1 file changed, 1 insertion(+), 60 deletions(-) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index cf2bc418..18069b44 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -109,8 +109,6 @@ set -u # Check newly created object # -set -x - # # Ensure required parameters are given # @@ -143,12 +141,10 @@ for parameter in $(ls -1); do [ "$is_valid" ] || "Unknown parameter $parameter" done -exit 1 - ################################################################################ # Merge object # -# Save original destination +# Restore original destination __cdist_out_object_dir="$__cdist_out_object_dir_orig" __cdist_new_object_dir="$(__cdist_object_dir "$__cdist_object_self")" @@ -185,58 +181,3 @@ else mkdir -p "$__cdist_new_object_base_dir" mv "$__cdist_object_dir" "$__cdist_new_object_base_dir" fi - - -exit 0 - -# -------------------------------------------------------------------------------- - - # Verify no conflicting objects have been created - while read __cdist_new_object; do - __cdist_object_found=$(grep "^$__cdist_new_object\$" "$__cdist_objects_list" || true) - - if [ "$__cdist_object_found" ]; then - __cdist_object_source="$(cat "$(__cdist_object_dir "$__cdist_new_object")/${__cdist_name_object_source}")" - __cdist_exit_err "${__cdist_manifest}: ${__cdist_new_object} already exists (source: $__cdist_object_source)" - fi - done < "$__cdist_new_objects_list" - - # Safe harbour: We can merge all objects into main tree - # Merge = mkdir + mv parameters and source information - while read __cdist_new_object; do - [ "$__cdist_new_objects_created" = "n" ] && __cdist_new_objects_created="y" - - # where to save the newly created object - __cdist_object_dir="$__cdist_out_object_dir/$__cdist_new_object" - mkdir -p "$__cdist_object_dir" - - # Move parts of the object (CANNOT MOVE COMPLETLEY, HIERACHY!) - __cdist_new_object_dir="$__cdist_new_objects_dir/$__cdist_new_object" - - # Source - mv "${__cdist_new_object_dir}/${__cdist_name_object_source}" \ - "$__cdist_object_dir" - - # Explorer, Parameter, Require - for __cdist_object_file in \ - ${__cdist_name_explorer} \ - ${__cdist_name_parameter} \ - ${__cdist_name_require} \ - ; do - - if [ -e "${__cdist_new_object_dir}/${__cdist_object_file}" ]; then - mv "${__cdist_new_object_dir}/${__cdist_object_file}" \ - "$__cdist_object_dir" - fi - done - done < "$__cdist_new_objects_list" - - # Remove listing and objects, otherwise the next type will reuse it... - rm -rf "$__cdist_new_objects_dir" "$__cdist_new_objects_list" - else - # Be nice, warn user if manifests exists, but is not executable - if [ -f "${__cdist_manifest}" ]; then - echo "Warning ${__cdist_manifest} exists, but is not executable." >&2 - fi - fi - fi From 2d00e9d869601bf5ef454dc27762dc5d375a7b56 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 13:45:38 +0100 Subject: [PATCH 0900/6109] remove obsolete output from cdist-manifest-run Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index 892f27cf..ae568c2a 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -23,7 +23,7 @@ # . cdist-config -[ $# -eq 3 ] || __cdist_usage " " +[ $# -eq 2 ] || __cdist_usage " " set -u __cdist_target_host="$1"; shift @@ -33,10 +33,6 @@ __cdist_manifest="$1"; shift # Export information for cdist-type-emulator or manifest # -# This is a special variable, as being used by __cdist_object_dir -# We need to adjust it, so cdist-type-emulator writes to the right location -export __cdist_out_object_dir="$1"; shift - # Config dir should not get reset - FIXME: why did I do this? export __cdist_conf_dir @@ -62,7 +58,5 @@ export PATH="${__cdist_out_type_bin_dir}:$PATH" || __cdist_exit_err "Missing manifest ${__cdist_manifest}" [ -x "${__cdist_manifest}" ] \ || __cdist_exit_err "${__cdist_manifest} needs to be executable." -mkdir -p "${__cdist_out_object_dir}" \ - || __cdist_exit_err "Cannot create output dir ${__cdist_out_object_dir}" __cdist_exec_fail_on_error "${__cdist_manifest}" From d7819b1922d63f1100f254d8fe1bf0d68b3c1be0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 13:46:24 +0100 Subject: [PATCH 0901/6109] do not use output dir in cdist-manifest-run-init Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-manifest-run-init b/bin/cdist-manifest-run-init index f895bafa..9f10c12c 100755 --- a/bin/cdist-manifest-run-init +++ b/bin/cdist-manifest-run-init @@ -31,4 +31,4 @@ __cdist_target_host="$1"; shift eval export $__cdist_name_var_manifest=\"\$__cdist_manifest_dir\" echo "Running initial manifest for $__cdist_target_host ..." -cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest_init" "$__cdist_out_object_dir" +cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest_init" From 1dacf779e635155a10d9d28e329e66462e419d46 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 16:33:16 +0100 Subject: [PATCH 0902/6109] HUGE cleanup of cdist-manifest-run-all Signed-off-by: Nico Schottelius --- bin/cdist-config | 5 +++ bin/cdist-manifest-run-all | 88 ++++++-------------------------------- doc/dev/todo/niconext | 3 +- 3 files changed, 20 insertions(+), 76 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 653d993f..51d68f77 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -319,6 +319,11 @@ __cdist_type_gencode() echo "${__cdist_type_dir}/$1/${__cdist_name_gencode}" } +__cdist_type_manifest() +{ + echo "${__cdist_type_dir}/$1/${__cdist_name_manifest}" +} + __cdist_type_parameter_dir() { echo "$(__cdist_type_dir "$1")/${__cdist_name_parameter}" diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index fe8263ea..f20171a7 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -17,14 +17,7 @@ # You should have received a copy of the GNU General Public License # along with cdist. If not, see . # -# -# For each created object -# run the manifest of the type (with object id), -# try to merge back newly created objects (otherwise fail), -# mark the object as being run -# and iterate until all objects are marked being run. -# -# +# Run all manifests # . cdist-config @@ -35,8 +28,6 @@ __cdist_target_host="$1"; shift __cdist_objects_list="${__cdist_tmp_dir}/objects_file" __cdist_new_objects_list="${__cdist_tmp_dir}/new_objects_file" -__cdist_new_objects_dir="${__cdist_tmp_dir}/new_objects_dir" - # Loop until we do not create new objects anymore # which is equal to all objects have been run @@ -48,82 +39,29 @@ while [ "$__cdist_new_objects_created" = "y" ]; do __cdist_object_list "$__cdist_out_object_dir" > "$__cdist_objects_list" # Check every object, if we need to run it - while read __cdist_object; do + while read __cdist_object_self; do # Full path to current object - __cdist_cur_object_dir="$__cdist_out_object_dir/$__cdist_object" + __cdist_cur_object_dir="$(__cdist_object_dir "$__cdist_object_self")" + # Only the id - __cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")" + __cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object_self")" if [ ! -f "${__cdist_cur_object_dir}/$__cdist_name_object_finished" ]; then echo "Checking manifest for ${__cdist_object} ..." - __cdist_type="$(__cdist_type_from_object "$__cdist_object")" - __cdist_manifest="$__cdist_type_dir/${__cdist_type}/${__cdist_name_manifest}" + __cdist_type="$(__cdist_type_from_object "$__cdist_object_self")" + __cdist_manifest="$(__cdist_type_manifest "${__cdist_type}")" # Make __cdist_manifest available for cdist-type-emulator export __cdist_manifest - if [ -x "${__cdist_manifest}" ]; then - echo "Executing manifest ${__cdist_manifest} ..." + echo "Executing manifest ${__cdist_manifest} ..." + # Make variables available to non-core - FIXME: beatify + export $__cdist_name_var_object="$__cdist_cur_object_dir" + export $__cdist_name_var_object_id="$__cdist_object_id" + export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" - # Make variables available to non-core - export $__cdist_name_var_object="$__cdist_cur_object_dir" - export $__cdist_name_var_object_id="$__cdist_object_id" - export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" - - cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" \ - "$__cdist_new_objects_dir" - - __cdist_object_list "${__cdist_new_objects_dir}" > "$__cdist_new_objects_list" - - # Verify no conflicting objects have been created - while read __cdist_new_object; do - __cdist_object_found=$(grep "^$__cdist_new_object\$" "$__cdist_objects_list" || true) - - if [ "$__cdist_object_found" ]; then - __cdist_object_source="$(cat "$(__cdist_object_dir "$__cdist_new_object")/${__cdist_name_object_source}")" - __cdist_exit_err "${__cdist_manifest}: ${__cdist_new_object} already exists (source: $__cdist_object_source)" - fi - done < "$__cdist_new_objects_list" - - # Safe harbour: We can merge all objects into main tree - # Merge = mkdir + mv parameters and source information - while read __cdist_new_object; do - [ "$__cdist_new_objects_created" = "n" ] && __cdist_new_objects_created="y" - - # where to save the newly created object - __cdist_object_dir="$__cdist_out_object_dir/$__cdist_new_object" - mkdir -p "$__cdist_object_dir" - - # Move parts of the object (CANNOT MOVE COMPLETLEY, HIERACHY!) - __cdist_new_object_dir="$__cdist_new_objects_dir/$__cdist_new_object" - - # Source - mv "${__cdist_new_object_dir}/${__cdist_name_object_source}" \ - "$__cdist_object_dir" - - # Explorer, Parameter, Require - for __cdist_object_file in \ - ${__cdist_name_explorer} \ - ${__cdist_name_parameter} \ - ${__cdist_name_require} \ - ; do - - if [ -e "${__cdist_new_object_dir}/${__cdist_object_file}" ]; then - mv "${__cdist_new_object_dir}/${__cdist_object_file}" \ - "$__cdist_object_dir" - fi - done - done < "$__cdist_new_objects_list" - - # Remove listing and objects, otherwise the next type will reuse it... - rm -rf "$__cdist_new_objects_dir" "$__cdist_new_objects_list" - else - # Be nice, warn user if manifests exists, but is not executable - if [ -f "${__cdist_manifest}" ]; then - echo "Warning ${__cdist_manifest} exists, but is not executable." >&2 - fi - fi + cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" fi # done with this object diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 75790fb8..37c1884d 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,5 +1,6 @@ - think about using .cdist for meta information? - - otherwise: parameter, gencode-local, etc. are not valid object id stuff + - cleanup cdist-manifest-run-all +later - check cdist-manifest-run-all whether -x -f to manifest shouldn't be better in cdist-manifest-run From 65763a1b4d18ae26bb371b8ae2aa459b9ad29eae Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 16:39:06 +0100 Subject: [PATCH 0903/6109] search for .cdist not source 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 51d68f77..4cad1924 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -215,8 +215,8 @@ __cdist_object_list() ( cd "${basedir}" - find . -name "$__cdist_name_object_source" | \ - sed -e 's;^./;;' -e "s;/${__cdist_name_object_source}\$;;" + find . -name "$__cdist_name_dot_cdist" | \ + sed -e 's;^./;;' -e "s;/${__cdist_name_dot_cdist}\$;;" ) } From a40974e28612b0d61129faaff7d2229d5e618216 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 16:45:00 +0100 Subject: [PATCH 0904/6109] check for existence and executable in manifest-run-all, because it's correct for manifest-run to fail if something is broken as it's used for init Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 3 +-- bin/cdist-manifest-run | 6 ------ bin/cdist-manifest-run-all | 24 +++++++++++++++--------- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 34662081..df14931b 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -49,10 +49,9 @@ cdist-dir push "$__cdist_target_host" "${__cdist_abs_mydir}" "${__cdist_remote_b cdist-explorer-run-global "$__cdist_target_host" cdist-manifest-run-init "$__cdist_target_host" +cdist-manifest-run-all "$__cdist_target_host" exit 1 - -cdist-manifest-run-all "$__cdist_target_host" cdist-object-explorer-all "$__cdist_target_host" cdist-object-gencode-all "$__cdist_target_host" diff --git a/bin/cdist-manifest-run b/bin/cdist-manifest-run index ae568c2a..d4ea18bb 100755 --- a/bin/cdist-manifest-run +++ b/bin/cdist-manifest-run @@ -53,10 +53,4 @@ cdist-type-build-emulation "${__cdist_out_type_bin_dir}" \ # prepend our path, so all cdist tools come before other tools export PATH="${__cdist_out_type_bin_dir}:$PATH" -# Sanity checks -[ -f "${__cdist_manifest}" ] \ - || __cdist_exit_err "Missing manifest ${__cdist_manifest}" -[ -x "${__cdist_manifest}" ] \ - || __cdist_exit_err "${__cdist_manifest} needs to be executable." - __cdist_exec_fail_on_error "${__cdist_manifest}" diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index f20171a7..ee15273c 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -47,21 +47,27 @@ while [ "$__cdist_new_objects_created" = "y" ]; do __cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object_self")" if [ ! -f "${__cdist_cur_object_dir}/$__cdist_name_object_finished" ]; then - echo "Checking manifest for ${__cdist_object} ..." + echo "Checking manifest for ${__cdist_object_self} ..." __cdist_type="$(__cdist_type_from_object "$__cdist_object_self")" __cdist_manifest="$(__cdist_type_manifest "${__cdist_type}")" - # Make __cdist_manifest available for cdist-type-emulator - export __cdist_manifest + if [ -f "$__cdist_manifest" ]; then + if [ -x "$__cdist_manifest" ]; then + # Make __cdist_manifest available for cdist-type-emulator + export __cdist_manifest - echo "Executing manifest ${__cdist_manifest} ..." - # Make variables available to non-core - FIXME: beatify - export $__cdist_name_var_object="$__cdist_cur_object_dir" - export $__cdist_name_var_object_id="$__cdist_object_id" - export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" + echo "Executing manifest ${__cdist_manifest} ..." + # Make variables available to non-core - FIXME: beatify + export $__cdist_name_var_object="$__cdist_cur_object_dir" + export $__cdist_name_var_object_id="$__cdist_object_id" + export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" - cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" + cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" + else + __cdist_exit_err "${__cdist_manifest} needs to be executable." + fi + fi fi # done with this object From c527e1a9c4d5eb1431c7c1c26e6c372ba6d08852 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 16:48:36 +0100 Subject: [PATCH 0905/6109] cleanup and make cdist-deploy-to run all stages again Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 2 -- bin/cdist-object-explorer-all | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index df14931b..9a2fd303 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -50,8 +50,6 @@ cdist-dir push "$__cdist_target_host" "${__cdist_abs_mydir}" "${__cdist_remote_b cdist-explorer-run-global "$__cdist_target_host" cdist-manifest-run-init "$__cdist_target_host" cdist-manifest-run-all "$__cdist_target_host" - -exit 1 cdist-object-explorer-all "$__cdist_target_host" cdist-object-gencode-all "$__cdist_target_host" diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all index 8654b03f..692a79bb 100755 --- a/bin/cdist-object-explorer-all +++ b/bin/cdist-object-explorer-all @@ -87,7 +87,7 @@ while [ $# -gt 0 ]; do # Execute explorers cdist-run-remote "$__cdist_target_host" \ - "__object=\"$(__cdist_remote_object_dir "$__object")\"" \ + "__object=\"$(__cdist_remote_object_dir "$__object")\"" \ "__object_id=\"$__object_id\"" \ cdist-remote-explorer-run \ "$__cdist_name_var_type_explorer" \ From 0d465400ea5317b56785ae78be2e2f92c6c52f8a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 16:51:20 +0100 Subject: [PATCH 0906/6109] less todo for nico Signed-off-by: Nico Schottelius --- doc/changelog | 4 +++- doc/dev/todo/niconext | 9 +++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/doc/changelog b/doc/changelog index f120e47d..25459951 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,5 +1,7 @@ -1.3.3: +1.4: * Add --recursive to __directory + * Move cdist generated stuff to .cdist of object + * Allow objects to be redefined 1.3.2: 2011-03-21 * Add --source to __motd diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 37c1884d..bf13881e 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,6 +1,3 @@ -- think about using .cdist for meta information? - - cleanup cdist-manifest-run-all - -later -- check cdist-manifest-run-all whether -x -f to manifest shouldn't be better - in cdist-manifest-run +Document redefine behaviour +release cdist 1.4.0 + perhaps include __self From ec7e836b1de12d24d507abcac88dae2b4f4c74b4 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 23 Mar 2011 17:16:43 +0100 Subject: [PATCH 0907/6109] doc: object-redefine Signed-off-by: Steven Armstrong --- doc/man/cdist-manifest.text | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/man/cdist-manifest.text b/doc/man/cdist-manifest.text index 7da90f71..701c8b98 100644 --- a/doc/man/cdist-manifest.text +++ b/doc/man/cdist-manifest.text @@ -15,8 +15,12 @@ host as well as to define which configurations should be applied within a type. Manifests are executed locally and the resulting objects are stored in an internal database. +The same object can be redefined in multiple different manifests as long as it is +exactly the same, that is, all its parameters are equal. + In general, manifests are used to define which types are used depending -on given conditions +on given conditions. + EXAMPLE ------- From 5e5334dee12d96ebd67960d852eb8837ea471497 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 17:24:21 +0100 Subject: [PATCH 0908/6109] prepare release 1.4.0 Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 +- doc/changelog | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 4cad1924..00872438 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -19,7 +19,7 @@ # # -__cdist_version="1.3.2" +__cdist_version="1.4.0" # Fail if something bogus is going on set -u diff --git a/doc/changelog b/doc/changelog index 25459951..f7241150 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,4 +1,4 @@ -1.4: +1.4.0: * Add --recursive to __directory * Move cdist generated stuff to .cdist of object * Allow objects to be redefined From f375b5cb91a8c7d2ef49873c6fb8ea8786f1c649 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 17:24:48 +0100 Subject: [PATCH 0909/6109] submit $__cdist_out_object_dir to cdist-code-run on target host Signed-off-by: Nico Schottelius --- bin/cdist-code-run-all | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/cdist-code-run-all b/bin/cdist-code-run-all index 3a360715..607929ce 100755 --- a/bin/cdist-code-run-all +++ b/bin/cdist-code-run-all @@ -43,8 +43,9 @@ while [ $# -ge 1 ]; do || __cdist_exit_err "Remote code failed for $object" # Code remote - cdist-run-remote "$__cdist_target_host" "cdist-code-run" \ - "${__cdist_remote_out_object_base_dir}" "$object" \ - "${__cdist_name_gencode_remote}" \ + cdist-run-remote "$__cdist_target_host" \ + "__cdist_out_object_dir=\"$__cdist_remote_out_object_base_dir\" \ + "cdist-code-run" "${__cdist_remote_out_object_base_dir}" "$object" \ + "${__cdist_name_gencode_remote}" \ || __cdist_exit_err "Remote code failed for $object" done < "$__cdist_tmp_file" From a48e5ca8a1ce8d6dfbd3d1d3ca5c05e5b291771a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 17:25:42 +0100 Subject: [PATCH 0910/6109] +" Signed-off-by: Nico Schottelius --- bin/cdist-code-run-all | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-code-run-all b/bin/cdist-code-run-all index 607929ce..90ef6443 100755 --- a/bin/cdist-code-run-all +++ b/bin/cdist-code-run-all @@ -44,7 +44,7 @@ while [ $# -ge 1 ]; do # Code remote cdist-run-remote "$__cdist_target_host" \ - "__cdist_out_object_dir=\"$__cdist_remote_out_object_base_dir\" \ + "__cdist_out_object_dir=\"$__cdist_remote_out_object_base_dir\"" \ "cdist-code-run" "${__cdist_remote_out_object_base_dir}" "$object" \ "${__cdist_name_gencode_remote}" \ || __cdist_exit_err "Remote code failed for $object" From 44ecd1f056a498d0ffb3d6216d1c75f6653eda7a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 17:27:27 +0100 Subject: [PATCH 0911/6109] i'm tired, doing stuff that's already in the lines Signed-off-by: Nico Schottelius --- bin/cdist-code-run-all | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/cdist-code-run-all b/bin/cdist-code-run-all index 90ef6443..49af7b3b 100755 --- a/bin/cdist-code-run-all +++ b/bin/cdist-code-run-all @@ -44,7 +44,6 @@ while [ $# -ge 1 ]; do # Code remote cdist-run-remote "$__cdist_target_host" \ - "__cdist_out_object_dir=\"$__cdist_remote_out_object_base_dir\"" \ "cdist-code-run" "${__cdist_remote_out_object_base_dir}" "$object" \ "${__cdist_name_gencode_remote}" \ || __cdist_exit_err "Remote code failed for $object" From 2bab4ed93b95c6c2cfb6f478131dceaef784ca71 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 23 Mar 2011 17:38:28 +0100 Subject: [PATCH 0912/6109] dont use python in type explorer Signed-off-by: Steven Armstrong --- conf/type/__apt_ppa/explorer/state | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/conf/type/__apt_ppa/explorer/state b/conf/type/__apt_ppa/explorer/state index c50af3f0..69af1937 100755 --- a/conf/type/__apt_ppa/explorer/state +++ b/conf/type/__apt_ppa/explorer/state @@ -23,6 +23,10 @@ name="$__object_id" -# FIXME: on first run check-apt-repository may not be installed -check-apt-repository "$name" && echo enabled || echo disabled +. /etc/lsb-release + +repo_name="${name#ppa:}" +repo_file_name="$(echo "$repo_name" | sed "s:\/:\-:")-${DISTRIB_CODENAME}.list" + +[ -f "/etc/apt/sources.list.d/${repo_file_name}" ] && echo enabled || echo disabled From f46b2a9a5a2434430506e93e1aec41aaef87beb2 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 23 Mar 2011 17:39:28 +0100 Subject: [PATCH 0913/6109] no longer need check-apt-repository Signed-off-by: Steven Armstrong --- .../type/__apt_ppa/files/check-apt-repository | 42 ------------------- conf/type/__apt_ppa/manifest | 6 +-- 2 files changed, 1 insertion(+), 47 deletions(-) delete mode 100755 conf/type/__apt_ppa/files/check-apt-repository diff --git a/conf/type/__apt_ppa/files/check-apt-repository b/conf/type/__apt_ppa/files/check-apt-repository deleted file mode 100755 index 4f4252c1..00000000 --- a/conf/type/__apt_ppa/files/check-apt-repository +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env python -# -# Check if the given apt repository is installed or not. -# Exit with: -# 0: if it is installed -# 1: if not -# 2: on error -# - -import sys -from aptsources import distro, sourceslist -from softwareproperties import ppa - - -def is_repository_installed(repository): - #print 'repository:', repository - codename = distro.get_distro().codename - #print 'codename:', codename - (line, file) = ppa.expand_ppa_line(repository.strip(), codename) - #print 'line:', line - #print 'file:', file - sources_list = sourceslist.SourcesList() - source_entry = sourceslist.SourceEntry(line, file) - - if source_entry in sources_list: - #print 'yes' - return True - else: - #print 'no' - return False - -if __name__ == '__main__': - if (len(sys.argv) != 2): - print 'Error: need a repository as argument' - sys.exit(2) - #repository = 'ppa:freenx-team' - repository = sys.argv[1] - if is_repository_installed(repository): - sys.exit(0) - else: - sys.exit(1) - diff --git a/conf/type/__apt_ppa/manifest b/conf/type/__apt_ppa/manifest index a97ced75..d5df9e23 100755 --- a/conf/type/__apt_ppa/manifest +++ b/conf/type/__apt_ppa/manifest @@ -18,14 +18,10 @@ # along with cdist. If not, see . # +name="$__object_id" __package python-software-properties --state installed -require="__package/python-software-properties" \ - __file /usr/local/bin/check-apt-repository \ - --source "$__type/files/check-apt-repository" \ - --mode 0755 - require="__package/python-software-properties" \ __file /usr/local/bin/remove-apt-repository \ --source "$__type/files/remove-apt-repository" \ From 0356d2eeff9f35ac6e33c926d41ad9cbca8a9103 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 23 Mar 2011 17:45:03 +0100 Subject: [PATCH 0914/6109] also check if sources file is not empty Signed-off-by: Steven Armstrong --- conf/type/__apt_ppa/explorer/state | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conf/type/__apt_ppa/explorer/state b/conf/type/__apt_ppa/explorer/state index 69af1937..86c401a4 100755 --- a/conf/type/__apt_ppa/explorer/state +++ b/conf/type/__apt_ppa/explorer/state @@ -28,5 +28,7 @@ name="$__object_id" repo_name="${name#ppa:}" repo_file_name="$(echo "$repo_name" | sed "s:\/:\-:")-${DISTRIB_CODENAME}.list" -[ -f "/etc/apt/sources.list.d/${repo_file_name}" ] && echo enabled || echo disabled +[ -f "/etc/apt/sources.list.d/${repo_file_name}" -a \ + -s "/etc/apt/sources.list.d/${repo_file_name}" ] \ + && echo enabled || echo disabled From e829fe65cd92cc66856d98908c1e445b1020d1e2 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 23 Mar 2011 21:14:17 +0100 Subject: [PATCH 0915/6109] checking for filesize already includes check for file existence Signed-off-by: Steven Armstrong --- conf/type/__apt_ppa/explorer/state | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/conf/type/__apt_ppa/explorer/state b/conf/type/__apt_ppa/explorer/state index 86c401a4..8a5638b2 100755 --- a/conf/type/__apt_ppa/explorer/state +++ b/conf/type/__apt_ppa/explorer/state @@ -28,7 +28,6 @@ name="$__object_id" repo_name="${name#ppa:}" repo_file_name="$(echo "$repo_name" | sed "s:\/:\-:")-${DISTRIB_CODENAME}.list" -[ -f "/etc/apt/sources.list.d/${repo_file_name}" -a \ - -s "/etc/apt/sources.list.d/${repo_file_name}" ] \ +[ -s "/etc/apt/sources.list.d/${repo_file_name}" ] \ && echo enabled || echo disabled From 1e66bc43803a5be74e36346944fc00acf847c24f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 23 Mar 2011 23:54:13 +0100 Subject: [PATCH 0916/6109] exchange new and object dir (good idea, steven) Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 18069b44..088286e9 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -71,11 +71,11 @@ __cdist_out_object_dir_orig="$__cdist_out_object_dir" # Store to tmp now __cdist_out_object_dir="$__cdist_tmp_dir" -__cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" +__cdist_new_object_dir="$(__cdist_object_dir "$__cdist_object_self")" # Record source -mkdir -p "${__cdist_object_dir}" -__cdist_object_source_add "${__cdist_object_dir}" +mkdir -p "${__cdist_new_object_dir}" +__cdist_object_source_add "${__cdist_new_object_dir}" # Record parameter __cdist_parameter_dir="$(__cdist_object_parameter_dir "$__cdist_object_self")" @@ -147,15 +147,15 @@ done # Restore original destination __cdist_out_object_dir="$__cdist_out_object_dir_orig" -__cdist_new_object_dir="$(__cdist_object_dir "$__cdist_object_self")" +__cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" # # If the object already exists and is exactly the same, merge it. Otherwise fail. # -if [ -e "${__cdist_new_object_dir}" ]; then +if [ -e "${__cdist_object_dir}" ]; then # Allow diff to fail set +e - diff -ru "${__cdist_object_dir}" "${__cdist_new_object_dir}" \ + diff -ru "${__cdist_new_object_dir}" "${__cdist_object_dir}" \ > "$__cdist_tmp_file"; ret=$? set -e @@ -164,14 +164,14 @@ if [ -e "${__cdist_new_object_dir}" ]; then exec >&2 echo "${__cdist_object_self} already exists differently." echo "Recorded source(s):" - __cdist_object_source "${__cdist_new_object_dir}" + __cdist_object_source "${__cdist_object_dir}" echo "Differences:" cat "$__cdist_tmp_file" __cdist_exit_err "Aborting due to object conflict." fi # Add ourselves, if we're compatible - __cdist_object_source_add "${__cdist_new_object_dir}" + __cdist_object_source_add "${__cdist_object_dir}" else # # Move object into tree: @@ -179,5 +179,5 @@ else # __cdist_new_object_base_dir="$(__cdist_object_base_dir "$__cdist_object_self")" mkdir -p "$__cdist_new_object_base_dir" - mv "$__cdist_object_dir" "$__cdist_new_object_base_dir" + mv "$__cdist_new_object_dir" "$__cdist_new_object_base_dir" fi From b44734e70a47a71dffc269aecdb0862fcfc1063f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 00:27:40 +0100 Subject: [PATCH 0917/6109] local != remote Signed-off-by: Nico Schottelius --- bin/cdist-code-run-all | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-code-run-all b/bin/cdist-code-run-all index 49af7b3b..f301864b 100755 --- a/bin/cdist-code-run-all +++ b/bin/cdist-code-run-all @@ -40,7 +40,7 @@ while [ $# -ge 1 ]; do # Code local cdist-code-run "$__cdist_out_object_dir" "$object" \ "${__cdist_name_gencode_local}" \ - || __cdist_exit_err "Remote code failed for $object" + || __cdist_exit_err "Local code failed for $object" # Code remote cdist-run-remote "$__cdist_target_host" \ From 9094f50b035421e2d773f08ce54bbb0a477262fd Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 24 Mar 2011 08:30:51 +0100 Subject: [PATCH 0918/6109] new type: __apt_update_index Signed-off-by: Steven Armstrong --- conf/type/__apt_update_index/gencode-remote | 35 ++++++++++++++++ conf/type/__apt_update_index/man.text | 44 +++++++++++++++++++++ conf/type/__apt_update_index/singleton | 0 3 files changed, 79 insertions(+) create mode 100755 conf/type/__apt_update_index/gencode-remote create mode 100644 conf/type/__apt_update_index/man.text create mode 100644 conf/type/__apt_update_index/singleton diff --git a/conf/type/__apt_update_index/gencode-remote b/conf/type/__apt_update_index/gencode-remote new file mode 100755 index 00000000..ad2296df --- /dev/null +++ b/conf/type/__apt_update_index/gencode-remote @@ -0,0 +1,35 @@ +#!/bin/sh +# +# 2011 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 . +# + +# BIG FAT FIXME: there must be a better way to do this! +tmpdir=$(mktemp -d) +cleanup() { + rm -rf "$tmpdir" +} +trap cleanup EXIT + +should="$tmpdir/should" +is="$tmpdir/is" + +find "$__global/object/__apt_ppa" -path "*.cdist/parameter/state" | xargs cat > "$should" +find "$__global/object/__apt_ppa" -path "*.cdist/explorer/state" | xargs cat > "$is" + +diff -ru "$is" "$should" || echo apt-get update + diff --git a/conf/type/__apt_update_index/man.text b/conf/type/__apt_update_index/man.text new file mode 100644 index 00000000..dffba372 --- /dev/null +++ b/conf/type/__apt_update_index/man.text @@ -0,0 +1,44 @@ +cdist-type__apt_update_index(7) +========================== +Steven Armstrong + + +NAME +---- +cdist-type__apt_update_index - resynchronize the apt package index + + +DESCRIPTION +----------- +This cdist type allows you to resynchronize the package index files from their +sources. In other words, it runs `apt-get update`. + +FIXME: currently hard coded to work together with the __apt_ppa type + + +REQUIRED PARAMETERS +------------------- +None. + +OPTIONAL PARAMETERS +------------------- +None. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +__apt_update_index +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +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). diff --git a/conf/type/__apt_update_index/singleton b/conf/type/__apt_update_index/singleton new file mode 100644 index 00000000..e69de29b From 15b1bdab7791033a6154a75d0000ee4069fe8fa0 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 24 Mar 2011 08:31:23 +0100 Subject: [PATCH 0919/6109] use __apt_update_index Signed-off-by: Steven Armstrong --- conf/type/__apt_ppa/manifest | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/conf/type/__apt_ppa/manifest b/conf/type/__apt_ppa/manifest index d5df9e23..ad6ee614 100755 --- a/conf/type/__apt_ppa/manifest +++ b/conf/type/__apt_ppa/manifest @@ -27,3 +27,8 @@ require="__package/python-software-properties" \ --source "$__type/files/remove-apt-repository" \ --mode 0755 +# FIXME: rewrite to use $__self once that exists +# FIXME: only run if something changed. currently working arround this in +# __apt_update_index/gencode-remote +require="__apt_ppa/$__object_id" __apt_update_index + From 7a294bf41d165eaeac22f3698db4dc2697c95107 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 10:13:52 +0100 Subject: [PATCH 0920/6109] always setup __cdist_out_object_dir, which needs to be done anyway Signed-off-by: Nico Schottelius --- bin/cdist-code-run | 7 ++----- bin/cdist-code-run-all | 10 +++++----- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/bin/cdist-code-run b/bin/cdist-code-run index 229d4d1d..a6a9137f 100755 --- a/bin/cdist-code-run +++ b/bin/cdist-code-run @@ -22,12 +22,9 @@ # . cdist-config -[ $# -eq 3 ] || __cdist_usage " " +[ $# -eq 2 ] || __cdist_usage " " set -ue -# This variable MUST be exactly like this - see __cdist_object_dir -__cdist_out_object_dir="$1"; shift - object="$1"; shift __cdist_gencode_type="$1"; shift @@ -50,7 +47,7 @@ echo "Checking code-${__cdist_gencode_type} for $object ..." if [ -f "$require" ]; then while read requirement; do echo "Requiring dependency $requirement for $object ..." - cdist-code-run "$__cdist_out_object_dir" "$requirement" "$__cdist_gencode_type" + cdist-code-run "$requirement" "$__cdist_gencode_type" done < "$require" fi diff --git a/bin/cdist-code-run-all b/bin/cdist-code-run-all index f301864b..1486cc46 100755 --- a/bin/cdist-code-run-all +++ b/bin/cdist-code-run-all @@ -38,13 +38,13 @@ while [ $# -ge 1 ]; do object="$1"; shift # Code local - cdist-code-run "$__cdist_out_object_dir" "$object" \ - "${__cdist_name_gencode_local}" \ + export __cdist_out_object_dir="$__cdist_out_object_dir" + cdist-code-run "$object" "${__cdist_name_gencode_local}" \ || __cdist_exit_err "Local code failed for $object" # Code remote - cdist-run-remote "$__cdist_target_host" \ - "cdist-code-run" "${__cdist_remote_out_object_base_dir}" "$object" \ - "${__cdist_name_gencode_remote}" \ + cdist-run-remote "$__cdist_target_host" \ + "export __cdist_out_object_dir=\"$__cdist_remote_out_object_base_dir\";" \ + "cdist-code-run" "$object" "${__cdist_name_gencode_remote}" \ || __cdist_exit_err "Remote code failed for $object" done < "$__cdist_tmp_file" From 79eec9bd236febbb3cbace6a93f5820deed47e7f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 10:17:43 +0100 Subject: [PATCH 0921/6109] make PATH setting independent of further code Signed-off-by: Nico Schottelius --- bin/cdist-run-remote | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-run-remote b/bin/cdist-run-remote index 87af8459..93cf9062 100755 --- a/bin/cdist-run-remote +++ b/bin/cdist-run-remote @@ -28,4 +28,4 @@ set -ue __cdist_target_host="$1"; shift ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "PATH=\"${__cdist_remote_bin_dir}:\$PATH\"" "$@" + "export PATH=\"${__cdist_remote_bin_dir}:\$PATH\";" "$@" From 762c0b493525a4318cea35ec252e64269ee1a647 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 10:24:51 +0100 Subject: [PATCH 0922/6109] BUGFIX: marker reset got lost during migration to cdist-type-emulator Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-all | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all index ee15273c..a431576d 100755 --- a/bin/cdist-manifest-run-all +++ b/bin/cdist-manifest-run-all @@ -64,6 +64,7 @@ while [ "$__cdist_new_objects_created" = "y" ]; do export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" + __cdist_new_objects_created=y else __cdist_exit_err "${__cdist_manifest} needs to be executable." fi From 914ec3104ea1b2c1e4a7b524189615c84949a1f7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 10:27:05 +0100 Subject: [PATCH 0923/6109] only append source in final tree, otherwise we always conflict Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 088286e9..32f3ccb2 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -73,9 +73,8 @@ __cdist_out_object_dir="$__cdist_tmp_dir" __cdist_new_object_dir="$(__cdist_object_dir "$__cdist_object_self")" -# Record source +# Initialise object mkdir -p "${__cdist_new_object_dir}" -__cdist_object_source_add "${__cdist_new_object_dir}" # Record parameter __cdist_parameter_dir="$(__cdist_object_parameter_dir "$__cdist_object_self")" From 4d2e03b96613dd10fb3573c547d5166ee596f5b7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 10:28:50 +0100 Subject: [PATCH 0924/6109] always add source, even if everything went successful... Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 32f3ccb2..46ba3a57 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -168,9 +168,6 @@ if [ -e "${__cdist_object_dir}" ]; then cat "$__cdist_tmp_file" __cdist_exit_err "Aborting due to object conflict." fi - - # Add ourselves, if we're compatible - __cdist_object_source_add "${__cdist_object_dir}" else # # Move object into tree: @@ -180,3 +177,6 @@ else mkdir -p "$__cdist_new_object_base_dir" mv "$__cdist_new_object_dir" "$__cdist_new_object_base_dir" fi + +# Add "I was here message" +__cdist_object_source_add "${__cdist_object_dir}" From b20a50899a7bb9d5a0a89b6e4afbb1bec55c9743 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 10:35:29 +0100 Subject: [PATCH 0925/6109] only diff parameters ? Signed-off-by: Nico Schottelius --- bin/cdist-type-emulator | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index 46ba3a57..6294870a 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -154,7 +154,8 @@ __cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" if [ -e "${__cdist_object_dir}" ]; then # Allow diff to fail set +e - diff -ru "${__cdist_new_object_dir}" "${__cdist_object_dir}" \ + diff -ru "${__cdist_new_object_dir}/${__cdist_name_parameter}" \ + "${__cdist_object_dir}/${__cdist_name_parameter}" \ > "$__cdist_tmp_file"; ret=$? set -e From 0b1957f5dfecd74f487bc9b925a369a05c601ba6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 13:27:22 +0100 Subject: [PATCH 0926/6109] clearify parameters Signed-off-by: Nico Schottelius --- doc/man/cdist-manifest.text | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/man/cdist-manifest.text b/doc/man/cdist-manifest.text index 701c8b98..04f1c56c 100644 --- a/doc/man/cdist-manifest.text +++ b/doc/man/cdist-manifest.text @@ -15,8 +15,8 @@ host as well as to define which configurations should be applied within a type. Manifests are executed locally and the resulting objects are stored in an internal database. -The same object can be redefined in multiple different manifests as long as it is -exactly the same, that is, all its parameters are equal. +The same object can be redefined in multiple different manifests as long as +the parameters are exactly the same. In general, manifests are used to define which types are used depending on given conditions. From 84bc0511fbe730dbc1e17338b9db85003adda0c9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 13:28:35 +0100 Subject: [PATCH 0927/6109] update to 1.4.0 Signed-off-by: Nico Schottelius --- doc/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/changelog b/doc/changelog index f7241150..f78b1660 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,6 +1,6 @@ -1.4.0: +1.4.0: 2011-03-24 * Add --recursive to __directory - * Move cdist generated stuff to .cdist of object + * Move cdist generated stuff to .cdist of an object * Allow objects to be redefined 1.3.2: 2011-03-21 From b02141eedab7639ad1eef020232d00bd7b04f4c8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 13:30:08 +0100 Subject: [PATCH 0928/6109] update website to reference 1.4 branch Signed-off-by: Nico Schottelius --- README | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README b/README index e7345a78..feca4bc4 100644 --- a/README +++ b/README @@ -120,13 +120,14 @@ how to use cdist. There are at least the following branches available: * master: the development branch - * 1.3: Support for local and remote code execution (current stable) + * 1.4: Support for redefiniton of objects (if equal) Old versions: - * 1.0: First official release - * 1.1: __file to __file, __directory, __link migration + * 1.3: Support for local and remote code execution (current stable) * 1.2: Dependencies supported + * 1.1: __file to __file, __directory, __link migration + * 1.0: First official release Other branches may be available for features or bugfixes, but they may vanish at any point. To select a specific branch use @@ -156,6 +157,10 @@ If you stay on a version branche (i.e. 1.0, 1.1., ...), nothing should break. The master branch on the other hand is the development branch and may not be working, break your setup or eat the tree in your garden. +### Upgrading from 1.3 to 1.4 + +No incompatiblities. + ### Upgrading from 1.2 to 1.3 Rename **gencode** of every type to **gencode-remote**. From c7ef2210fc34f39d5d73a526af4810d4e46dd4cc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 13:32:09 +0100 Subject: [PATCH 0929/6109] update manpage for __apt_ppa Signed-off-by: Nico Schottelius --- conf/type/__apt_ppa/man.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__apt_ppa/man.text b/conf/type/__apt_ppa/man.text index 73fabc7f..5423a1a2 100644 --- a/conf/type/__apt_ppa/man.text +++ b/conf/type/__apt_ppa/man.text @@ -1,5 +1,5 @@ cdist-type__apt_ppa(7) -========================== +====================== Steven Armstrong From 17c6a650ff4a8124634d6eba41c1556749f05c87 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 15:06:56 +0100 Subject: [PATCH 0930/6109] change workflow proposal Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 9a2fd303..7a63f5ca 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -50,6 +50,8 @@ cdist-dir push "$__cdist_target_host" "${__cdist_abs_mydir}" "${__cdist_remote_b cdist-explorer-run-global "$__cdist_target_host" cdist-manifest-run-init "$__cdist_target_host" cdist-manifest-run-all "$__cdist_target_host" + +# Change workflow here: cdist-object-{apply, run, foo} cdist-object-explorer-all "$__cdist_target_host" cdist-object-gencode-all "$__cdist_target_host" @@ -59,4 +61,6 @@ cdist-dir push "$__cdist_target_host" "$__cdist_out_object_dir" \ cdist-code-run-all "$__cdist_target_host" +# Stop change here + echo "cdist $__cdist_version: Successfully finished run on $__cdist_target_host" From 33552e5930b0958c1d0930cfa5f92ac7abe7532e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 15:26:06 +0100 Subject: [PATCH 0931/6109] [DOC] include hackers manpage Signed-off-by: Nico Schottelius --- Makefile | 1 + doc/man/cdist-hacker.text | 65 +++++++++++++++++++++++++++++++++++++++ doc/man/cdist.text | 1 + 3 files changed, 67 insertions(+) create mode 100644 doc/man/cdist-hacker.text diff --git a/Makefile b/Makefile index 29d86c67..fea5a8ea 100644 --- a/Makefile +++ b/Makefile @@ -28,6 +28,7 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-explorer-run-global.text \ $(MANDIR)/cdist-deploy-to.text \ $(MANDIR)/cdist-explorer.text \ + $(MANDIR)/cdist-hacker.text \ $(MANDIR)/cdist-manifest.text \ $(MANDIR)/cdist-manifest-run.text \ $(MANDIR)/cdist-manifest-run-all.text \ diff --git a/doc/man/cdist-hacker.text b/doc/man/cdist-hacker.text new file mode 100644 index 00000000..093eaf61 --- /dev/null +++ b/doc/man/cdist-hacker.text @@ -0,0 +1,65 @@ +cdist-hacker(7) +=============== +Nico Schottelius + + +NAME +---- +cdist-hacker - How to get (stuff) into cdist + + +WELCOME +------- +Welcome dear hacker! I invite you to a tour of pointers to +get into the usable configuration mangament system, cdist. + +The first thing to know is probably that cdist is brought to +you by people who care about how code looks like and who think +twice before merging or implementing a feature: Less features +with good usability are far better than the opposite. + + +UNDERSTANDING CDIST INTERNALS +----------------------------- +IF you are interested in how cdist internally works, you can open +bin/cdist-config and bin/cdist-deploy-to in your favorite editor and +read the scripts bin/cdist-deploy-to calls. The magnificent HACKERS_README +may be of great help as well. + + +HOW TO SUBMIT STUFF FOR INCLUSION INTO UPSTREAM CDIST +----------------------------------------------------- +If you did some cool changes to cdist, which you value as a benefit for +everybody using cdist, you're welcome to propose inclusion into upstream. + +There are though some requirements to ensure your changes don't break others +work nor kill the authors brain: + +- Code submission must be done via git +- Code to be included should be branched of the upstream "master" branch + - Exception: Bugfixes to a version branch +- Code submissions must be in your master branch + - Exception: If you only want a comment on your code, but not an inclusion. + +As soon as your work meets these requirements, you can contact me +(IRC, Mailinglist, Phone, RFC 1149) and I'll check your code before +including it. + + +HOW TO SUBMIT A NEW TYPE +------------------------ +Submitting a type works as described above, with the additional requirement +that a corresponding manpage named man.text in asciidoc format with +the manpage-name "cdist-type__NAME" is included in the type directory +AND asciidoc is able to compile it. + + +SEE ALSO +-------- +- cdist(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/doc/man/cdist.text b/doc/man/cdist.text index 957e7cb4..44be52b1 100644 --- a/doc/man/cdist.text +++ b/doc/man/cdist.text @@ -32,6 +32,7 @@ SEE ALSO - Website: http://www.nico.schottelius.org/cdist/[] - cdist-best-practise(7) - cdist-deploy-to(1) +- cdist-hacker(7) - cdist-manifest(7) - cdist-quickstart(1) - cdist-type(7) From c9680285962c33fa3f5f936ca3f79da831ffa552 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 15:28:07 +0100 Subject: [PATCH 0932/6109] Revert "use __apt_update_index" (until it works) This reverts commit 15b1bdab7791033a6154a75d0000ee4069fe8fa0. --- conf/type/__apt_ppa/manifest | 5 ----- 1 file changed, 5 deletions(-) diff --git a/conf/type/__apt_ppa/manifest b/conf/type/__apt_ppa/manifest index ad6ee614..d5df9e23 100755 --- a/conf/type/__apt_ppa/manifest +++ b/conf/type/__apt_ppa/manifest @@ -27,8 +27,3 @@ require="__package/python-software-properties" \ --source "$__type/files/remove-apt-repository" \ --mode 0755 -# FIXME: rewrite to use $__self once that exists -# FIXME: only run if something changed. currently working arround this in -# __apt_update_index/gencode-remote -require="__apt_ppa/$__object_id" __apt_update_index - From 0961e003be1a8dfbba0529cd12f25fdcbae837ac Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 15:28:20 +0100 Subject: [PATCH 0933/6109] Revert "new type: __apt_update_index" (until it works) This reverts commit 9094f50b035421e2d773f08ce54bbb0a477262fd. --- conf/type/__apt_update_index/gencode-remote | 35 ---------------- conf/type/__apt_update_index/man.text | 44 --------------------- conf/type/__apt_update_index/singleton | 0 3 files changed, 79 deletions(-) delete mode 100755 conf/type/__apt_update_index/gencode-remote delete mode 100644 conf/type/__apt_update_index/man.text delete mode 100644 conf/type/__apt_update_index/singleton diff --git a/conf/type/__apt_update_index/gencode-remote b/conf/type/__apt_update_index/gencode-remote deleted file mode 100755 index ad2296df..00000000 --- a/conf/type/__apt_update_index/gencode-remote +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# -# 2011 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 . -# - -# BIG FAT FIXME: there must be a better way to do this! -tmpdir=$(mktemp -d) -cleanup() { - rm -rf "$tmpdir" -} -trap cleanup EXIT - -should="$tmpdir/should" -is="$tmpdir/is" - -find "$__global/object/__apt_ppa" -path "*.cdist/parameter/state" | xargs cat > "$should" -find "$__global/object/__apt_ppa" -path "*.cdist/explorer/state" | xargs cat > "$is" - -diff -ru "$is" "$should" || echo apt-get update - diff --git a/conf/type/__apt_update_index/man.text b/conf/type/__apt_update_index/man.text deleted file mode 100644 index dffba372..00000000 --- a/conf/type/__apt_update_index/man.text +++ /dev/null @@ -1,44 +0,0 @@ -cdist-type__apt_update_index(7) -========================== -Steven Armstrong - - -NAME ----- -cdist-type__apt_update_index - resynchronize the apt package index - - -DESCRIPTION ------------ -This cdist type allows you to resynchronize the package index files from their -sources. In other words, it runs `apt-get update`. - -FIXME: currently hard coded to work together with the __apt_ppa type - - -REQUIRED PARAMETERS -------------------- -None. - -OPTIONAL PARAMETERS -------------------- -None. - - -EXAMPLES --------- - --------------------------------------------------------------------------------- -__apt_update_index --------------------------------------------------------------------------------- - - -SEE ALSO --------- -- cdist-type(7) - - -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). diff --git a/conf/type/__apt_update_index/singleton b/conf/type/__apt_update_index/singleton deleted file mode 100644 index e69de29b..00000000 From b34a40b9e83895c00659ecdbbb8421208cc69c43 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 15:37:16 +0100 Subject: [PATCH 0934/6109] update makefile Signed-off-by: Nico Schottelius --- Makefile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index fea5a8ea..a545b749 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,8 @@ all: man: doc/man/.marker -doc/man/.marker: $(MANDIR)/cdist-reference.text +# FIXME: also depends on conf/type/*/man.text! +doc/man/.marker: manmove touch $@ # Manual from core @@ -75,7 +76,7 @@ mantype: for man in conf/type/*/man.text; do $(A2XM) $$man; $(A2XH) $$man; done # Move into manpath directories -manmove: mantype mancore +manmove: mantype mancore $(MANGENERATED) for manpage in $(MANDIR)/*.[1-9] conf/type/*/*.7; do \ cat=$${manpage##*.}; \ mandir=$(MANDIR)/man$$cat; \ @@ -91,15 +92,13 @@ manmove: mantype mancore done # 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: $(MANDIR)/cdist-reference.text.sh $(MANDIR)/cdist-reference.text.sh $(A2XM) $(MANDIR)/cdist-reference.text $(A2XH) $(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) + rm -rf doc/man/html/* doc/man/*.[1-9] doc/man/man[1-9] $(MANGENERATED) rm -f conf/type/*/man.html rm -rf doc/html @@ -115,8 +114,7 @@ test: # gentoo .rsync nicosc@ru3.inf.ethz.ch:cdist -#web: manmove -web: +web: man cp README $(WEBDIR)/$(WEBPAGE) cp -r doc/html/* $(WEBDIR)/$(WEBBASE)/man cd $(WEBDIR) && git commit -m "cdist update" $(WEBBASE) $(WEBPAGE) From 6d4f702eacd0b82d9daf8b5ff7cdfe063fb6d2b5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 15:39:26 +0100 Subject: [PATCH 0935/6109] shrink hackers_readme in favor for the manpage Signed-off-by: Nico Schottelius --- HACKERS_README | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/HACKERS_README b/HACKERS_README index 0ae1bdcd..66103acc 100755 --- a/HACKERS_README +++ b/HACKERS_README @@ -3,21 +3,12 @@ cat << eof Hey hackers, this README is for you, for those who want to dig into cdist, hack it or try -to get a deeper understanding. - -A lot of documentation is still missing, but running cdist-quickstart should -give you an impression of how cdist works. +to get a deeper understanding. Please read doc/man/cdist-hacker.text. I hope you have a lot of fun with cdist, because it was also a lot of fun to develop it! - -- Nico, 20110304 - - -## Conventions - -- All variables exported by cdist are prefixed with a double underscore (__) -- All cdist-internal variables are prefixed with __cdist_ and are generally not exported. + -- Nico, 20110324 ## Running cdist when developing From fa2f49e847942d07b86e167c3ae4e40c5e4945a6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 15:42:06 +0100 Subject: [PATCH 0936/6109] also git add html pages Signed-off-by: Nico Schottelius --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index a545b749..d7706926 100644 --- a/Makefile +++ b/Makefile @@ -117,6 +117,7 @@ test: web: man cp README $(WEBDIR)/$(WEBPAGE) cp -r doc/html/* $(WEBDIR)/$(WEBBASE)/man + cd $(WEBDIR) && git add $(WEBBASE)/man cd $(WEBDIR) && git commit -m "cdist update" $(WEBBASE) $(WEBPAGE) cd $(WEBDIR) && make pub From b14f7a431c8e68b2edf7e685ee3cc31404b10f05 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 15:45:31 +0100 Subject: [PATCH 0937/6109] rm mandir on webpage before copying (removes old manpages) Signed-off-by: Nico Schottelius --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index d7706926..1023d541 100644 --- a/Makefile +++ b/Makefile @@ -116,6 +116,7 @@ test: web: man cp README $(WEBDIR)/$(WEBPAGE) + rm -rf $(WEBDIR)/$(WEBBASE)/man && mkdir $(WEBDIR)/$(WEBBASE)/man cp -r doc/html/* $(WEBDIR)/$(WEBBASE)/man cd $(WEBDIR) && git add $(WEBBASE)/man cd $(WEBDIR) && git commit -m "cdist update" $(WEBBASE) $(WEBPAGE) From e685df7aa193938c8f392d8f5bdb456242812be0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 15:49:22 +0100 Subject: [PATCH 0938/6109] -typo Signed-off-by: Nico Schottelius --- doc/man/cdist-env.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/cdist-env.text b/doc/man/cdist-env.text index cf54d363..9a736133 100644 --- a/doc/man/cdist-env.text +++ b/doc/man/cdist-env.text @@ -32,7 +32,7 @@ in csh variants (csh, tcsh): eval `./bin/cdist-env` -------------------------------------------------------------------------------- -For bourne shell, the is also a shorter version: +For bourne shell, there is also a shorter version: -------------------------------------------------------------------------------- . ./bin/cdist-env -------------------------------------------------------------------------------- From c72833ce748b8be5d763bb7006af1ed3b8f02630 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 15:58:47 +0100 Subject: [PATCH 0939/6109] comment about conf/manifest/init in cdist-hacker Signed-off-by: Nico Schottelius --- doc/man/cdist-hacker.text | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/man/cdist-hacker.text b/doc/man/cdist-hacker.text index 093eaf61..d55f1c2f 100644 --- a/doc/man/cdist-hacker.text +++ b/doc/man/cdist-hacker.text @@ -27,6 +27,12 @@ read the scripts bin/cdist-deploy-to calls. The magnificent HACKERS_README may be of great help as well. +CODING CONVENTIONS (CORE) +------------------------- +- All variables exported by cdist are prefixed with a double underscore (__) +- All cdist-internal variables are prefixed with __cdist_ and are generally not exported. + + HOW TO SUBMIT STUFF FOR INCLUSION INTO UPSTREAM CDIST ----------------------------------------------------- If you did some cool changes to cdist, which you value as a benefit for @@ -40,6 +46,8 @@ work nor kill the authors brain: - Exception: Bugfixes to a version branch - Code submissions must be in your master branch - Exception: If you only want a comment on your code, but not an inclusion. +- Do not add conf/manifest/init - This file should only be touched in your + private branch! As soon as your work meets these requirements, you can contact me (IRC, Mailinglist, Phone, RFC 1149) and I'll check your code before From de81a2e80e6117243a7e1257a34b7701c87bb0dd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 16:00:46 +0100 Subject: [PATCH 0940/6109] change todos Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 26 +++++++++++++++++++++++--- doc/dev/todo/post-1.3 | 27 --------------------------- 2 files changed, 23 insertions(+), 30 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index bf13881e..3556f371 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,3 +1,23 @@ -Document redefine behaviour -release cdist 1.4.0 - perhaps include __self +Core: + - support $__self = relative_type/object_id + - cache + +Cache: + Assume you want to configure stuff one host ("monitor node"), + depending on the configuration of other hosts ("cluster nodes"). + + For instance, the monitor host would like to know, + which hosts are configured with the provider + "apache" and option --start true. + + This requires the monitor node to be able to + query all other configured nodes. It can't + ask for all hosts, because cdist does not + know which hosts are configured or may exist. + + Example implementation + + If cdist keeps ("caches") the configuration of every + node it configures, each new node can query the + cache for existing nodes that acquired the given + configuration. diff --git a/doc/dev/todo/post-1.3 b/doc/dev/todo/post-1.3 index ec186d3a..c73a623b 100644 --- a/doc/dev/todo/post-1.3 +++ b/doc/dev/todo/post-1.3 @@ -1,30 +1,3 @@ -Core: - - allow redefine object, if everything same - - support $__self = relative_type/object_id - - .cdist - - cache - - display changes if object cannot be merged to user - -Cache: - Assume you want to configure stuff one host ("monitor node"), - depending on the configuration of other hosts ("cluster nodes"). - - For instance, the monitor host would like to know, - which hosts are configured with the provider - "apache" and option --start true. - - This requires the monitor node to be able to - query all other configured nodes. It can't - ask for all hosts, because cdist does not - know which hosts are configured or may exist. - - Example implementation - - If cdist keeps ("caches") the configuration of every - node it configures, each new node can query the - cache for existing nodes that acquired the given - configuration. - Types to be written/extended: - __ssh-keys (host/user) - __service From cd8ab7664a1f6a11b420f003d717a17f1914f627 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 16:02:15 +0100 Subject: [PATCH 0941/6109] rename post-1.3 todo Signed-off-by: Nico Schottelius --- doc/dev/todo/{post-1.3 => TAKEME} | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) rename doc/dev/todo/{post-1.3 => TAKEME} (54%) diff --git a/doc/dev/todo/post-1.3 b/doc/dev/todo/TAKEME similarity index 54% rename from doc/dev/todo/post-1.3 rename to doc/dev/todo/TAKEME index c73a623b..9fa083cc 100644 --- a/doc/dev/todo/post-1.3 +++ b/doc/dev/todo/TAKEME @@ -1,6 +1,10 @@ +The following list of todos has not been assigned to any developer. + +Feel free to pick one: + Types to be written/extended: - __ssh-keys (host/user) - - __service + - Think about __service - necessary? - __file_edit - regexp replace (can probably cover all?) -> aka sed. From f02254915a01640976368abedfc756f02bb99eb0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 17:41:20 +0100 Subject: [PATCH 0942/6109] begin to cleanup manpage generation Signed-off-by: Nico Schottelius --- Makefile | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 1023d541..93faa58a 100644 --- a/Makefile +++ b/Makefile @@ -16,10 +16,8 @@ WEBPAGE=$(WEBBASE).mdwn # Documentation MANDIR=doc/man -MANGENERATED=$(MANDIR)/cdist-reference.text -MANSRC=$(MANDIR)/cdist.text \ - $(MANDIR)/cdist-best-practise.text \ +MAN1SRC= \ $(MANDIR)/cdist-code-run.text \ $(MANDIR)/cdist-code-run-all.text \ $(MANDIR)/cdist-config.text \ @@ -28,23 +26,29 @@ MANSRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-explorer-run-global.text \ $(MANDIR)/cdist-deploy-to.text \ $(MANDIR)/cdist-explorer.text \ - $(MANDIR)/cdist-hacker.text \ $(MANDIR)/cdist-manifest.text \ $(MANDIR)/cdist-manifest-run.text \ - $(MANDIR)/cdist-manifest-run-all.text \ $(MANDIR)/cdist-manifest-run-init.text \ + $(MANDIR)/cdist-manifest-run-all.text \ $(MANDIR)/cdist-object-explorer-all.text \ $(MANDIR)/cdist-object-gencode.text \ $(MANDIR)/cdist-object-gencode-all.text \ - $(MANDIR)/cdist-quickstart.text \ $(MANDIR)/cdist-remote-explorer-run.text \ $(MANDIR)/cdist-run-remote.text \ - $(MANDIR)/cdist-stages.text \ - $(MANDIR)/cdist-type.text \ $(MANDIR)/cdist-type-build-emulation.text \ $(MANDIR)/cdist-type-emulator.text \ $(MANDIR)/cdist-type-template.text \ +MAN7SRC=$(MANDIR)/cdist.text \ + $(MANDIR)/cdist-best-practise.text \ + $(MANDIR)/cdist-hacker.text \ + $(MANDIR)/cdist-quickstart.text \ + $(MANDIR)/cdist-reference.text \ + $(MANDIR)/cdist-stages.text \ + $(MANDIR)/cdist-type.text \ + +MAN1DST=$(MAN1SRC:.text=.1) +MAN7DST=$(MAN1SRC:.text=.7) ################################################################################ # User targets From 3dc37c17a33dccac168d26e7eace09e46f94ae9f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 18:32:53 +0100 Subject: [PATCH 0943/6109] require gnu make for manpages Signed-off-by: Nico Schottelius --- README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index feca4bc4..389470a0 100644 --- a/README +++ b/README @@ -107,7 +107,7 @@ To install cdist, execute the following commands: cd cdist export PATH=$PATH:$(pwd -P)/bin - # If you want the manpages (requires asciidoc to be installed) + # If you want the manpages (requires gmake and asciidoc to be installed) make man export MANPATH=$MANPATH:$(pwd -P)/doc/man @@ -136,7 +136,7 @@ may vanish at any point. To select a specific branch use git checkout -b origin/ # Stay on a specific version - git checkout -b 1.3 origin/1.3 + git checkout -b 1.4 origin/1.4 ### Mirrors From 0370412757d3ead117c54bcf434c17ed1f328ede Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 18:43:08 +0100 Subject: [PATCH 0944/6109] manpage generation cleaup Signed-off-by: Nico Schottelius --- Makefile | 41 ++++++++++++++++++++++------------------- doc/changelog | 3 +++ 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index 93faa58a..e43876b3 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ WEBPAGE=$(WEBBASE).mdwn # Documentation MANDIR=doc/man +HTMLDIR=$(MANDIR)/html MAN1SRC= \ $(MANDIR)/cdist-code-run.text \ @@ -46,9 +47,11 @@ MAN7SRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-reference.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-type.text \ + $(shell ls conf/type/*/man.text) MAN1DST=$(MAN1SRC:.text=.1) -MAN7DST=$(MAN1SRC:.text=.7) +MAN7DST=$(MAN7SRC:.text=.7) +MANHTML=$(MAN1SRC:.text=.html) $(MAN7SRC:.text=.html) ################################################################################ # User targets @@ -65,34 +68,34 @@ all: @echo '' @echo '' -man: doc/man/.marker -# FIXME: also depends on conf/type/*/man.text! -doc/man/.marker: manmove - touch $@ +%.1 %.7: %.text + $(A2XM) $*.text -# Manual from core -mancore: $(MANSRC) - for mansrc in $^; do $(A2XM) $$mansrc; $(A2XH) $$mansrc; done +%.html: %.text + $(A2XH) $*.text -# Manuals from types -mantype: - for man in conf/type/*/man.text; do $(A2XM) $$man; $(A2XH) $$man; done +man: $(MAN1DST) $(MAN7DST) + +html: $(MANHTML) + +# man: doc/man/.marker # Move into manpath directories -manmove: mantype mancore $(MANGENERATED) +manmove: $(MAN1DST) $(MAN7DST) $(MANHTML) for manpage in $(MANDIR)/*.[1-9] conf/type/*/*.7; do \ cat=$${manpage##*.}; \ mandir=$(MANDIR)/man$$cat; \ mkdir -p $$mandir; \ mv $$manpage $$mandir; \ done - mkdir -p doc/html - mv doc/man/*.html doc/html + # HTML + mkdir -p $(HTMLDIR) + mv doc/man/*.html $(HTMLDIR) for mantype in conf/type/*/man.html; do \ - mannew=$$(echo $$mantype | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;');\ - mv $$mantype doc/html/$$mannew; \ + mannew=$$(echo $$mantype | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;');\ + mv $$mantype doc/html/$$mannew; \ done # Reference depends on conf/type/*/man.text - HOWTO with posix make? @@ -102,9 +105,9 @@ $(MANDIR)/cdist-reference.text: $(MANDIR)/cdist-reference.text.sh $(A2XH) $(MANDIR)/cdist-reference.text clean: - rm -rf doc/man/html/* doc/man/*.[1-9] doc/man/man[1-9] $(MANGENERATED) - rm -f conf/type/*/man.html - rm -rf doc/html + rm -rf doc/man/html/* doc/man/*.[1-9] doc/man/man[1-9] + rm -f conf/type/*/man.html $(MANDIR)/cdist-reference.text + rm -rf $(HTMLDIR) ################################################################################ # Developer targets diff --git a/doc/changelog b/doc/changelog index f78b1660..6e119393 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,3 +1,6 @@ +1.4.1: + * Manpage generation cleanup + 1.4.0: 2011-03-24 * Add --recursive to __directory * Move cdist generated stuff to .cdist of an object From e27501218f5629b281b86f2dbea988c3d39bebaf Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 24 Mar 2011 23:16:25 +0100 Subject: [PATCH 0945/6109] new type __key_value Signed-off-by: Steven Armstrong --- conf/type/__key_value/explorer/value | 33 +++++++++++++ conf/type/__key_value/gencode-remote | 52 +++++++++++++++++++++ conf/type/__key_value/man.text | 59 ++++++++++++++++++++++++ conf/type/__key_value/manifest | 26 +++++++++++ conf/type/__key_value/parameter/optional | 1 + conf/type/__key_value/parameter/required | 3 ++ 6 files changed, 174 insertions(+) create mode 100755 conf/type/__key_value/explorer/value create mode 100755 conf/type/__key_value/gencode-remote create mode 100644 conf/type/__key_value/man.text create mode 100755 conf/type/__key_value/manifest create mode 100644 conf/type/__key_value/parameter/optional create mode 100644 conf/type/__key_value/parameter/required diff --git a/conf/type/__key_value/explorer/value b/conf/type/__key_value/explorer/value new file mode 100755 index 00000000..b1d7983f --- /dev/null +++ b/conf/type/__key_value/explorer/value @@ -0,0 +1,33 @@ +#!/bin/sh +# +# 2011 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 . +# +# +# Get the current value of key or __NOTSET__ if the key doesn't exist. +# + +key="$(cat "$__object/parameter/key")" +file="$(cat "$__object/parameter/file")" +delimiter="$(cat "$__object/parameter/delimiter")" + +awk -F "$delimiter" ' +BEGIN { found=0 } +/^'$key'/ { print $2; found=1 } +END { if (found) exit 0; else exit 1 }' "$file" \ +|| echo "__NOTSET__" + diff --git a/conf/type/__key_value/gencode-remote b/conf/type/__key_value/gencode-remote new file mode 100755 index 00000000..e41cd9b5 --- /dev/null +++ b/conf/type/__key_value/gencode-remote @@ -0,0 +1,52 @@ +#!/bin/sh +# +# 2011 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 . +# + +value_is="$(cat "$__object/explorer/value")" +value_should="$(cat "$__object/parameter/value")" + +key="$(cat "$__object/parameter/key")" +file="$(cat "$__object/parameter/file")" +delimiter="$(cat "$__object/parameter/delimiter")" + +if [ "$value_is" != "$value_should" ]; then + case "$value_is" in + __NOTSET__) + # add key and value + echo "echo \"${key}${delimiter}${value_should}\" >> \"$file\"" + ;; + *) + if [ "$value_should" = '__NOTSET__' ]; then + # remove key and value + cat << DONE +sed -i '/^${key}/d' "$file" +DONE + else + # change value + cat << DONE +awk -F "$delimiter" ' +/${key}${delimiter}*/{gsub(/$value_is/, $value_should)};{print}' "$file" > "${file}+" \ +&& mv "${file}+" "$file" + +DONE + fi + ;; + esac +fi + diff --git a/conf/type/__key_value/man.text b/conf/type/__key_value/man.text new file mode 100644 index 00000000..78ba09a5 --- /dev/null +++ b/conf/type/__key_value/man.text @@ -0,0 +1,59 @@ +cdist-type__key_value(7) +========================== +Steven Armstrong + + +NAME +---- +cdist-type__key_value - Change property values in files + + +DESCRIPTION +----------- +This cdist type allows you to change values in a key value based config +file. + + +REQUIRED PARAMETERS +------------------- +value:: + The value for the key. Setting the value to __NOTSET__ will remove the key + from the file. +file:: + The file to operate on. +delimiter:: + The delimiter which seperates the key from the value. + + +OPTIONAL PARAMETERS +------------------- +key:: + The key to change. Defaults to object_id. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Set the maximum system user id +__key_value SYS_UID_MAX --file /etc/login.defs --value 666 --delimiter ' ' + +# Same with fancy id +__key_value my-fancy-id --file /etc/login.defs --key SYS_UID_MAX --value 666 \ + --delimiter ' ' + +# Enable packet forwarding +__key_value net.ipv4.ip_forward --file /etc/sysctl.conf --value 1 \ + --delimiter '=' +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +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). diff --git a/conf/type/__key_value/manifest b/conf/type/__key_value/manifest new file mode 100755 index 00000000..706b0b0d --- /dev/null +++ b/conf/type/__key_value/manifest @@ -0,0 +1,26 @@ +#!/bin/sh +# +# 2011 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 . +# + +if [ -f "$__object/parameter/key" ]; then + key="$(cat "$__object/parameter/key")" +else + echo "$__object_id" > "$__object/parameter/key" +fi + diff --git a/conf/type/__key_value/parameter/optional b/conf/type/__key_value/parameter/optional new file mode 100644 index 00000000..06bfde49 --- /dev/null +++ b/conf/type/__key_value/parameter/optional @@ -0,0 +1 @@ +key diff --git a/conf/type/__key_value/parameter/required b/conf/type/__key_value/parameter/required new file mode 100644 index 00000000..8f4aa53c --- /dev/null +++ b/conf/type/__key_value/parameter/required @@ -0,0 +1,3 @@ +value +file +delimiter From b959a14dc251826ff05a00d8cbc1226e408c4cb0 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 24 Mar 2011 23:22:08 +0100 Subject: [PATCH 0946/6109] fix length of ascidoc header Signed-off-by: Steven Armstrong --- conf/type/__key_value/man.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__key_value/man.text b/conf/type/__key_value/man.text index 78ba09a5..70711f97 100644 --- a/conf/type/__key_value/man.text +++ b/conf/type/__key_value/man.text @@ -1,5 +1,5 @@ cdist-type__key_value(7) -========================== +======================== Steven Armstrong From 46ceb3e3a924275bd096809b31f724044a502795 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 23:30:42 +0100 Subject: [PATCH 0947/6109] use variable instead of hardcoded value Signed-off-by: Nico Schottelius --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e43876b3..7b1e3dfa 100644 --- a/Makefile +++ b/Makefile @@ -121,10 +121,10 @@ test: # gentoo .rsync nicosc@ru3.inf.ethz.ch:cdist -web: man +web: manmove cp README $(WEBDIR)/$(WEBPAGE) rm -rf $(WEBDIR)/$(WEBBASE)/man && mkdir $(WEBDIR)/$(WEBBASE)/man - cp -r doc/html/* $(WEBDIR)/$(WEBBASE)/man + cp -r $(HTMLDIR)/* $(WEBDIR)/$(WEBBASE)/man cd $(WEBDIR) && git add $(WEBBASE)/man cd $(WEBDIR) && git commit -m "cdist update" $(WEBBASE) $(WEBPAGE) cd $(WEBDIR) && make pub From 79f6f90a05189bf4a6edca40e11c937c219631d3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 23:33:07 +0100 Subject: [PATCH 0948/6109] changelog+= __type/__key_value Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index 6e119393..cd8cd4cc 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,5 +1,6 @@ 1.4.1: * Manpage generation cleanup + * New type __key_value (Steven Armstrong) 1.4.0: 2011-03-24 * Add --recursive to __directory From fa309545a8b272ac3b2555c3bb3a4c2ec8ccabc4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 23:35:39 +0100 Subject: [PATCH 0949/6109] more stuff for 1.4.1 Signed-off-by: Nico Schottelius --- doc/changelog | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/changelog b/doc/changelog index cd8cd4cc..fb0bb1f9 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,6 +1,8 @@ 1.4.1: - * Manpage generation cleanup * New type __key_value (Steven Armstrong) + * New type __apt_ppa (Steven Armstrong) + * Documentation: Manpage generation cleanup + * Documentation: Manpage fix for __apt_ppa 1.4.0: 2011-03-24 * Add --recursive to __directory From ca139aa444650ae3815440a1f766122035a48460 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 24 Mar 2011 23:40:56 +0100 Subject: [PATCH 0950/6109] fixup manpage move/html Signed-off-by: Nico Schottelius --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7b1e3dfa..98ac3a76 100644 --- a/Makefile +++ b/Makefile @@ -95,7 +95,7 @@ manmove: $(MAN1DST) $(MAN7DST) $(MANHTML) mv doc/man/*.html $(HTMLDIR) for mantype in conf/type/*/man.html; do \ mannew=$$(echo $$mantype | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;');\ - mv $$mantype doc/html/$$mannew; \ + mv $$mantype $(HTMLDIR)/$$mannew; \ done # Reference depends on conf/type/*/man.text - HOWTO with posix make? From 4088da5d8c53e76920292ffb13dcfb21fba75343 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 24 Mar 2011 23:47:05 +0100 Subject: [PATCH 0951/6109] escape __NOTSET__ in man page Signed-off-by: Steven Armstrong --- conf/type/__key_value/man.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__key_value/man.text b/conf/type/__key_value/man.text index 70711f97..7b9381df 100644 --- a/conf/type/__key_value/man.text +++ b/conf/type/__key_value/man.text @@ -17,7 +17,7 @@ file. REQUIRED PARAMETERS ------------------- value:: - The value for the key. Setting the value to __NOTSET__ will remove the key + The value for the key. Setting the value to `__NOTSET__` will remove the key from the file. file:: The file to operate on. From 042638943a028b01965430b29951d0e544000014 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 11:17:52 +0100 Subject: [PATCH 0952/6109] begin real clean manpage solution Signed-off-by: Nico Schottelius --- Makefile | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 98ac3a76..fb6161b2 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,10 @@ WEBPAGE=$(WEBBASE).mdwn # Documentation MANDIR=doc/man -HTMLDIR=$(MANDIR)/html + +MAN1DSTDIR=$(MANDIR)/man1 +MAN7DSTDIR=$(MANDIR)/man7 +MANHTMLDIR=$(MANDIR)/html MAN1SRC= \ $(MANDIR)/cdist-code-run.text \ @@ -47,12 +50,14 @@ MAN7SRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-reference.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-type.text \ - $(shell ls conf/type/*/man.text) + +MAN7TYPESRC=$(shell ls conf/type/*/man.text) MAN1DST=$(MAN1SRC:.text=.1) MAN7DST=$(MAN7SRC:.text=.7) MANHTML=$(MAN1SRC:.text=.html) $(MAN7SRC:.text=.html) + ################################################################################ # User targets # @@ -69,11 +74,15 @@ all: @echo '' -%.1 %.7: %.text +$(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR): + mkdir -p $< + +%.1 %.7: %.text $(MAN1DSTDIR) $(MAN7DSTDIR) $(A2XM) $*.text %.html: %.text - $(A2XH) $*.text + $(A2XH) -o $(MANHTMLDIR)/$(@F) $< + #$(A2XH) -o $(MANHTMLDIR)/$(@F) $*.text man: $(MAN1DST) $(MAN7DST) @@ -91,11 +100,11 @@ manmove: $(MAN1DST) $(MAN7DST) $(MANHTML) done # HTML - mkdir -p $(HTMLDIR) - mv doc/man/*.html $(HTMLDIR) + mkdir -p $(MANHTMLDIR) + mv doc/man/*.html $(MANHTMLDIR) for mantype in conf/type/*/man.html; do \ mannew=$$(echo $$mantype | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;');\ - mv $$mantype $(HTMLDIR)/$$mannew; \ + mv $$mantype $(MANHTMLDIR)/$$mannew; \ done # Reference depends on conf/type/*/man.text - HOWTO with posix make? @@ -107,7 +116,7 @@ $(MANDIR)/cdist-reference.text: $(MANDIR)/cdist-reference.text.sh clean: rm -rf doc/man/html/* doc/man/*.[1-9] doc/man/man[1-9] rm -f conf/type/*/man.html $(MANDIR)/cdist-reference.text - rm -rf $(HTMLDIR) + rm -rf $(MANHTMLDIR) ################################################################################ # Developer targets @@ -124,7 +133,7 @@ test: web: manmove cp README $(WEBDIR)/$(WEBPAGE) rm -rf $(WEBDIR)/$(WEBBASE)/man && mkdir $(WEBDIR)/$(WEBBASE)/man - cp -r $(HTMLDIR)/* $(WEBDIR)/$(WEBBASE)/man + cp -r $(MANHTMLDIR)/* $(WEBDIR)/$(WEBBASE)/man cd $(WEBDIR) && git add $(WEBBASE)/man cd $(WEBDIR) && git commit -m "cdist update" $(WEBBASE) $(WEBPAGE) cd $(WEBDIR) && make pub From bbe4f940e37a667aa209a8134b2bdb964b2c7a7b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 11:34:29 +0100 Subject: [PATCH 0953/6109] in theory finish generation for man1 and man7 core cleanly Signed-off-by: Nico Schottelius --- Makefile | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index fb6161b2..4af52565 100644 --- a/Makefile +++ b/Makefile @@ -53,8 +53,8 @@ MAN7SRC=$(MANDIR)/cdist.text \ MAN7TYPESRC=$(shell ls conf/type/*/man.text) -MAN1DST=$(MAN1SRC:.text=.1) -MAN7DST=$(MAN7SRC:.text=.7) +MAN1DST=$(addprefix $(MAN1DSTDIR)/,$(notdir $(MAN1SRC:.text=.1))) +MAN7DST=$(addprefix $(MAN7DSTDIR)/,$(notdir $(MAN7SRC:.text=.7))) MANHTML=$(MAN1SRC:.text=.html) $(MAN7SRC:.text=.html) @@ -74,15 +74,27 @@ all: @echo '' -$(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR): - mkdir -p $< +################################################################################ +# Documentation +# -%.1 %.7: %.text $(MAN1DSTDIR) $(MAN7DSTDIR) +# Create output dirs +$(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR): + mkdir -p $@ + +# Link source files +manlink: $(MAN1DSTDIR) $(MAN7DSTDIR) + for mansrc in $(MAN1SRC); do ln -sf $$mansrc $(MAN1DSTDIR); done + for mansrc in $(MAN7SRC); do ln -sf $$mansrc $(MAN7DSTDIR); done + for mansrc in $(MAN7TYPESRC); do \ + dst="$$(echo $$mansrc | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;' -e 's;^;doc/man/man7/;')"; \ + ln -sf $$mansrc $$dst; done + +%.1 %.7: %.text manlink $(A2XM) $*.text %.html: %.text $(A2XH) -o $(MANHTMLDIR)/$(@F) $< - #$(A2XH) -o $(MANHTMLDIR)/$(@F) $*.text man: $(MAN1DST) $(MAN7DST) From 6e85d65b72321c849ce224b6708bb031180310ec Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 11:35:43 +0100 Subject: [PATCH 0954/6109] and in practise link to .. is better than somewhere else Signed-off-by: Nico Schottelius --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4af52565..d0d43073 100644 --- a/Makefile +++ b/Makefile @@ -84,8 +84,8 @@ $(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR): # Link source files manlink: $(MAN1DSTDIR) $(MAN7DSTDIR) - for mansrc in $(MAN1SRC); do ln -sf $$mansrc $(MAN1DSTDIR); done - for mansrc in $(MAN7SRC); do ln -sf $$mansrc $(MAN7DSTDIR); done + for mansrc in $(notdir $(MAN1SRC)); do ln -sf ../$$mansrc $(MAN1DSTDIR); done + for mansrc in $(notdir $(MAN7SRC)); do ln -sf ../$$mansrc $(MAN7DSTDIR); done for mansrc in $(MAN7TYPESRC); do \ dst="$$(echo $$mansrc | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;' -e 's;^;doc/man/man7/;')"; \ ln -sf $$mansrc $$dst; done From 3e72555e5923f9f433fd6f8dfd700cb53f8be41c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 11:46:56 +0100 Subject: [PATCH 0955/6109] make man is clean now Signed-off-by: Nico Schottelius --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index d0d43073..47d0e3df 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ MAN7SRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-type.text \ MAN7TYPESRC=$(shell ls conf/type/*/man.text) - +MAN7TYPEDST=$(shell for mansrc in $(MAN7TYPESRC:.text=.7); do dst="$$(echo $$mansrc | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;' -e 's;^;doc/man/man7/;')"; echo $$dst; done) MAN1DST=$(addprefix $(MAN1DSTDIR)/,$(notdir $(MAN1SRC:.text=.1))) MAN7DST=$(addprefix $(MAN7DSTDIR)/,$(notdir $(MAN7SRC:.text=.7))) MANHTML=$(MAN1SRC:.text=.html) $(MAN7SRC:.text=.html) @@ -84,11 +84,11 @@ $(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR): # Link source files manlink: $(MAN1DSTDIR) $(MAN7DSTDIR) - for mansrc in $(notdir $(MAN1SRC)); do ln -sf ../$$mansrc $(MAN1DSTDIR); done - for mansrc in $(notdir $(MAN7SRC)); do ln -sf ../$$mansrc $(MAN7DSTDIR); done + for mansrc in $(MAN1SRC); do ln -sf ../../../$$mansrc $(MAN1DSTDIR); done + for mansrc in $(MAN7SRC); do ln -sf ../../../$$mansrc $(MAN7DSTDIR); done for mansrc in $(MAN7TYPESRC); do \ dst="$$(echo $$mansrc | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;' -e 's;^;doc/man/man7/;')"; \ - ln -sf $$mansrc $$dst; done + ln -sf ../../../$$mansrc $$dst; done %.1 %.7: %.text manlink $(A2XM) $*.text @@ -96,7 +96,7 @@ manlink: $(MAN1DSTDIR) $(MAN7DSTDIR) %.html: %.text $(A2XH) -o $(MANHTMLDIR)/$(@F) $< -man: $(MAN1DST) $(MAN7DST) +man: $(MAN1DST) $(MAN7DST) $(MAN7TYPEDST) html: $(MANHTML) From 58391818ccd6a616524b7b98417870853603c4cf Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 11:52:51 +0100 Subject: [PATCH 0956/6109] remove old manmove target Signed-off-by: Nico Schottelius --- Makefile | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 47d0e3df..2b795740 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,7 @@ MAN7TYPESRC=$(shell ls conf/type/*/man.text) MAN7TYPEDST=$(shell for mansrc in $(MAN7TYPESRC:.text=.7); do dst="$$(echo $$mansrc | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;' -e 's;^;doc/man/man7/;')"; echo $$dst; done) MAN1DST=$(addprefix $(MAN1DSTDIR)/,$(notdir $(MAN1SRC:.text=.1))) MAN7DST=$(addprefix $(MAN7DSTDIR)/,$(notdir $(MAN7SRC:.text=.7))) -MANHTML=$(MAN1SRC:.text=.html) $(MAN7SRC:.text=.html) +MANHTML=$(MAN1DST:.1=.html) $(MAN7DST:.7=.html) $(MAN7TYPEDST:.7=.html) ################################################################################ @@ -83,7 +83,7 @@ $(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR): mkdir -p $@ # Link source files -manlink: $(MAN1DSTDIR) $(MAN7DSTDIR) +manlink: $(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR) for mansrc in $(MAN1SRC); do ln -sf ../../../$$mansrc $(MAN1DSTDIR); done for mansrc in $(MAN7SRC); do ln -sf ../../../$$mansrc $(MAN7DSTDIR); done for mansrc in $(MAN7TYPESRC); do \ @@ -100,25 +100,6 @@ man: $(MAN1DST) $(MAN7DST) $(MAN7TYPEDST) html: $(MANHTML) -# man: doc/man/.marker - -# Move into manpath directories -manmove: $(MAN1DST) $(MAN7DST) $(MANHTML) - for manpage in $(MANDIR)/*.[1-9] conf/type/*/*.7; do \ - cat=$${manpage##*.}; \ - mandir=$(MANDIR)/man$$cat; \ - mkdir -p $$mandir; \ - mv $$manpage $$mandir; \ - done - - # HTML - mkdir -p $(MANHTMLDIR) - mv doc/man/*.html $(MANHTMLDIR) - for mantype in conf/type/*/man.html; do \ - mannew=$$(echo $$mantype | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;');\ - mv $$mantype $(MANHTMLDIR)/$$mannew; \ - done - # Reference depends on conf/type/*/man.text - HOWTO with posix make? $(MANDIR)/cdist-reference.text: $(MANDIR)/cdist-reference.text.sh $(MANDIR)/cdist-reference.text.sh From bd25d6810b836552a245677c8189e0ddcd4293fa Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 19:39:50 +0100 Subject: [PATCH 0957/6109] makefile cleanup, todo add Signed-off-by: Nico Schottelius --- Makefile | 11 ++++++----- doc/dev/todo/TAKEME | 9 ++++++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 2b795740..3de70201 100644 --- a/Makefile +++ b/Makefile @@ -69,6 +69,7 @@ all: @echo 'Here are the possible targets:' @echo '' @echo ' man: Build manpages (requires Asciidoc)' + @echo ' manhtml: Build html-manpages (requires Asciidoc)' @echo ' clean: Remove build stuff' @echo '' @echo '' @@ -83,7 +84,7 @@ $(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR): mkdir -p $@ # Link source files -manlink: $(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR) +manlink: $(MAN1SRC) $(MAN7SRC) $(MANTYPE7SRC) $(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR) for mansrc in $(MAN1SRC); do ln -sf ../../../$$mansrc $(MAN1DSTDIR); done for mansrc in $(MAN7SRC); do ln -sf ../../../$$mansrc $(MAN7DSTDIR); done for mansrc in $(MAN7TYPESRC); do \ @@ -93,14 +94,14 @@ manlink: $(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR) %.1 %.7: %.text manlink $(A2XM) $*.text -%.html: %.text +%.html: %.text manlink $(A2XH) -o $(MANHTMLDIR)/$(@F) $< man: $(MAN1DST) $(MAN7DST) $(MAN7TYPEDST) -html: $(MANHTML) +# $(MANHTML): $(MANHTMLDIR) +manhtml: $(MANHTML) -# Reference depends on conf/type/*/man.text - HOWTO with posix make? $(MANDIR)/cdist-reference.text: $(MANDIR)/cdist-reference.text.sh $(MANDIR)/cdist-reference.text.sh $(A2XM) $(MANDIR)/cdist-reference.text @@ -109,7 +110,7 @@ $(MANDIR)/cdist-reference.text: $(MANDIR)/cdist-reference.text.sh clean: rm -rf doc/man/html/* doc/man/*.[1-9] doc/man/man[1-9] rm -f conf/type/*/man.html $(MANDIR)/cdist-reference.text - rm -rf $(MANHTMLDIR) + rm -rf $(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR) ################################################################################ # Developer targets diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index 9fa083cc..2881c06c 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -1,7 +1,14 @@ +UNASSIGNED TODOS +---------------- The following list of todos has not been assigned to any developer. +Feel free to pick one! -Feel free to pick one: +CORE +---- +Only build manpages if necessary for types as well as for the core! +TYPES +------ Types to be written/extended: - __ssh-keys (host/user) - Think about __service - necessary? From 1a2f7bb8bb3df13ed9ae81c089eb31684e186e66 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 20:31:20 +0100 Subject: [PATCH 0958/6109] link type manpages into tempdir Signed-off-by: Nico Schottelius --- Makefile | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 3de70201..b09d5719 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,8 @@ MANDIR=doc/man MAN1DSTDIR=$(MANDIR)/man1 MAN7DSTDIR=$(MANDIR)/man7 MANHTMLDIR=$(MANDIR)/html +MANTMPDIR=$(MANDIR)/tmp +MANOUTDIRS=$(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR) MAN1SRC= \ $(MANDIR)/cdist-code-run.text \ @@ -79,8 +81,18 @@ all: # Documentation # +# Type manpages are in no good format for asciidoc, make them look good! +manlinktypes: $(MANTMPDIR) + for mansrc in $(MAN7TYPESRC); do \ + dst="$$(echo $$mansrc | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;' -e 's;^;$(MANTMPDIR)/;')"; \ + ln -sf ../../../$$mansrc $$dst; done + +################################################################################ + +man: $(MAN1DST) $(MAN7DST) $(MAN7TYPEDST) + # Create output dirs -$(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR): +$(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR) $(MANTMPDIR): mkdir -p $@ # Link source files @@ -91,14 +103,12 @@ manlink: $(MAN1SRC) $(MAN7SRC) $(MANTYPE7SRC) $(MAN1DSTDIR) $(MAN7DSTDIR) $(MANH dst="$$(echo $$mansrc | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;' -e 's;^;doc/man/man7/;')"; \ ln -sf ../../../$$mansrc $$dst; done -%.1 %.7: %.text manlink +%.1 %.7: %.text manlink $(MANOUTDIRS) $(A2XM) $*.text %.html: %.text manlink $(A2XH) -o $(MANHTMLDIR)/$(@F) $< -man: $(MAN1DST) $(MAN7DST) $(MAN7TYPEDST) - # $(MANHTML): $(MANHTMLDIR) manhtml: $(MANHTML) From 1398cde9f0f29f33420439ef608f50fe3d4a8e8d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 20:34:13 +0100 Subject: [PATCH 0959/6109] also link core manpages into tmp Signed-off-by: Nico Schottelius --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b09d5719..79188352 100644 --- a/Makefile +++ b/Makefile @@ -82,10 +82,12 @@ all: # # Type manpages are in no good format for asciidoc, make them look good! -manlinktypes: $(MANTMPDIR) +manlink: $(MANTMPDIR) for mansrc in $(MAN7TYPESRC); do \ dst="$$(echo $$mansrc | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;' -e 's;^;$(MANTMPDIR)/;')"; \ ln -sf ../../../$$mansrc $$dst; done + for mansrc in $(MAN1SRC); do ln -sf ../../../$$mansrc $(MANTMPDIR); done + for mansrc in $(MAN7SRC); do ln -sf ../../../$$mansrc $(MANTMPDIR); done ################################################################################ From 8c3782f091db1bcba723bf72d4f244d8d185fa60 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 20:49:09 +0100 Subject: [PATCH 0960/6109] further cleanups to the man build system Signed-off-by: Nico Schottelius --- Makefile | 52 +++++++++++++++++++++------------------------------- 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a/Makefile b/Makefile index 79188352..e06db5c0 100644 --- a/Makefile +++ b/Makefile @@ -5,23 +5,20 @@ MANDIR=$(PREFIX)/share/man # Manpage and HTML A2XM=a2x -f manpage --no-xmllint -# A2XH=a2x -f xhtml --no-xmllint -A2XH=asciidoc -b xhtml11 +A2XH=a2x -f xhtml --no-xmllint -# Developer only +# Developer webbase WEBDIR=$$HOME/niconetz WEBBASE=software/cdist WEBPAGE=$(WEBBASE).mdwn - # Documentation MANDIR=doc/man MAN1DSTDIR=$(MANDIR)/man1 MAN7DSTDIR=$(MANDIR)/man7 MANHTMLDIR=$(MANDIR)/html -MANTMPDIR=$(MANDIR)/tmp -MANOUTDIRS=$(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR) +MANOUTDIRS=$(MAN1DSTDIR) $(MAN7DSTDIR) MAN1SRC= \ $(MANDIR)/cdist-code-run.text \ @@ -53,12 +50,17 @@ MAN7SRC=$(MANDIR)/cdist.text \ $(MANDIR)/cdist-stages.text \ $(MANDIR)/cdist-type.text \ +# Manpages from types MAN7TYPESRC=$(shell ls conf/type/*/man.text) -MAN7TYPEDST=$(shell for mansrc in $(MAN7TYPESRC:.text=.7); do dst="$$(echo $$mansrc | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;' -e 's;^;doc/man/man7/;')"; echo $$dst; done) -MAN1DST=$(addprefix $(MAN1DSTDIR)/,$(notdir $(MAN1SRC:.text=.1))) -MAN7DST=$(addprefix $(MAN7DSTDIR)/,$(notdir $(MAN7SRC:.text=.7))) -MANHTML=$(MAN1DST:.1=.html) $(MAN7DST:.7=.html) $(MAN7TYPEDST:.7=.html) +# Source files after linking them +MAN1TMPSRC=$(shell ls $(MAN1DSTDIR)/*.text) +MAN7TMPSRC=$(shell ls $(MAN7DSTDIR)/*.text) + +# Destination files based on linked files, not static list +MAN1DST=$(MAN1TMPSRC:.text=.1) +MAN7DST=$(MAN7TMPSRC:.text=.7) +MANHTML=$(MAN1TMPSRC:.text=.html) $(MAN7TMPSRC:.text=.html) ################################################################################ # User targets @@ -81,48 +83,36 @@ all: # Documentation # -# Type manpages are in no good format for asciidoc, make them look good! -manlink: $(MANTMPDIR) - for mansrc in $(MAN7TYPESRC); do \ - dst="$$(echo $$mansrc | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;' -e 's;^;$(MANTMPDIR)/;')"; \ - ln -sf ../../../$$mansrc $$dst; done - for mansrc in $(MAN1SRC); do ln -sf ../../../$$mansrc $(MANTMPDIR); done - for mansrc in $(MAN7SRC); do ln -sf ../../../$$mansrc $(MANTMPDIR); done +# Create manpages +man: $(MAN1DST) $(MAN7DST) +manhtml: $(MANHTML) -################################################################################ - -man: $(MAN1DST) $(MAN7DST) $(MAN7TYPEDST) +$(MANHTML): $(MANHTMLDIR) # Create output dirs $(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR) $(MANTMPDIR): mkdir -p $@ # Link source files -manlink: $(MAN1SRC) $(MAN7SRC) $(MANTYPE7SRC) $(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR) +manlink: $(MAN1SRC) $(MAN7SRC) $(MANTYPE7SRC) $(MANOUTDIRS) for mansrc in $(MAN1SRC); do ln -sf ../../../$$mansrc $(MAN1DSTDIR); done for mansrc in $(MAN7SRC); do ln -sf ../../../$$mansrc $(MAN7DSTDIR); done for mansrc in $(MAN7TYPESRC); do \ dst="$$(echo $$mansrc | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;' -e 's;^;doc/man/man7/;')"; \ ln -sf ../../../$$mansrc $$dst; done -%.1 %.7: %.text manlink $(MANOUTDIRS) +%.1 %.7: %.text manlink $(A2XM) $*.text %.html: %.text manlink - $(A2XH) -o $(MANHTMLDIR)/$(@F) $< - -# $(MANHTML): $(MANHTMLDIR) -manhtml: $(MANHTML) + $(A2XH) $< $(MANDIR)/cdist-reference.text: $(MANDIR)/cdist-reference.text.sh $(MANDIR)/cdist-reference.text.sh - $(A2XM) $(MANDIR)/cdist-reference.text - $(A2XH) $(MANDIR)/cdist-reference.text clean: - rm -rf doc/man/html/* doc/man/*.[1-9] doc/man/man[1-9] - rm -f conf/type/*/man.html $(MANDIR)/cdist-reference.text - rm -rf $(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR) + rm -rf $(MANOUTDIRS) + rm -f $(MANDIR)/cdist-reference.text ################################################################################ # Developer targets From 8a01df66dd8b7202a7e604f12f81bb47a3eee565 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 20:54:50 +0100 Subject: [PATCH 0961/6109] does not work: MAN1TMPSRC=$(shell ls $(MAN1DSTDIR)/*.text) is expanded before manlink was run Signed-off-by: Nico Schottelius --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e06db5c0..fc55ea03 100644 --- a/Makefile +++ b/Makefile @@ -87,7 +87,7 @@ all: man: $(MAN1DST) $(MAN7DST) manhtml: $(MANHTML) -$(MANHTML): $(MANHTMLDIR) +$(MAN1DST) $(MAN7DST) $(MANHTML): $(MANOUTDIRS) # Create output dirs $(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR) $(MANTMPDIR): From 4d33e524a122745c8d62eb0015cd4b9ef46d4092 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 20:56:25 +0100 Subject: [PATCH 0962/6109] begin to migrate makefile to shell script Signed-off-by: Nico Schottelius --- Makefile => build.sh | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) rename Makefile => build.sh (80%) diff --git a/Makefile b/build.sh similarity index 80% rename from Makefile rename to build.sh index fc55ea03..f8544f09 100644 --- a/Makefile +++ b/build.sh @@ -1,7 +1,27 @@ -# General -PREFIX=/usr -BINDIR=$(PREFIX)/bin -MANDIR=$(PREFIX)/share/man +#!/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 . +# +# +# Push a directory to a target, both sides have the same name (i.e. explorers) +# or +# Pull a directory from a target, both sides have the same name (i.e. explorers) +# # Manpage and HTML A2XM=a2x -f manpage --no-xmllint @@ -17,7 +37,6 @@ MANDIR=doc/man MAN1DSTDIR=$(MANDIR)/man1 MAN7DSTDIR=$(MANDIR)/man7 -MANHTMLDIR=$(MANDIR)/html MANOUTDIRS=$(MAN1DSTDIR) $(MAN7DSTDIR) MAN1SRC= \ From 8b9b95f98479c3002c9ca13da9ff8295f9d3d4ef Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 21:04:26 +0100 Subject: [PATCH 0963/6109] partial transformation Signed-off-by: Nico Schottelius --- build.sh | 156 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 84 insertions(+), 72 deletions(-) mode change 100644 => 100755 build.sh diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 index f8544f09..8509eddc --- a/build.sh +++ b/build.sh @@ -24,57 +24,98 @@ # # Manpage and HTML -A2XM=a2x -f manpage --no-xmllint -A2XH=a2x -f xhtml --no-xmllint +A2XM="a2x -f manpage --no-xmllint" +A2XH="a2x -f xhtml --no-xmllint" # Developer webbase -WEBDIR=$$HOME/niconetz +WEBDIR=$HOME/niconetz WEBBASE=software/cdist -WEBPAGE=$(WEBBASE).mdwn +WEBPAGE=${WEBBASE}.mdwn # Documentation MANDIR=doc/man - -MAN1DSTDIR=$(MANDIR)/man1 -MAN7DSTDIR=$(MANDIR)/man7 -MANOUTDIRS=$(MAN1DSTDIR) $(MAN7DSTDIR) +MAN1DSTDIR=${MANDIR}/man1 +MAN7DSTDIR=${MANDIR}/man7 MAN1SRC= \ - $(MANDIR)/cdist-code-run.text \ - $(MANDIR)/cdist-code-run-all.text \ - $(MANDIR)/cdist-config.text \ - $(MANDIR)/cdist-dir.text \ - $(MANDIR)/cdist-env.text \ - $(MANDIR)/cdist-explorer-run-global.text \ - $(MANDIR)/cdist-deploy-to.text \ - $(MANDIR)/cdist-explorer.text \ - $(MANDIR)/cdist-manifest.text \ - $(MANDIR)/cdist-manifest-run.text \ - $(MANDIR)/cdist-manifest-run-init.text \ - $(MANDIR)/cdist-manifest-run-all.text \ - $(MANDIR)/cdist-object-explorer-all.text \ - $(MANDIR)/cdist-object-gencode.text \ - $(MANDIR)/cdist-object-gencode-all.text \ - $(MANDIR)/cdist-remote-explorer-run.text \ - $(MANDIR)/cdist-run-remote.text \ - $(MANDIR)/cdist-type-build-emulation.text \ - $(MANDIR)/cdist-type-emulator.text \ - $(MANDIR)/cdist-type-template.text \ + ${MANDIR}/cdist-code-run.text \ + ${MANDIR}/cdist-code-run-all.text \ + ${MANDIR}/cdist-config.text \ + ${MANDIR}/cdist-dir.text \ + ${MANDIR}/cdist-env.text \ + ${MANDIR}/cdist-explorer-run-global.text \ + ${MANDIR}/cdist-deploy-to.text \ + ${MANDIR}/cdist-explorer.text \ + ${MANDIR}/cdist-manifest.text \ + ${MANDIR}/cdist-manifest-run.text \ + ${MANDIR}/cdist-manifest-run-init.text \ + ${MANDIR}/cdist-manifest-run-all.text \ + ${MANDIR}/cdist-object-explorer-all.text \ + ${MANDIR}/cdist-object-gencode.text \ + ${MANDIR}/cdist-object-gencode-all.text \ + ${MANDIR}/cdist-remote-explorer-run.text \ + ${MANDIR}/cdist-run-remote.text \ + ${MANDIR}/cdist-type-build-emulation.text \ + ${MANDIR}/cdist-type-emulator.text \ + ${MANDIR}/cdist-type-template.text + +MAN7SRC=${MANDIR}/cdist.text \ + ${MANDIR}/cdist-best-practise.text \ + ${MANDIR}/cdist-hacker.text \ + ${MANDIR}/cdist-quickstart.text \ + ${MANDIR}/cdist-reference.text \ + ${MANDIR}/cdist-stages.text \ + ${MANDIR}/cdist-type.text \ + + +case "$1" in + man) + for mansrc in ${MAN1SRC} ${MAN7SRC}; do + ln -sf ../../../$mansrc ${MAN1DSTDIR}; + done + for mansrc in ${MAN7TYPESRC}; do + dst="$(echo $mansrc | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;' -e 's;^;doc/man/man7/;')" + ln -sf ../../../$$mansrc $$dst + done + ;; + + web) + cp README ${WEBDIR}/${WEBPAGE} + rm -rf ${WEBDIR}/${WEBBASE}/man && mkdir ${WEBDIR}/${WEBBASE}/man + cp -r $(MANHTMLDIR)/* ${WEBDIR}/${WEBBASE}/man + cd ${WEBDIR} && git add ${WEBBASE}/man + cd ${WEBDIR} && git commit -m "cdist update" ${WEBBASE} ${WEBPAGE} + cd ${WEBDIR} && make pub + ;; + + pub) + git push --mirror + git push --mirror github + ;; + + *) + echo '' + echo 'Welcome to cdist!' + echo '' + echo 'Here are the possible targets:' + echo '' + echo ' man: Build manpages (requires Asciidoc)' + echo ' manhtml: Build html-manpages (requires Asciidoc)' + echo ' clean: Remove build stuff' + echo '' + echo '' + echo "Unknown target, \"$1\"" >&2 + exit 1 + ;; +esac -MAN7SRC=$(MANDIR)/cdist.text \ - $(MANDIR)/cdist-best-practise.text \ - $(MANDIR)/cdist-hacker.text \ - $(MANDIR)/cdist-quickstart.text \ - $(MANDIR)/cdist-reference.text \ - $(MANDIR)/cdist-stages.text \ - $(MANDIR)/cdist-type.text \ # Manpages from types -MAN7TYPESRC=$(shell ls conf/type/*/man.text) +MAN7TYPESRC=$(ls conf/type/*/man.text) # Source files after linking them -MAN1TMPSRC=$(shell ls $(MAN1DSTDIR)/*.text) -MAN7TMPSRC=$(shell ls $(MAN7DSTDIR)/*.text) +MAN1TMPSRC=$(shell ls ${MAN1DSTDIR}/*.text) +MAN7TMPSRC=$(shell ls ${MAN7DSTDIR}/*.text) # Destination files based on linked files, not static list MAN1DST=$(MAN1TMPSRC:.text=.1) @@ -85,18 +126,6 @@ MANHTML=$(MAN1TMPSRC:.text=.html) $(MAN7TMPSRC:.text=.html) # User targets # -all: - @echo '' - @echo 'Welcome to cdist!' - @echo '' - @echo 'Here are the possible targets:' - @echo '' - @echo ' man: Build manpages (requires Asciidoc)' - @echo ' manhtml: Build html-manpages (requires Asciidoc)' - @echo ' clean: Remove build stuff' - @echo '' - @echo '' - ################################################################################ # Documentation @@ -109,16 +138,11 @@ manhtml: $(MANHTML) $(MAN1DST) $(MAN7DST) $(MANHTML): $(MANOUTDIRS) # Create output dirs -$(MAN1DSTDIR) $(MAN7DSTDIR) $(MANHTMLDIR) $(MANTMPDIR): +${MAN1DSTDIR} ${MAN7DSTDIR} $(MANHTMLDIR) $(MANTMPDIR): mkdir -p $@ # Link source files -manlink: $(MAN1SRC) $(MAN7SRC) $(MANTYPE7SRC) $(MANOUTDIRS) - for mansrc in $(MAN1SRC); do ln -sf ../../../$$mansrc $(MAN1DSTDIR); done - for mansrc in $(MAN7SRC); do ln -sf ../../../$$mansrc $(MAN7DSTDIR); done - for mansrc in $(MAN7TYPESRC); do \ - dst="$$(echo $$mansrc | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;' -e 's;^;doc/man/man7/;')"; \ - ln -sf ../../../$$mansrc $$dst; done +manlink: ${MAN1SRC} ${MAN7SRC} $(MANTYPE7SRC) $(MANOUTDIRS) %.1 %.7: %.text manlink $(A2XM) $*.text @@ -126,12 +150,12 @@ manlink: $(MAN1SRC) $(MAN7SRC) $(MANTYPE7SRC) $(MANOUTDIRS) %.html: %.text manlink $(A2XH) $< -$(MANDIR)/cdist-reference.text: $(MANDIR)/cdist-reference.text.sh - $(MANDIR)/cdist-reference.text.sh +${MANDIR}/cdist-reference.text: ${MANDIR}/cdist-reference.text.sh + ${MANDIR}/cdist-reference.text.sh clean: rm -rf $(MANOUTDIRS) - rm -f $(MANDIR)/cdist-reference.text + rm -f ${MANDIR}/cdist-reference.text ################################################################################ # Developer targets @@ -144,15 +168,3 @@ test: .rsync nicosc@free.ethz.ch:cdist # gentoo .rsync nicosc@ru3.inf.ethz.ch:cdist - -web: manmove - cp README $(WEBDIR)/$(WEBPAGE) - rm -rf $(WEBDIR)/$(WEBBASE)/man && mkdir $(WEBDIR)/$(WEBBASE)/man - cp -r $(MANHTMLDIR)/* $(WEBDIR)/$(WEBBASE)/man - cd $(WEBDIR) && git add $(WEBBASE)/man - cd $(WEBDIR) && git commit -m "cdist update" $(WEBBASE) $(WEBPAGE) - cd $(WEBDIR) && make pub - -pub: - git push --mirror - git push --mirror github From 88ca7a44ec5180034afb31ce816d690fdbf5f47a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 22:10:52 +0100 Subject: [PATCH 0964/6109] finish most parts of translation Signed-off-by: Nico Schottelius --- build.sh | 157 +++++++++++++++++++++---------------------------------- 1 file changed, 59 insertions(+), 98 deletions(-) diff --git a/build.sh b/build.sh index 8509eddc..cf0574fd 100755 --- a/build.sh +++ b/build.sh @@ -37,55 +37,71 @@ MANDIR=doc/man MAN1DSTDIR=${MANDIR}/man1 MAN7DSTDIR=${MANDIR}/man7 -MAN1SRC= \ - ${MANDIR}/cdist-code-run.text \ - ${MANDIR}/cdist-code-run-all.text \ - ${MANDIR}/cdist-config.text \ - ${MANDIR}/cdist-dir.text \ - ${MANDIR}/cdist-env.text \ - ${MANDIR}/cdist-explorer-run-global.text \ - ${MANDIR}/cdist-deploy-to.text \ - ${MANDIR}/cdist-explorer.text \ - ${MANDIR}/cdist-manifest.text \ - ${MANDIR}/cdist-manifest-run.text \ - ${MANDIR}/cdist-manifest-run-init.text \ - ${MANDIR}/cdist-manifest-run-all.text \ - ${MANDIR}/cdist-object-explorer-all.text \ - ${MANDIR}/cdist-object-gencode.text \ - ${MANDIR}/cdist-object-gencode-all.text \ - ${MANDIR}/cdist-remote-explorer-run.text \ - ${MANDIR}/cdist-run-remote.text \ - ${MANDIR}/cdist-type-build-emulation.text \ - ${MANDIR}/cdist-type-emulator.text \ - ${MANDIR}/cdist-type-template.text - -MAN7SRC=${MANDIR}/cdist.text \ - ${MANDIR}/cdist-best-practise.text \ - ${MANDIR}/cdist-hacker.text \ - ${MANDIR}/cdist-quickstart.text \ - ${MANDIR}/cdist-reference.text \ - ${MANDIR}/cdist-stages.text \ - ${MANDIR}/cdist-type.text \ - - case "$1" in man) - for mansrc in ${MAN1SRC} ${MAN7SRC}; do - ln -sf ../../../$mansrc ${MAN1DSTDIR}; + set -e + "$0" mandirs + "$0" mantype + "$0" man1 + "$0" man7 + "$0" manbuild + ;; + + manbuild) + for src in ${MAN1DSTDIR}/*.text ${MAN7DSTDIR}/*.text; do + echo "Compiling manpage and html for $src" + $A2XM "$src" + $A2XH "$src" done + ;; + + mandirs) + # Create destination directories + mkdir -p "${MAN1DSTDIR}" "${MAN7DSTDIR}" + ;; + + mantype) for mansrc in ${MAN7TYPESRC}; do dst="$(echo $mansrc | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;' -e 's;^;doc/man/man7/;')" - ln -sf ../../../$$mansrc $$dst + ln -sf "../../../$mansrc" "$dst" done ;; + man1) + for man in cdist-code-run.text cdist-code-run-all.text cdist-config.text \ + cdist-dir.text cdist-env.text cdist-explorer-run-global.text \ + cdist-deploy-to.text cdist-explorer.text cdist-manifest.text \ + cdist-manifest-run.text cdist-manifest-run-init.text \ + cdist-manifest-run-all.text cdist-object-explorer-all.text \ + cdist-object-gencode.text cdist-object-gencode-all.text \ + cdist-remote-explorer-run.text cdist-run-remote.text \ + cdist-type-build-emulation.text cdist-type-emulator.text \ + cdist-type-template.text + do + ln -sf ../$man ${MAN1DSTDIR} + done + ;; + + man7) + for man in cdist.text cdist-best-practise.text cdist-hacker.text \ + cdist-quickstart.text cdist-reference.text cdist-stages.text \ + cdist-type.text + do + ln -sf ../$man ${MAN7DSTDIR} + done + ;; + + mangen) + ${MANDIR}/cdist-reference.text.sh + ;; + web) cp README ${WEBDIR}/${WEBPAGE} rm -rf ${WEBDIR}/${WEBBASE}/man && mkdir ${WEBDIR}/${WEBBASE}/man - cp -r $(MANHTMLDIR)/* ${WEBDIR}/${WEBBASE}/man - cd ${WEBDIR} && git add ${WEBBASE}/man - cd ${WEBDIR} && git commit -m "cdist update" ${WEBBASE} ${WEBPAGE} - cd ${WEBDIR} && make pub + cp -r ${MANHTMLDIR}/* ${WEBDIR}/${WEBBASE}/man + cd ${WEBDIR} && echo git add ${WEBBASE}/man + cd ${WEBDIR} && echo git commit -m "cdist update" ${WEBBASE} ${WEBPAGE} + cd ${WEBDIR} && echo make pub ;; pub) @@ -93,6 +109,11 @@ case "$1" in git push --mirror github ;; + clean) + rm -rf "$MAN1DSTDIR" "$MAN7DSTDIR" + rm -f ${MANDIR}/cdist-reference.text + ;; + *) echo '' echo 'Welcome to cdist!' @@ -108,63 +129,3 @@ case "$1" in exit 1 ;; esac - - -# Manpages from types -MAN7TYPESRC=$(ls conf/type/*/man.text) - -# Source files after linking them -MAN1TMPSRC=$(shell ls ${MAN1DSTDIR}/*.text) -MAN7TMPSRC=$(shell ls ${MAN7DSTDIR}/*.text) - -# Destination files based on linked files, not static list -MAN1DST=$(MAN1TMPSRC:.text=.1) -MAN7DST=$(MAN7TMPSRC:.text=.7) -MANHTML=$(MAN1TMPSRC:.text=.html) $(MAN7TMPSRC:.text=.html) - -################################################################################ -# User targets -# - - -################################################################################ -# Documentation -# - -# Create manpages -man: $(MAN1DST) $(MAN7DST) -manhtml: $(MANHTML) - -$(MAN1DST) $(MAN7DST) $(MANHTML): $(MANOUTDIRS) - -# Create output dirs -${MAN1DSTDIR} ${MAN7DSTDIR} $(MANHTMLDIR) $(MANTMPDIR): - mkdir -p $@ - -# Link source files -manlink: ${MAN1SRC} ${MAN7SRC} $(MANTYPE7SRC) $(MANOUTDIRS) - -%.1 %.7: %.text manlink - $(A2XM) $*.text - -%.html: %.text manlink - $(A2XH) $< - -${MANDIR}/cdist-reference.text: ${MANDIR}/cdist-reference.text.sh - ${MANDIR}/cdist-reference.text.sh - -clean: - rm -rf $(MANOUTDIRS) - rm -f ${MANDIR}/cdist-reference.text - -################################################################################ -# Developer targets -# - -test: - # ubuntu - .rsync lyni@tablett:cdist - # redhat - .rsync nicosc@free.ethz.ch:cdist - # gentoo - .rsync nicosc@ru3.inf.ethz.ch:cdist From 683e813ce22da3ff76933dff093710e16a104db7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 22:13:07 +0100 Subject: [PATCH 0965/6109] adjust web target Signed-off-by: Nico Schottelius --- build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index cf0574fd..2c1570f5 100755 --- a/build.sh +++ b/build.sh @@ -98,10 +98,10 @@ case "$1" in web) cp README ${WEBDIR}/${WEBPAGE} rm -rf ${WEBDIR}/${WEBBASE}/man && mkdir ${WEBDIR}/${WEBBASE}/man - cp -r ${MANHTMLDIR}/* ${WEBDIR}/${WEBBASE}/man - cd ${WEBDIR} && echo git add ${WEBBASE}/man - cd ${WEBDIR} && echo git commit -m "cdist update" ${WEBBASE} ${WEBPAGE} - cd ${WEBDIR} && echo make pub + cp ${MAN1DSTDIR}/*.html ${MAN7DSTDIR}/*.html ${WEBDIR}/${WEBBASE}/man + cd ${WEBDIR} && git add ${WEBBASE}/man + cd ${WEBDIR} && git commit -m "cdist update" ${WEBBASE} ${WEBPAGE} + cd ${WEBDIR} && make pub ;; pub) From 3356564c7772bfc1202aed4957663a23ce2b60e7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 22:24:02 +0100 Subject: [PATCH 0966/6109] upgrade to 1.4.1 Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 +- doc/changelog | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 00872438..86039f00 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -19,7 +19,7 @@ # # -__cdist_version="1.4.0" +__cdist_version="1.4.1" # Fail if something bogus is going on set -u diff --git a/doc/changelog b/doc/changelog index fb0bb1f9..5cfae26f 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,4 +1,4 @@ -1.4.1: +1.4.1: 2011-03-25 * New type __key_value (Steven Armstrong) * New type __apt_ppa (Steven Armstrong) * Documentation: Manpage generation cleanup From 7a56c5466e9ddf53e53c831e00af361f8f3844f3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 22:28:34 +0100 Subject: [PATCH 0967/6109] use build.sh in documentation Signed-off-by: Nico Schottelius --- README | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README b/README index 389470a0..48b934f1 100644 --- a/README +++ b/README @@ -77,6 +77,7 @@ cdist was tested or is know to run on at least * [Debian](http://www.debian.org/) * [Gentoo](http://www.gentoo.org/) * [Mac OS X](http://www.apple.com/macosx/) + * [OpenBSD](http://www.openbsd.org) * [Redhat](http://www.redhat.com/) * [Ubuntu](http://www.ubuntu.com/) @@ -108,7 +109,7 @@ To install cdist, execute the following commands: export PATH=$PATH:$(pwd -P)/bin # If you want the manpages (requires gmake and asciidoc to be installed) - make man + ./build.sh man export MANPATH=$MANPATH:$(pwd -P)/doc/man @@ -150,7 +151,7 @@ To upgrade cdist in the current branch use git pull # Also update the manpages - make man + ./build.sh man export MANPATH=$MANPATH:$(pwd -P)/doc/man If you stay on a version branche (i.e. 1.0, 1.1., ...), nothing should break. From 7f2ca78b8238e037cab7fddf829cebb6172196f4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 22:34:11 +0100 Subject: [PATCH 0968/6109] spell correction Signed-off-by: Nico Schottelius --- .../{cdist-best-practise.text => cdist-best-practice.text} | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) rename doc/man/{cdist-best-practise.text => cdist-best-practice.text} (96%) diff --git a/doc/man/cdist-best-practise.text b/doc/man/cdist-best-practice.text similarity index 96% rename from doc/man/cdist-best-practise.text rename to doc/man/cdist-best-practice.text index af06084e..febe8f36 100644 --- a/doc/man/cdist-best-practise.text +++ b/doc/man/cdist-best-practice.text @@ -1,10 +1,10 @@ -cdist-best-practise(7) +cdist-best-practice(7) ====================== Nico Schottelius NAME ---- -cdist-best-practise - Practises used in real environments +cdist-best-practice - Practices used in real environments PASSWORDLESS CONNECTIONS @@ -61,7 +61,6 @@ machine-b % git clone git://your-git-server/cdist -------------------------------------------------------------------------------- - SEE ALSO -------- - cdist(7) From a55eb6ebc97713a4b9f9f4aab45cf761f119ad14 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 22:54:17 +0100 Subject: [PATCH 0969/6109] correct mantype linking and finish spell check Signed-off-by: Nico Schottelius --- build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 2c1570f5..4fc65b0d 100755 --- a/build.sh +++ b/build.sh @@ -41,6 +41,7 @@ case "$1" in man) set -e "$0" mandirs + "$0" mangen "$0" mantype "$0" man1 "$0" man7 @@ -61,7 +62,7 @@ case "$1" in ;; mantype) - for mansrc in ${MAN7TYPESRC}; do + for mansrc in conf/type/*/man.text; do dst="$(echo $mansrc | sed -e 's;conf/;cdist-;' -e 's;/;;' -e 's;/man;;' -e 's;^;doc/man/man7/;')" ln -sf "../../../$mansrc" "$dst" done @@ -83,7 +84,7 @@ case "$1" in ;; man7) - for man in cdist.text cdist-best-practise.text cdist-hacker.text \ + for man in cdist.text cdist-best-practice.text cdist-hacker.text \ cdist-quickstart.text cdist-reference.text cdist-stages.text \ cdist-type.text do From 5ec1a6cc2d9f43b7b2cb7a65608a1d11ee7e08fb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 23:06:30 +0100 Subject: [PATCH 0970/6109] rephrase cdist and add prominent example section Signed-off-by: Nico Schottelius --- doc/man/cdist.text | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/man/cdist.text b/doc/man/cdist.text index 44be52b1..a4c88c1d 100644 --- a/doc/man/cdist.text +++ b/doc/man/cdist.text @@ -10,8 +10,13 @@ cdist - Configuration management system DESCRIPTION ----------- -Cdist is a very simple, elegant, cleanly designed configuration management -system. The easiest way to get started with cdist is to run cdist-quickstart. +Cdist is a usable configuration management system. +The easiest way to get started with cdist is to initialise +the environment and run cdist-quickstart: + +-------------------------------------------------------------------------------- +eval `./bin/cdist-env` && cdist-quickstart +-------------------------------------------------------------------------------- Cdist configurations are written in the shell scripting language. The mapping of configurations to hosts is defined in so called manifests, From 8f88ed269198b83b101993355e9bd31d294e749c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 23:17:35 +0100 Subject: [PATCH 0971/6109] template for cdist-cache Signed-off-by: Nico Schottelius --- bin/cdist-cache | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 bin/cdist-cache diff --git a/bin/cdist-cache b/bin/cdist-cache new file mode 100755 index 00000000..d4ea18bb --- /dev/null +++ b/bin/cdist-cache @@ -0,0 +1,56 @@ +#!/bin/sh +# +# 2010 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 . +# +# +# Let's build a cconfig tree from a configuration +# And save it into the cache tree +# + +. cdist-config +[ $# -eq 2 ] || __cdist_usage " " +set -u + +__cdist_target_host="$1"; shift +__cdist_manifest="$1"; shift + +################################################################################ +# Export information for cdist-type-emulator or manifest +# + +# Config dir should not get reset - FIXME: why did I do this? +export __cdist_conf_dir + +# Used to record the source in the object +export __cdist_manifest + +# Export information for manifests - __cdist_out_dir comes from cdist-config +export __global="$__cdist_out_dir" + +################################################################################ +# The actual run +# + +# Ensure binaries exist and are up-to-date +cdist-type-build-emulation "${__cdist_out_type_bin_dir}" \ + || __cdist_exit_err "Failed to build type emulation binaries" + +# prepend our path, so all cdist tools come before other tools +export PATH="${__cdist_out_type_bin_dir}:$PATH" + +__cdist_exec_fail_on_error "${__cdist_manifest}" From a9ce26f96858ec15fa88d3b26401bf1adc8ab10f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 23:35:11 +0100 Subject: [PATCH 0972/6109] integrate cdist-cache Signed-off-by: Nico Schottelius --- .gitignore | 9 ++------- bin/cdist-cache | 33 +++++++-------------------------- bin/cdist-config | 2 ++ bin/cdist-deploy-to | 1 + 4 files changed, 12 insertions(+), 33 deletions(-) diff --git a/.gitignore b/.gitignore index fdf9184f..68f829dc 100644 --- a/.gitignore +++ b/.gitignore @@ -2,13 +2,8 @@ .*.swp # Ignore generated manpages -doc/man/*.[1-9] doc/man/.marker doc/man/man*/ -doc/html - -conf/type/*/*.7 -conf/type/*/man.html - - +# Ignore cache for version control +cache/ diff --git a/bin/cdist-cache b/bin/cdist-cache index d4ea18bb..120b0df2 100755 --- a/bin/cdist-cache +++ b/bin/cdist-cache @@ -23,34 +23,15 @@ # . cdist-config -[ $# -eq 2 ] || __cdist_usage " " +[ $# -eq 1 ] || __cdist_usage "" set -u __cdist_target_host="$1"; shift -__cdist_manifest="$1"; shift -################################################################################ -# Export information for cdist-type-emulator or manifest -# +mkdir -p "${__cdist_local_base_cache_dir}" +__cdist_abs_cache_dir="$(cd "$__cdist_local_base_cache_dir" && pwd -P)" +__cdist_abs_ddir="$__cdist_abs_cache_dir/$__cdist_target_host" -# Config dir should not get reset - FIXME: why did I do this? -export __cdist_conf_dir - -# Used to record the source in the object -export __cdist_manifest - -# Export information for manifests - __cdist_out_dir comes from cdist-config -export __global="$__cdist_out_dir" - -################################################################################ -# The actual run -# - -# Ensure binaries exist and are up-to-date -cdist-type-build-emulation "${__cdist_out_type_bin_dir}" \ - || __cdist_exit_err "Failed to build type emulation binaries" - -# prepend our path, so all cdist tools come before other tools -export PATH="${__cdist_out_type_bin_dir}:$PATH" - -__cdist_exec_fail_on_error "${__cdist_manifest}" +echo "Saving cache to $__cdist_abs_ddir ..." +rm -rf "$__cdist_abs_ddir" +mv "$__cdist_local_base_dir" "$__cdist_abs_ddir" diff --git a/bin/cdist-config b/bin/cdist-config index 86039f00..ccab81cc 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -41,6 +41,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" # : ${__cdist_name_bin:=bin} +: ${__cdist_name_cache:=cache} : ${__cdist_name_code:=code} : ${__cdist_name_code_finished:=codedone} : ${__cdist_name_conf_dir:=conf} @@ -100,6 +101,7 @@ __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") # Local Base # : ${__cdist_local_base_dir:=$__cdist_tmp_dir} +: ${__cdist_local_base_cache_dir:=$__cdist_abs_mydir/../$__cdist_name_cache} : ${__cdist_conf_dir:="$(cd "$__cdist_abs_mydir/../conf" && pwd -P)"} diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 9a2fd303..3a2c37c9 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -58,5 +58,6 @@ cdist-dir push "$__cdist_target_host" "$__cdist_out_object_dir" \ "${__cdist_remote_out_object_base_dir}" cdist-code-run-all "$__cdist_target_host" +cdist-cache "$__cdist_target_host" echo "cdist $__cdist_version: Successfully finished run on $__cdist_target_host" From a11e9791650be176d0c270edf7d8dca9b58319d4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 23:36:42 +0100 Subject: [PATCH 0973/6109] update todos Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 3556f371..ada791ca 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,8 +1,12 @@ Core: - support $__self = relative_type/object_id - - cache Cache: + - add manpage + - add example how to use + - export variable $__cache + -> to all hosts or this host? + Assume you want to configure stuff one host ("monitor node"), depending on the configuration of other hosts ("cluster nodes"). From 76725c1b0db5923069fdc5734c37551a2efa68a6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 23:43:23 +0100 Subject: [PATCH 0974/6109] begin to document cache Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 25 ++------------------- doc/man/cdist-cache.text | 47 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 23 deletions(-) create mode 100644 doc/man/cdist-cache.text diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index ada791ca..6b0891a2 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,27 +1,6 @@ -Core: - - support $__self = relative_type/object_id - Cache: - - add manpage - add example how to use - export variable $__cache -> to all hosts or this host? - - Assume you want to configure stuff one host ("monitor node"), - depending on the configuration of other hosts ("cluster nodes"). - - For instance, the monitor host would like to know, - which hosts are configured with the provider - "apache" and option --start true. - - This requires the monitor node to be able to - query all other configured nodes. It can't - ask for all hosts, because cdist does not - know which hosts are configured or may exist. - - Example implementation - - If cdist keeps ("caches") the configuration of every - node it configures, each new node can query the - cache for existing nodes that acquired the given - configuration. +Core: + - support $__self = relative_type/object_id diff --git a/doc/man/cdist-cache.text b/doc/man/cdist-cache.text new file mode 100644 index 00000000..cbf4c9d7 --- /dev/null +++ b/doc/man/cdist-cache.text @@ -0,0 +1,47 @@ +cdist-cache(1) +============== +Nico Schottelius + + +NAME +---- +cdist-cache - Cache output of last run + + +SYNOPSIS +-------- +cdist-cache TARGET_HOST + + +DESCRIPTION +----------- + + Assume you want to configure stuff one host ("monitor node"), + depending on the configuration of other hosts ("cluster nodes"). + + For instance, the monitor host would like to know, + which hosts are configured with the provider + "apache" and option --start true. + + This requires the monitor node to be able to + query all other configured nodes. It can't + ask for all hosts, because cdist does not + know which hosts are configured or may exist. + + Example implementation + + If cdist keeps ("caches") the configuration of every + node it configures, each new node can query the + cache for existing nodes that acquired the given + configuration. + + +SEE ALSO +-------- +cdist(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). From 652c0c1615d9b73eee55cdeb2445be1a179db871 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 23:52:13 +0100 Subject: [PATCH 0975/6109] document stuff for next release Signed-off-by: Nico Schottelius --- build.sh | 2 +- doc/changelog | 4 +++- doc/man/cdist-cache.text | 22 +++------------------- 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/build.sh b/build.sh index 4fc65b0d..b91db496 100755 --- a/build.sh +++ b/build.sh @@ -86,7 +86,7 @@ case "$1" in man7) for man in cdist.text cdist-best-practice.text cdist-hacker.text \ cdist-quickstart.text cdist-reference.text cdist-stages.text \ - cdist-type.text + cdist-type.text cdist-cache.text do ln -sf ../$man ${MAN7DSTDIR} done diff --git a/doc/changelog b/doc/changelog index 5cfae26f..93d0f7e4 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,3 +1,6 @@ +1.5.0: + * Add cache functionality + 1.4.1: 2011-03-25 * New type __key_value (Steven Armstrong) * New type __apt_ppa (Steven Armstrong) @@ -41,7 +44,6 @@ * Document cdist-object-gencode-all * Document cdist-manifest-run - 1.1.0: 2011-03-16 * Replace type __file with __file, __directory, __link * Document cdist-env diff --git a/doc/man/cdist-cache.text b/doc/man/cdist-cache.text index cbf4c9d7..54619199 100644 --- a/doc/man/cdist-cache.text +++ b/doc/man/cdist-cache.text @@ -15,25 +15,9 @@ cdist-cache TARGET_HOST DESCRIPTION ----------- - - Assume you want to configure stuff one host ("monitor node"), - depending on the configuration of other hosts ("cluster nodes"). - - For instance, the monitor host would like to know, - which hosts are configured with the provider - "apache" and option --start true. - - This requires the monitor node to be able to - query all other configured nodes. It can't - ask for all hosts, because cdist does not - know which hosts are configured or may exist. - - Example implementation - - If cdist keeps ("caches") the configuration of every - node it configures, each new node can query the - cache for existing nodes that acquired the given - configuration. +cdist-cache moves away the objects created during last run so the +next run can use the previous information and compare them with +the current status. SEE ALSO From 38a9c5d60fb492945aeb6b2ddf7f8466d991f40f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 25 Mar 2011 23:53:38 +0100 Subject: [PATCH 0976/6109] ++todo Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 6b0891a2..05a44503 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,6 +1,9 @@ Cache: - add example how to use - export variable $__cache - -> to all hosts or this host? + -> for current host + -> add function to cdist-config, import from cdist-cache + + Core: - support $__self = relative_type/object_id From 2a0cba4e4b37ed115accd5ce24cefc9a24cc9f7d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Mar 2011 00:07:23 +0100 Subject: [PATCH 0977/6109] rephrase features Signed-off-by: Nico Schottelius --- README | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/README b/README index 48b934f1..c498e3b8 100644 --- a/README +++ b/README @@ -52,22 +52,28 @@ You can [browse the documentation for the latest version online](man) as well. ### Features -Stuff that should probably be included in every configuration management, -but is not. Or: Why I began to write cdist: - - * Speed - * Elegant code - * Clean design + * Elegant code and clean design + * Type and core cleanly seperated + * Small codebase in core * Good documentation (man pages) - * Meaningful error messages - * The no surprise factor * Consistency in behaviour, naming and documentation + * Meaningful error messages + * Either standard error messages from tools or added description for clearification + * The no surprise factor + * No magic guessing of what the user wants + * Simple and well-known DSL + * Posix shell * Easy integration into bare metal installations - * Simple and well-known DSL: posix shell - * It must be very easy to extend and debug cdist - * Focus on reuse of existing functionality (like sh, ssh, find, rm, ...) - * Easy upgrade: ***There is no need to update cdist on target hosts!*** - * cdist only needs to be update on the master server + * requires only ssh + sh + * Easy upgrade + * ***There is no need to update cdist on target hosts!*** + * cdist only needs to be updated on the master server(s) + * Very easy to extend + * Can be done via types, which can be stacked on top of others + * Reuse of existing functionality + * sh, ssh, find, rm, mv, ... + * Very easy to debug + * Just add set -x in the scripts ### OS support From 086e47a636c765835f132735d319da9141f34696 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Sat, 26 Mar 2011 00:23:59 +0100 Subject: [PATCH 0978/6109] extract code to transfer type explorers into its own executable Signed-off-by: Steven Armstrong --- bin/cdist-type-explorer-push | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 bin/cdist-type-explorer-push diff --git a/bin/cdist-type-explorer-push b/bin/cdist-type-explorer-push new file mode 100755 index 00000000..7ba412ca --- /dev/null +++ b/bin/cdist-type-explorer-push @@ -0,0 +1,40 @@ +#!/bin/sh +# +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 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 . +# +# +# Push the given types explorers to the target host +# + +. cdist-config +[ $# -eq 2 ] || __cdist_usage " " + +set -eu + +__cdist_target_host="$1"; shift +__cdist_type="$1"; shift + +src_dir="$(__cdist_type_explorer_dir "$__cdist_type")" +dst_dir="$(__cdist_remote_type_explorer_dir "$__cdist_type")" + +if [ -d "$src_dir" ]; then + echo "Transfering explorers for $__cdist_type ..." + cdist-dir push "$__cdist_target_host" "$src_dir" "$dst_dir" +fi + From 92005e25670206302ae87d1b3da561f0911aa176 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Sat, 26 Mar 2011 00:24:35 +0100 Subject: [PATCH 0979/6109] extract code to run an objects explorers into its own executable Signed-off-by: Steven Armstrong --- bin/cdist-object-explorer-run | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100755 bin/cdist-object-explorer-run diff --git a/bin/cdist-object-explorer-run b/bin/cdist-object-explorer-run new file mode 100755 index 00000000..e349a490 --- /dev/null +++ b/bin/cdist-object-explorer-run @@ -0,0 +1,61 @@ +#!/bin/sh +# +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 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 . +# +# +# Run the explorers for the given object on the target host. +# + +. cdist-config +[ $# -eq 2 ] || __cdist_usage " " + +set -eu + +__cdist_target_host="$1"; shift +__object="$1"; shift + +__object_id="$(__cdist_object_id_from_object "$__object")" +__cdist_type="$(__cdist_type_from_object "$__object")" + +# Check if type of object has >= 1 explorer +has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" + +# If so, run explorers on remote side +if [ "$has_explorer" ]; then + echo "Running explorers for $__object ..." + # Copy object parameters + cdist-dir push "$__cdist_target_host" \ + "$(__cdist_object_parameter_dir "$__object")" \ + "$(__cdist_remote_object_parameter_dir "$__object")" + + # Execute explorers + cdist-run-remote "$__cdist_target_host" \ + "__object=\"$(__cdist_remote_object_dir "$__object")\"" \ + "__object_id=\"$__object_id\"" \ + cdist-remote-explorer-run \ + "$__cdist_name_var_type_explorer" \ + "$(__cdist_remote_type_explorer_dir "$__cdist_type")" \ + "$(__cdist_remote_object_type_explorer_dir "$__object")" + + # Copy back results + cdist-dir pull "$__cdist_target_host" \ + "$(__cdist_remote_object_type_explorer_dir "$__object")" \ + "$(__cdist_object_type_explorer_dir "$__object")" +fi + From f7d20c002cd8f2d34ebdf3296a6e70d473ca885e Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Sat, 26 Mar 2011 00:25:46 +0100 Subject: [PATCH 0980/6109] introduce new executable to process objects Signed-off-by: Steven Armstrong --- bin/cdist-object-run-all | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100755 bin/cdist-object-run-all diff --git a/bin/cdist-object-run-all b/bin/cdist-object-run-all new file mode 100755 index 00000000..1dfef04f --- /dev/null +++ b/bin/cdist-object-run-all @@ -0,0 +1,61 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 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 . +# +# +# For each created object: +# - run type explorers +# - generate code +# - copy object to target +# - execute code on target +# + +. cdist-config +[ $# -eq 1 ] || __cdist_usage "" +set -eu + +__cdist_target_host="$1"; shift + +object_listing="$__cdist_tmp_dir/objects" +type_listing_all="$__cdist_tmp_dir/types_all" +type_listing="$__cdist_tmp_dir/types" +types_pushed="$__cdist_tmp_dir/types_pushed" +touch "$types_pushed" + + +# Get listing of objects +__cdist_object_list "$__cdist_out_object_dir" > "$object_listing" + + +while read object; do + __cdist_type="$(__cdist_type_from_object "$object")" + if __cdist_type_has_explorer "$__cdist_type"; then + # Transfer the type explorers + if ! grep -q "$__cdist_type" "$types_pushed"; then + cdist-type-explorer-push "$__cdist_target_host" "$__cdist_type" + echo "$__cdist_type" >> "$types_pushed" + fi + + # Run the type explorers for the current object + cdist-object-explorer-run "$__cdist_target_host" "$object" + + fi + +done < "$object_listing" + From b740a4b934dc719f9a4f6a2cca4dd8c21d211c95 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Sat, 26 Mar 2011 00:26:12 +0100 Subject: [PATCH 0981/6109] use new workflow Signed-off-by: Steven Armstrong --- bin/cdist-deploy-to | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 7a63f5ca..29c3a847 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -52,6 +52,9 @@ cdist-manifest-run-init "$__cdist_target_host" cdist-manifest-run-all "$__cdist_target_host" # Change workflow here: cdist-object-{apply, run, foo} +cdist-object-run-all "$__cdist_target_host" +exit + cdist-object-explorer-all "$__cdist_target_host" cdist-object-gencode-all "$__cdist_target_host" From 31a0b6c3d0b202f6624f236c122d27a93b9ce3e7 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Sat, 26 Mar 2011 01:43:55 +0100 Subject: [PATCH 0982/6109] fixed inconsistencies between local and remote variable naming - /__cdist_remote_out_object_base_dir/__cdist_remote_out_object_dir/ - __cdist_remote_object_dir += __cdist_name_dot_cdist Signed-off-by: Steven Armstrong --- bin/cdist-code-run-all | 2 +- bin/cdist-config | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/cdist-code-run-all b/bin/cdist-code-run-all index 1486cc46..6f5aeb92 100755 --- a/bin/cdist-code-run-all +++ b/bin/cdist-code-run-all @@ -44,7 +44,7 @@ while [ $# -ge 1 ]; do # Code remote cdist-run-remote "$__cdist_target_host" \ - "export __cdist_out_object_dir=\"$__cdist_remote_out_object_base_dir\";" \ + "export __cdist_out_object_dir=\"$__cdist_remote_out_object_dir\";" \ "cdist-code-run" "$object" "${__cdist_name_gencode_remote}" \ || __cdist_exit_err "Remote code failed for $object" done < "$__cdist_tmp_file" diff --git a/bin/cdist-config b/bin/cdist-config index 86039f00..26139819 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -131,7 +131,7 @@ __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") # : ${__cdist_remote_out_dir:=$__cdist_remote_base_dir/$__cdist_name_out_dir} : ${__cdist_remote_out_explorer_dir:=$__cdist_remote_out_dir/$__cdist_name_explorer} -: ${__cdist_remote_out_object_base_dir:=$__cdist_remote_out_dir/$__cdist_name_object} +: ${__cdist_remote_out_object_dir:=$__cdist_remote_out_dir/$__cdist_name_object} ################################################################################ # Internal functions @@ -254,9 +254,14 @@ __cdist_object_type_explorer_dir() # Remote # +__cdist_remote_object_base_dir() +{ + echo "${__cdist_remote_out_object_dir}/$1" +} + __cdist_remote_object_dir() { - echo "${__cdist_remote_out_object_base_dir}/$1" + echo "$(__cdist_remote_object_base_dir "$1")/${__cdist_name_dot_cdist}" } __cdist_remote_object_parameter_dir() From 14ece853df0a5daf6ee1dd7ec5da06b8596988ac Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Sat, 26 Mar 2011 01:46:02 +0100 Subject: [PATCH 0983/6109] trust nico when he says: SSH DESTROYS WHILE READ LOOP Signed-off-by: Steven Armstrong --- bin/cdist-object-run-all | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/bin/cdist-object-run-all b/bin/cdist-object-run-all index 1dfef04f..a6e5790d 100755 --- a/bin/cdist-object-run-all +++ b/bin/cdist-object-run-all @@ -43,9 +43,21 @@ touch "$types_pushed" __cdist_object_list "$__cdist_out_object_dir" > "$object_listing" +# NEED TO CREATE ARRAY, SSH DESTROYS WHILE READ LOOP while read object; do + set -- "$@" "$object" +done < "$object_listing" + +while [ $# -gt 0 ]; do + object="$1"; shift + __cdist_type="$(__cdist_type_from_object "$object")" - if __cdist_type_has_explorer "$__cdist_type"; then + + # Check if type of object has >= 1 explorer + has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" + + # If so, run explorers on remote side + if [ "$has_explorer" ]; then # Transfer the type explorers if ! grep -q "$__cdist_type" "$types_pushed"; then cdist-type-explorer-push "$__cdist_target_host" "$__cdist_type" @@ -57,5 +69,14 @@ while read object; do fi -done < "$object_listing" + # Run the gencode scripts for the current object + cdist-object-gencode-run "$__cdist_target_host" "$object" + + # Transfer the current object to the target + cdist-object-push "$__cdist_target_host" "$object" + + # Run the code for the current object + cdist-object-code-run "$__cdist_target_host" "$object" + +done From e8d656556cb15f7f8f975415ae3b75e5f1494968 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Sat, 26 Mar 2011 01:46:53 +0100 Subject: [PATCH 0984/6109] /__cdist_remote_out_object_base_dir/__cdist_remote_out_object_dir/ Signed-off-by: Steven Armstrong --- bin/cdist-deploy-to | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 29c3a847..db26a988 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -51,6 +51,7 @@ cdist-explorer-run-global "$__cdist_target_host" cdist-manifest-run-init "$__cdist_target_host" cdist-manifest-run-all "$__cdist_target_host" + # Change workflow here: cdist-object-{apply, run, foo} cdist-object-run-all "$__cdist_target_host" exit @@ -60,7 +61,7 @@ cdist-object-gencode-all "$__cdist_target_host" echo "Transferring objects to $__cdist_target_host ..." cdist-dir push "$__cdist_target_host" "$__cdist_out_object_dir" \ - "${__cdist_remote_out_object_base_dir}" + "${__cdist_remote_out_object_dir}" cdist-code-run-all "$__cdist_target_host" From 31842564d37374e844a56d2bc3f5629dfc8d2a18 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Sat, 26 Mar 2011 01:47:51 +0100 Subject: [PATCH 0985/6109] extract code to run gencode scripts into its own executable Signed-off-by: Steven Armstrong --- bin/cdist-object-gencode-run | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 bin/cdist-object-gencode-run diff --git a/bin/cdist-object-gencode-run b/bin/cdist-object-gencode-run new file mode 100755 index 00000000..76ce6953 --- /dev/null +++ b/bin/cdist-object-gencode-run @@ -0,0 +1,44 @@ +#!/bin/sh +# +# 2010 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 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 . +# +# +# For the given object create the code to be executed on the target. +# + +. cdist-config +[ $# -eq 2 ] || __cdist_usage " " +set -eu + +__cdist_target_host="$1"; shift +__cdist_object="$1"; shift + +code_local="$(__cdist_object_code "$__cdist_object")-${__cdist_name_gencode_local}" +code_remote="$(__cdist_object_code "$__cdist_object")-${__cdist_name_gencode_remote}" + +echo "Generating local code for $__cdist_object ..." +cdist-object-gencode "$__cdist_target_host" "$__cdist_object" \ + "${__cdist_name_gencode_local}" > "${code_local}" + +echo "Generating remote code for $__cdist_object ..." +cdist-object-gencode "$__cdist_target_host" "$__cdist_object" \ + "${__cdist_name_gencode_remote}" > "${code_remote}" + +chmod u+x "${code_local}" "${code_remote}" + From 4c6f115a434eaf9e33ec1b305179b306f53d0edd Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Sat, 26 Mar 2011 01:48:19 +0100 Subject: [PATCH 0986/6109] extract code to execute gencode-generated scripts into its own executable Signed-off-by: Steven Armstrong --- bin/cdist-object-code-run | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 bin/cdist-object-code-run diff --git a/bin/cdist-object-code-run b/bin/cdist-object-code-run new file mode 100755 index 00000000..b75f6f46 --- /dev/null +++ b/bin/cdist-object-code-run @@ -0,0 +1,42 @@ +#!/bin/sh +# +# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 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 . +# +# +# Exec the code for the given object locally and remote +# + +. cdist-config +[ $# -eq 2 ] || __cdist_usage " " +set -e + +__cdist_target_host="$1"; shift +__cdist_object="$1"; shift + +# Code local +export __cdist_out_object_dir="$__cdist_out_object_dir" +cdist-code-run "$__cdist_object" "${__cdist_name_gencode_local}" \ + || __cdist_exit_err "Local code failed for $__cdist_object" + +# Code remote +cdist-run-remote "$__cdist_target_host" \ + "export __cdist_out_object_dir=\"$__cdist_remote_out_object_dir\";" \ + "cdist-code-run" "$__cdist_object" "${__cdist_name_gencode_remote}" \ + || __cdist_exit_err "Remote code failed for $__cdist_object" + From 0dab5b5f7e80a69c4a39e708e22c6920d4095713 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Sat, 26 Mar 2011 01:48:44 +0100 Subject: [PATCH 0987/6109] extract code to transfer objects into its own executable Signed-off-by: Steven Armstrong --- bin/cdist-object-push | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 bin/cdist-object-push diff --git a/bin/cdist-object-push b/bin/cdist-object-push new file mode 100755 index 00000000..9c44d14e --- /dev/null +++ b/bin/cdist-object-push @@ -0,0 +1,37 @@ +#!/bin/sh +# +# 2010 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 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 . +# +# +# Transfer the given object to the target host. +# + +. cdist-config +[ $# -eq 2 ] || __cdist_usage " " +set -eu + +__cdist_target_host="$1"; shift +__cdist_object="$1"; shift + + +echo "Transferring object $__cdist_object to target host ..." +cdist-dir push "$__cdist_target_host" \ + "$(__cdist_object_dir "$__cdist_object")" \ + "$(__cdist_remote_object_dir "$__cdist_object")" + From 2c710186996f40b2e7ef1182ddd176897d3abdb2 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Sat, 26 Mar 2011 01:52:15 +0100 Subject: [PATCH 0988/6109] migrate to new workflow Signed-off-by: Steven Armstrong --- bin/cdist-code-run-all | 50 ----------------- bin/cdist-deploy-to | 15 ----- bin/cdist-object-explorer-all | 102 ---------------------------------- bin/cdist-object-gencode-all | 45 --------------- 4 files changed, 212 deletions(-) delete mode 100755 bin/cdist-code-run-all delete mode 100755 bin/cdist-object-explorer-all delete mode 100755 bin/cdist-object-gencode-all diff --git a/bin/cdist-code-run-all b/bin/cdist-code-run-all deleted file mode 100755 index 6f5aeb92..00000000 --- a/bin/cdist-code-run-all +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh -# -# 2010-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 . -# -# -# Exec code locally and remote -# - -. cdist-config -[ $# -eq 1 ] || __cdist_usage "" -set -e - -__cdist_target_host="$1"; shift - -__cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file" - -# NEED TO CREATE ARRAY, SSH DESTROYS WHILE READ LOOP -while read object; do - set -- "$@" "$object" -done < "$__cdist_tmp_file" - -while [ $# -ge 1 ]; do - object="$1"; shift - - # Code local - export __cdist_out_object_dir="$__cdist_out_object_dir" - cdist-code-run "$object" "${__cdist_name_gencode_local}" \ - || __cdist_exit_err "Local code failed for $object" - - # Code remote - cdist-run-remote "$__cdist_target_host" \ - "export __cdist_out_object_dir=\"$__cdist_remote_out_object_dir\";" \ - "cdist-code-run" "$object" "${__cdist_name_gencode_remote}" \ - || __cdist_exit_err "Remote code failed for $object" -done < "$__cdist_tmp_file" diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index db26a988..96b65e8b 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -50,21 +50,6 @@ cdist-dir push "$__cdist_target_host" "${__cdist_abs_mydir}" "${__cdist_remote_b cdist-explorer-run-global "$__cdist_target_host" cdist-manifest-run-init "$__cdist_target_host" cdist-manifest-run-all "$__cdist_target_host" - - -# Change workflow here: cdist-object-{apply, run, foo} cdist-object-run-all "$__cdist_target_host" -exit - -cdist-object-explorer-all "$__cdist_target_host" -cdist-object-gencode-all "$__cdist_target_host" - -echo "Transferring objects to $__cdist_target_host ..." -cdist-dir push "$__cdist_target_host" "$__cdist_out_object_dir" \ - "${__cdist_remote_out_object_dir}" - -cdist-code-run-all "$__cdist_target_host" - -# Stop change here echo "cdist $__cdist_version: Successfully finished run on $__cdist_target_host" diff --git a/bin/cdist-object-explorer-all b/bin/cdist-object-explorer-all deleted file mode 100755 index 692a79bb..00000000 --- a/bin/cdist-object-explorer-all +++ /dev/null @@ -1,102 +0,0 @@ -#!/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 . -# -# -# For each created object check the explorers and run them if needed. -# - -. cdist-config -[ $# -eq 1 ] || __cdist_usage "" -set -eu - -__cdist_target_host="$1"; shift - -object_listing="$__cdist_tmp_dir/objects" -type_listing_all="$__cdist_tmp_dir/types_all" -type_listing="$__cdist_tmp_dir/types" - -# Get listing of objects -__cdist_object_list "$__cdist_out_object_dir" > "$object_listing" - -# Get listing of types used -while read object; do - echo "$(__cdist_type_from_object "$object")" >> "$type_listing_all" -done < "$object_listing" -sort "$type_listing_all" | uniq > "$type_listing" - -# Create pseudo array to avoid issues with ssh -tc=0 -while read type; do - eval type_$tc=\"\$type\" - tc=$((tc+1)) -done < "$type_listing" - -# For every type that has explorers, Transfer the explorers -i=0 -while [ "$i" -lt "$tc" ]; do - eval cur_type=\"\$type_$i\" - - src_dir="$(__cdist_type_explorer_dir "$cur_type")" - dst_dir="$(__cdist_remote_type_explorer_dir "$cur_type")" - - if [ -d "$src_dir" ]; then - cdist-dir push "$__cdist_target_host" "$src_dir" "$dst_dir" - fi - i=$((i+1)) -done - -################################################################################ -# Explorer execution per object -# -# need to create pseudo array, as ssh in cdist-explorer-run will destroy while-read loops -while read object; do - set -- "$@" "$object" -done < "$object_listing" - -while [ $# -gt 0 ]; do - __object="$1"; shift - __object_id="$(__cdist_object_id_from_object "$__object")" - __cdist_type="$(__cdist_type_from_object "$__object")" - - # Check if type of object has >= 1 explorer - has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" - - # If so, run explorers on remote side - if [ "$has_explorer" ]; then - echo "Running explorers for $__object ..." - # Copy object parameters - cdist-dir push "$__cdist_target_host" \ - "$(__cdist_object_parameter_dir "$__object")" \ - "$(__cdist_remote_object_parameter_dir "$__object")" - - # Execute explorers - cdist-run-remote "$__cdist_target_host" \ - "__object=\"$(__cdist_remote_object_dir "$__object")\"" \ - "__object_id=\"$__object_id\"" \ - cdist-remote-explorer-run \ - "$__cdist_name_var_type_explorer" \ - "$(__cdist_remote_type_explorer_dir "$__cdist_type")" \ - "$(__cdist_remote_object_type_explorer_dir "$__object")" - - # Copy back results - cdist-dir pull "$__cdist_target_host" \ - "$(__cdist_remote_object_type_explorer_dir "$__object")" \ - "$(__cdist_object_type_explorer_dir "$__object")" - fi -done diff --git a/bin/cdist-object-gencode-all b/bin/cdist-object-gencode-all deleted file mode 100755 index 00ac1664..00000000 --- a/bin/cdist-object-gencode-all +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -# -# 2010 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 . -# -# -# For each created object create the code to be executed on the target. -# - -. cdist-config -[ $# -eq 1 ] || __cdist_usage "" -set -eu - -__cdist_target_host="$1"; shift - -__cdist_object_list "$__cdist_out_object_dir" > "$__cdist_tmp_file" - -while read object; do - code_local="$(__cdist_object_code "$object")-${__cdist_name_gencode_local}" - code_remote="$(__cdist_object_code "$object")-${__cdist_name_gencode_remote}" - - echo "Generating local code for $object ..." - cdist-object-gencode "$__cdist_target_host" "$object" \ - "${__cdist_name_gencode_local}" > "${code_local}" - - echo "Generating remote code for $object ..." - cdist-object-gencode "$__cdist_target_host" "$object" \ - "${__cdist_name_gencode_remote}" > "${code_remote}" - - chmod u+x "${code_local}" "${code_remote}" -done < "$__cdist_tmp_file" From 4e2d063911587fda08d703c6fc74b28b112c42b3 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Sat, 26 Mar 2011 01:53:03 +0100 Subject: [PATCH 0989/6109] cleanup: remove unused variables Signed-off-by: Steven Armstrong --- bin/cdist-object-run-all | 2 -- 1 file changed, 2 deletions(-) diff --git a/bin/cdist-object-run-all b/bin/cdist-object-run-all index a6e5790d..67c69154 100755 --- a/bin/cdist-object-run-all +++ b/bin/cdist-object-run-all @@ -33,8 +33,6 @@ set -eu __cdist_target_host="$1"; shift object_listing="$__cdist_tmp_dir/objects" -type_listing_all="$__cdist_tmp_dir/types_all" -type_listing="$__cdist_tmp_dir/types" types_pushed="$__cdist_tmp_dir/types_pushed" touch "$types_pushed" From 216ea21933903be61e1fa0f4e19fb1848aca1f4f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Mar 2011 18:44:31 +0100 Subject: [PATCH 0990/6109] a lot of more stuff in 1.5.0 :-) Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index 93d0f7e4..a99a0c3d 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,5 +1,6 @@ 1.5.0: * Add cache functionality + * Restructured execution: Run whole object at once (REPHRASE) 1.4.1: 2011-03-25 * New type __key_value (Steven Armstrong) From 74266df8aa3e9fa1fe16c8b18bd21124c88ff889 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Mar 2011 18:46:58 +0100 Subject: [PATCH 0991/6109] rereformulate Signed-off-by: Nico Schottelius --- doc/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog b/doc/changelog index a99a0c3d..b5908a36 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,6 +1,6 @@ 1.5.0: * Add cache functionality - * Restructured execution: Run whole object at once (REPHRASE) + * Restructured execution: Run whole object at once (REPHRASE) (Steven Armstrong) 1.4.1: 2011-03-25 * New type __key_value (Steven Armstrong) From bdf3e4b86e752909575744b28b1e15a83b0f5479 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Sat, 26 Mar 2011 22:09:19 +0100 Subject: [PATCH 0992/6109] prefix all variables with __cdist_ Signed-off-by: Steven Armstrong --- bin/cdist-object-run-all | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/bin/cdist-object-run-all b/bin/cdist-object-run-all index 67c69154..14a6d9b3 100755 --- a/bin/cdist-object-run-all +++ b/bin/cdist-object-run-all @@ -32,49 +32,49 @@ set -eu __cdist_target_host="$1"; shift -object_listing="$__cdist_tmp_dir/objects" -types_pushed="$__cdist_tmp_dir/types_pushed" -touch "$types_pushed" +__cdist_objects="$__cdist_tmp_dir/objects" +__cdist_types_pushed="$__cdist_tmp_dir/types_pushed" +touch "$__cdist_types_pushed" # Get listing of objects -__cdist_object_list "$__cdist_out_object_dir" > "$object_listing" +__cdist_object_list "$__cdist_out_object_dir" > "$__cdist_objects" # NEED TO CREATE ARRAY, SSH DESTROYS WHILE READ LOOP -while read object; do - set -- "$@" "$object" -done < "$object_listing" +while read __cdist_object; do + set -- "$@" "$__cdist_object" +done < "$__cdist_objects" while [ $# -gt 0 ]; do - object="$1"; shift + __cdist_object="$1"; shift - __cdist_type="$(__cdist_type_from_object "$object")" + __cdist_type="$(__cdist_type_from_object "$__cdist_object")" # Check if type of object has >= 1 explorer - has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" + __cdist_has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" # If so, run explorers on remote side - if [ "$has_explorer" ]; then + if [ "$__cdist_has_explorer" ]; then # Transfer the type explorers - if ! grep -q "$__cdist_type" "$types_pushed"; then + if ! grep -q "$__cdist_type" "$__cdist_types_pushed"; then cdist-type-explorer-push "$__cdist_target_host" "$__cdist_type" - echo "$__cdist_type" >> "$types_pushed" + echo "$__cdist_type" >> "$__cdist_types_pushed" fi # Run the type explorers for the current object - cdist-object-explorer-run "$__cdist_target_host" "$object" + cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object" fi # Run the gencode scripts for the current object - cdist-object-gencode-run "$__cdist_target_host" "$object" + cdist-object-gencode-run "$__cdist_target_host" "$__cdist_object" # Transfer the current object to the target - cdist-object-push "$__cdist_target_host" "$object" + cdist-object-push "$__cdist_target_host" "$__cdist_object" # Run the code for the current object - cdist-object-code-run "$__cdist_target_host" "$object" + cdist-object-code-run "$__cdist_target_host" "$__cdist_object" done From 0a14aa080ce9d88366f691d8b521772b9e81f0c2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Mar 2011 23:04:06 +0100 Subject: [PATCH 0993/6109] prepare version change 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 ccab81cc..991d23bb 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -19,7 +19,7 @@ # # -__cdist_version="1.4.1" +__cdist_version="1.5.0pre" # Fail if something bogus is going on set -u From 4ba452874a666b6b2d774eee1eeb3b39d22df723 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Mar 2011 23:45:41 +0100 Subject: [PATCH 0994/6109] add template for fancy idea __process Signed-off-by: Nico Schottelius --- conf/type/__process/explorer/cksum | 34 ++++++++++++++ conf/type/__process/explorer/exists | 30 +++++++++++++ conf/type/__process/gencode-local | 44 +++++++++++++++++++ conf/type/__process/gencode-remote | 46 +++++++++++++++++++ conf/type/__process/man.text | 61 ++++++++++++++++++++++++++ conf/type/__process/parameter/optional | 4 ++ 6 files changed, 219 insertions(+) create mode 100755 conf/type/__process/explorer/cksum create mode 100755 conf/type/__process/explorer/exists create mode 100755 conf/type/__process/gencode-local create mode 100755 conf/type/__process/gencode-remote create mode 100644 conf/type/__process/man.text create mode 100644 conf/type/__process/parameter/optional diff --git a/conf/type/__process/explorer/cksum b/conf/type/__process/explorer/cksum new file mode 100755 index 00000000..dcad99ba --- /dev/null +++ b/conf/type/__process/explorer/cksum @@ -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 . +# +# +# Retrieve the md5sum of a file to be created, if it is already existing. +# + +destination="/$__object_id" + +if [ -e "$destination" ]; then + if [ -f "$destination" ]; then + cksum < "$destination" + else + echo "NO REGULAR FILE" + fi +else + echo "NO FILE FOUND, NO CHECKSUM CALCULATED." +fi diff --git a/conf/type/__process/explorer/exists b/conf/type/__process/explorer/exists new file mode 100755 index 00000000..f8b85671 --- /dev/null +++ b/conf/type/__process/explorer/exists @@ -0,0 +1,30 @@ +#!/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 +# + +destination="/$__object_id" + +if [ -e "$destination" ]; then + echo yes +else + echo no +fi diff --git a/conf/type/__process/gencode-local b/conf/type/__process/gencode-local new file mode 100755 index 00000000..1168919e --- /dev/null +++ b/conf/type/__process/gencode-local @@ -0,0 +1,44 @@ +#!/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 . +# +# +# __file is a very basic type, which will probably be reused quite often +# + +destination="/$__object_id" + +if [ -f "$__object/parameter/source" ]; then + source="$(cat "$__object/parameter/source")" + + if [ -f "$source" ]; then + local_cksum="$(cksum < "$source")" + remote_cksum="$(cat "$__object/explorer/cksum")" + + if [ "$local_cksum" != "$remote_cksum" ]; then + # FIXME: The username 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... + echo scp "$source" "root@${__target_host}:${destination}" + fi + else + echo "Source \"$source\" does not exist." >&2 + exit 1 + fi +fi diff --git a/conf/type/__process/gencode-remote b/conf/type/__process/gencode-remote new file mode 100755 index 00000000..7c5cf7ce --- /dev/null +++ b/conf/type/__process/gencode-remote @@ -0,0 +1,46 @@ +#!/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 . +# +# +# __file is a very basic type, which will probably be reused quite often +# + +destination="/$__object_id" + +# No source? Create empty file +if [ ! -f "$__object/parameter/source" ]; then + if [ no = "$(cat "$__object/explorer/exists")" ]; then + echo touch \"$destination\" + fi +fi + +# Mode settings +if [ -f "$__object/parameter/mode" ]; then + echo chmod \"$(cat "$__object/parameter/mode")\" \"$destination\" +fi + +# Group +if [ -f "$__object/parameter/group" ]; then + echo chgrp \"$(cat "$__object/parameter/group")\" \"$destination\" +fi + +# Owner +if [ -f "$__object/parameter/owner" ]; then + echo chown \"$(cat "$__object/parameter/owner")\" \"$destination\" +fi diff --git a/conf/type/__process/man.text b/conf/type/__process/man.text new file mode 100644 index 00000000..67ab53d1 --- /dev/null +++ b/conf/type/__process/man.text @@ -0,0 +1,61 @@ +cdist-type__file(7) +=================== +Nico Schottelius + + +NAME +---- +cdist-type__file - Create files + + +DESCRIPTION +----------- +This cdist type allows you to create files on the target. + + +REQUIRED PARAMETERS +------------------- +None. + + +OPTIONAL PARAMETERS +------------------- +group:: + Group to chgrp to. + +mode:: + Unix permissions, suitable for chmod. + +owner:: + User to chown to. + +source:: + If supplied, copy this file from the host running cdist to the target. + If not supplied, an empty file or directory will be created. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Create /etc/cdist-configured as an empty file +__file /etc/cdist-configured + +# Use __file from another type +__file /etc/issue --source "$__type/files/archlinux" + +# Supply some more settings +__file /etc/shadow --source "$__type/files/shadow" \ + --owner root --group shadow --mode 0640 +-------------------------------------------------------------------------------- + + +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/__process/parameter/optional b/conf/type/__process/parameter/optional new file mode 100644 index 00000000..06120518 --- /dev/null +++ b/conf/type/__process/parameter/optional @@ -0,0 +1,4 @@ +group +mode +owner +source From 6c6ece859bb035429a67446dd41bf183d0a93370 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Mar 2011 23:51:45 +0100 Subject: [PATCH 0995/6109] update documentation for __process Signed-off-by: Nico Schottelius --- conf/type/__process/man.text | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/conf/type/__process/man.text b/conf/type/__process/man.text index 67ab53d1..2273f6f9 100644 --- a/conf/type/__process/man.text +++ b/conf/type/__process/man.text @@ -1,52 +1,33 @@ -cdist-type__file(7) -=================== +cdist-type__process(7) +====================== Nico Schottelius NAME ---- -cdist-type__file - Create files +cdist-type__process - Start or stop process DESCRIPTION ----------- -This cdist type allows you to create files on the target. +This cdist type allows you to define the state of a process. REQUIRED PARAMETERS ------------------- -None. +state:: + State of the process: Either stopped or running. OPTIONAL PARAMETERS ------------------- -group:: - Group to chgrp to. - -mode:: - Unix permissions, suitable for chmod. - -owner:: - User to chown to. - -source:: - If supplied, copy this file from the host running cdist to the target. - If not supplied, an empty file or directory will be created. - +None EXAMPLES -------- -------------------------------------------------------------------------------- -# Create /etc/cdist-configured as an empty file -__file /etc/cdist-configured - -# Use __file from another type -__file /etc/issue --source "$__type/files/archlinux" - -# Supply some more settings -__file /etc/shadow --source "$__type/files/shadow" \ - --owner root --group shadow --mode 0640 +__process /usr/sbin/sshd --state running --start "/etc/rc.d/sshd start" -------------------------------------------------------------------------------- From 06fe371b1df80492b300093b7db77ee47ad7dc39 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 26 Mar 2011 23:56:17 +0100 Subject: [PATCH 0996/6109] create type explorer "runs" Signed-off-by: Nico Schottelius --- conf/type/__process/explorer/cksum | 34 ------------------- conf/type/__process/explorer/{exists => runs} | 10 ++---- 2 files changed, 3 insertions(+), 41 deletions(-) delete mode 100755 conf/type/__process/explorer/cksum rename conf/type/__process/explorer/{exists => runs} (85%) diff --git a/conf/type/__process/explorer/cksum b/conf/type/__process/explorer/cksum deleted file mode 100755 index dcad99ba..00000000 --- a/conf/type/__process/explorer/cksum +++ /dev/null @@ -1,34 +0,0 @@ -#!/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 . -# -# -# Retrieve the md5sum of a file to be created, if it is already existing. -# - -destination="/$__object_id" - -if [ -e "$destination" ]; then - if [ -f "$destination" ]; then - cksum < "$destination" - else - echo "NO REGULAR FILE" - fi -else - echo "NO FILE FOUND, NO CHECKSUM CALCULATED." -fi diff --git a/conf/type/__process/explorer/exists b/conf/type/__process/explorer/runs similarity index 85% rename from conf/type/__process/explorer/exists rename to conf/type/__process/explorer/runs index f8b85671..685dd19e 100755 --- a/conf/type/__process/explorer/exists +++ b/conf/type/__process/explorer/runs @@ -18,13 +18,9 @@ # along with cdist. If not, see . # # -# Check whether file exists or not +# Check whether a process runs # -destination="/$__object_id" +process="$__object_id" -if [ -e "$destination" ]; then - echo yes -else - echo no -fi +pgrep -f "$process" || true From e4467de8fd9dfe044e65d2cce1972c102513441e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 27 Mar 2011 00:05:30 +0100 Subject: [PATCH 0997/6109] describe how __process should work Signed-off-by: Nico Schottelius --- conf/type/__process/man.text | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/conf/type/__process/man.text b/conf/type/__process/man.text index 2273f6f9..623ec4b2 100644 --- a/conf/type/__process/man.text +++ b/conf/type/__process/man.text @@ -21,13 +21,28 @@ state:: OPTIONAL PARAMETERS ------------------- -None +stop:: + Executable to use for stopping the process. + +start:: + Executable to use for starting the process. + EXAMPLES -------- -------------------------------------------------------------------------------- +# Start /usr/sbin/sshd if not running +__process /usr/sbin/sshd --state running + +# Start /usr/sbin/sshd if not running with a different binary __process /usr/sbin/sshd --state running --start "/etc/rc.d/sshd start" + +# Stop the process using kill (the type default) +__process /usr/sbin/sshd --state stopped + +# Stop the process using /etc/rc.d/sshd stop +__process /usr/sbin/sshd --state stopped --stop "/etc/rc.d/sshd stop" -------------------------------------------------------------------------------- From e7c1d3f16b774c3b33f7b41aa7dbec4041dd6d5c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 27 Mar 2011 00:07:39 +0100 Subject: [PATCH 0998/6109] add parameter Signed-off-by: Nico Schottelius --- conf/type/__process/gencode-local | 44 -------------------------- conf/type/__process/parameter/optional | 6 ++-- conf/type/__process/parameter/required | 1 + 3 files changed, 3 insertions(+), 48 deletions(-) delete mode 100755 conf/type/__process/gencode-local create mode 100644 conf/type/__process/parameter/required diff --git a/conf/type/__process/gencode-local b/conf/type/__process/gencode-local deleted file mode 100755 index 1168919e..00000000 --- a/conf/type/__process/gencode-local +++ /dev/null @@ -1,44 +0,0 @@ -#!/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 . -# -# -# __file is a very basic type, which will probably be reused quite often -# - -destination="/$__object_id" - -if [ -f "$__object/parameter/source" ]; then - source="$(cat "$__object/parameter/source")" - - if [ -f "$source" ]; then - local_cksum="$(cksum < "$source")" - remote_cksum="$(cat "$__object/explorer/cksum")" - - if [ "$local_cksum" != "$remote_cksum" ]; then - # FIXME: The username 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... - echo scp "$source" "root@${__target_host}:${destination}" - fi - else - echo "Source \"$source\" does not exist." >&2 - exit 1 - fi -fi diff --git a/conf/type/__process/parameter/optional b/conf/type/__process/parameter/optional index 06120518..4189bb2c 100644 --- a/conf/type/__process/parameter/optional +++ b/conf/type/__process/parameter/optional @@ -1,4 +1,2 @@ -group -mode -owner -source +stop +start diff --git a/conf/type/__process/parameter/required b/conf/type/__process/parameter/required new file mode 100644 index 00000000..ff72b5c7 --- /dev/null +++ b/conf/type/__process/parameter/required @@ -0,0 +1 @@ +state From 97dd649f447a917c63200cce74d35aadfdc2b63b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 27 Mar 2011 22:55:58 +0200 Subject: [PATCH 0999/6109] update todos Signed-off-by: Nico Schottelius --- doc/dev/todo/TAKEME | 4 +++- doc/dev/todo/niconext | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index 2881c06c..138f7714 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -5,7 +5,8 @@ Feel free to pick one! CORE ---- -Only build manpages if necessary for types as well as for the core! +- Only build manpages if necessary for types as well as for the core! +- support $__self = relative_type/object_id TYPES ------ @@ -17,3 +18,4 @@ Types to be written/extended: -> aka sed. - __cron + diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 05a44503..e9a6ddfc 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -5,5 +5,5 @@ Cache: -> add function to cdist-config, import from cdist-cache -Core: - - support $__self = relative_type/object_id +remove --preseed from package_apt and add debconf_set_selection or similar + -> much cleaner! From d21cfa66a03e681bf3f24774eb1995c49c85a717 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 27 Mar 2011 22:58:42 +0200 Subject: [PATCH 1000/6109] +indent 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 6294870a..b3ed1f3d 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -155,7 +155,7 @@ if [ -e "${__cdist_object_dir}" ]; then # Allow diff to fail set +e diff -ru "${__cdist_new_object_dir}/${__cdist_name_parameter}" \ - "${__cdist_object_dir}/${__cdist_name_parameter}" \ + "${__cdist_object_dir}/${__cdist_name_parameter}" \ > "$__cdist_tmp_file"; ret=$? set -e From ec2971787090c11c5eb029a0a225ed1b9b56cc09 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 27 Mar 2011 22:59:00 +0200 Subject: [PATCH 1001/6109] in theory finish __process Signed-off-by: Nico Schottelius --- conf/type/__process/gencode-remote | 46 ++++++++++++++++-------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/conf/type/__process/gencode-remote b/conf/type/__process/gencode-remote index 7c5cf7ce..219230db 100755 --- a/conf/type/__process/gencode-remote +++ b/conf/type/__process/gencode-remote @@ -21,26 +21,30 @@ # __file is a very basic type, which will probably be reused quite often # -destination="/$__object_id" +process="$__object_id" -# No source? Create empty file -if [ ! -f "$__object/parameter/source" ]; then - if [ no = "$(cat "$__object/explorer/exists")" ]; then - echo touch \"$destination\" - fi -fi +runs="$(cat "$__object/explorer/runs")" +state="$(cat "$__object/parameter/state")" -# Mode settings -if [ -f "$__object/parameter/mode" ]; then - echo chmod \"$(cat "$__object/parameter/mode")\" \"$destination\" -fi - -# Group -if [ -f "$__object/parameter/group" ]; then - echo chgrp \"$(cat "$__object/parameter/group")\" \"$destination\" -fi - -# Owner -if [ -f "$__object/parameter/owner" ]; then - echo chown \"$(cat "$__object/parameter/owner")\" \"$destination\" -fi +case "$state" in + running) + # Does not run, start it! + if [ -z "$runs" ]; then + if [ -f "$__object/parameter/start" ]; then + cat "$__object/parameter/start" + else + echo "$process" + fi + fi + ;; + stopped) + # Runs, kill it! + if [ "$runs" ]; then + if [ -f "$__object/parameter/stop" ]; then + cat "$__object/parameter/stop" + else + echo kill "${runs}" + fi + fi + ;; +esac From 4cd70b7abbf19a3a1b71d4e5176ec8b67f515576 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 27 Mar 2011 23:10:29 +0200 Subject: [PATCH 1002/6109] document pgrep fun Signed-off-by: Nico Schottelius --- doc/dev/logs/2011-03-27.pgrep | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/dev/logs/2011-03-27.pgrep diff --git a/doc/dev/logs/2011-03-27.pgrep b/doc/dev/logs/2011-03-27.pgrep new file mode 100644 index 00000000..fedfa81e --- /dev/null +++ b/doc/dev/logs/2011-03-27.pgrep @@ -0,0 +1,12 @@ +Some pgrep fun when grepping for -f /usr/lib/postfix/master: + +[23:08] kr:cdist% cat cache/localhost/out/object/__process/usr/lib/postfix/master/.cdist/explorer/runs | grep -e 2529 -e 2537 -e 2538 -e 2539 +nico 2529 0.0 0.0 14848 1816 pts/45 S+ 23:08 0:00 /bin/sh /home/users/nico/oeffentlich/rechner/projekte/cdist/bin/cdist-run-remote localhost __object="/var/lib/cdist/out/object/__process/usr/lib/postfix/master" __object_id="usr/lib/postfix/master" cdist-remote-explorer-run __type_explorer /var/lib/cdist/conf/type/__process/explorer /var/lib/cdist/out/object/__process/usr/lib/postfix/master/explorer +nico 2537 0.0 0.0 41976 2324 pts/45 S+ 23:08 0:00 ssh root@localhost export PATH="/var/lib/cdist/bin:$PATH"; __object="/var/lib/cdist/out/object/__process/usr/lib/postfix/master" __object_id="usr/lib/postfix/master" cdist-remote-explorer-run __type_explorer /var/lib/cdist/conf/type/__process/explorer /var/lib/cdist/out/object/__process/usr/lib/postfix/master/explorer +root 2538 0.0 0.0 11440 1264 ? Ss 23:08 0:00 bash -c export PATH="/var/lib/cdist/bin:$PATH"; __object="/var/lib/cdist/out/object/__process/usr/lib/postfix/master" __object_id="usr/lib/postfix/master" cdist-remote-explorer-run __type_explorer /var/lib/cdist/conf/type/__process/explorer /var/lib/cdist/out/object/__process/usr/lib/postfix/master/explorer +root 2539 0.0 0.0 11440 1524 ? S 23:08 0:00 /bin/sh /var/lib/cdist/bin/cdist-remote-explorer-run __type_explorer /var/lib/cdist/conf/type/__process/explorer /var/lib/cdist/out/object/__process/usr/lib/postfix/master/explorer +2529 +2537 +2538 +2539 + From 0e8d36f5928a5869f67eb79c55f3e1ff69973f08 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 27 Mar 2011 23:12:25 +0200 Subject: [PATCH 1003/6109] add -x to pgrep Signed-off-by: Nico Schottelius --- conf/type/__process/explorer/runs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/type/__process/explorer/runs b/conf/type/__process/explorer/runs index 685dd19e..6d2bdf8c 100755 --- a/conf/type/__process/explorer/runs +++ b/conf/type/__process/explorer/runs @@ -23,4 +23,5 @@ process="$__object_id" -pgrep -f "$process" || true +ps aux +pgrep -x -f "$process" || true From 40b7b158c0c38708574a2d4354490de83df23c3c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 27 Mar 2011 23:13:18 +0200 Subject: [PATCH 1004/6109] -debug Signed-off-by: Nico Schottelius --- conf/type/__process/explorer/runs | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/type/__process/explorer/runs b/conf/type/__process/explorer/runs index 6d2bdf8c..19d259a6 100755 --- a/conf/type/__process/explorer/runs +++ b/conf/type/__process/explorer/runs @@ -23,5 +23,4 @@ process="$__object_id" -ps aux pgrep -x -f "$process" || true From b8002efa6d630006b333bb7e650f7092fcd3659e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 27 Mar 2011 23:29:10 +0200 Subject: [PATCH 1005/6109] add support for __process --name (in theory) Signed-off-by: Nico Schottelius --- conf/type/__process/explorer/runs | 8 ++++++-- conf/type/__process/gencode-remote | 13 +++++++++++-- conf/type/__process/man.text | 3 +++ conf/type/__process/parameter/optional | 1 + 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/conf/type/__process/explorer/runs b/conf/type/__process/explorer/runs index 19d259a6..240ebef9 100755 --- a/conf/type/__process/explorer/runs +++ b/conf/type/__process/explorer/runs @@ -21,6 +21,10 @@ # Check whether a process runs # -process="$__object_id" +if [ -f "$__object/parameter/name" ]; then + name="$(cat "$__object/parameter/name")" +else + name="$__object_id" +fi -pgrep -x -f "$process" || true +pgrep -x -f "$name" || true diff --git a/conf/type/__process/gencode-remote b/conf/type/__process/gencode-remote index 219230db..f8da1795 100755 --- a/conf/type/__process/gencode-remote +++ b/conf/type/__process/gencode-remote @@ -21,7 +21,11 @@ # __file is a very basic type, which will probably be reused quite often # -process="$__object_id" +if [ -f "$__object/parameter/name" ]; then + name="$(cat "$__object/parameter/name")" +else + name="$__object_id" +fi runs="$(cat "$__object/explorer/runs")" state="$(cat "$__object/parameter/state")" @@ -33,7 +37,7 @@ case "$state" in if [ -f "$__object/parameter/start" ]; then cat "$__object/parameter/start" else - echo "$process" + echo "$name" fi fi ;; @@ -47,4 +51,9 @@ case "$state" in fi fi ;; + *) + echo "Unknown state: $state" >&2 + exit 1 + ;; + esac diff --git a/conf/type/__process/man.text b/conf/type/__process/man.text index 623ec4b2..5f49865b 100644 --- a/conf/type/__process/man.text +++ b/conf/type/__process/man.text @@ -21,6 +21,9 @@ state:: OPTIONAL PARAMETERS ------------------- +name:: + Process name to match on when using pgrep -f -x. + stop:: Executable to use for stopping the process. diff --git a/conf/type/__process/parameter/optional b/conf/type/__process/parameter/optional index 4189bb2c..3411afb4 100644 --- a/conf/type/__process/parameter/optional +++ b/conf/type/__process/parameter/optional @@ -1,2 +1,3 @@ +name stop start From 271aa95a4da8f20f258fdb428faa4660197fbefa Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 27 Mar 2011 23:32:28 +0200 Subject: [PATCH 1006/6109] add --name example to manpage Signed-off-by: Nico Schottelius --- conf/type/__process/man.text | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/conf/type/__process/man.text b/conf/type/__process/man.text index 5f49865b..d144498d 100644 --- a/conf/type/__process/man.text +++ b/conf/type/__process/man.text @@ -46,6 +46,11 @@ __process /usr/sbin/sshd --state stopped # Stop the process using /etc/rc.d/sshd stop __process /usr/sbin/sshd --state stopped --stop "/etc/rc.d/sshd stop" + +# Ensure cups is running, which runs with -C ...: +__process cups --start "/etc/rc.d/cups start" --state running \ + --name "/usr/sbin/cupsd -C /etc/cups/cupsd.conf" + -------------------------------------------------------------------------------- From 741e505b1e90acd584fbf232ff4945bdea40c98a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 27 Mar 2011 23:33:27 +0200 Subject: [PATCH 1007/6109] more interesting stuff for 1.5.0 Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index b5908a36..7faf789b 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,5 +1,6 @@ 1.5.0: * Add cache functionality + * New type __process * Restructured execution: Run whole object at once (REPHRASE) (Steven Armstrong) 1.4.1: 2011-03-25 From 417ce618217a49a83d4d83cb5260bfba2a5a3abc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 28 Mar 2011 08:54:41 +0200 Subject: [PATCH 1008/6109] -'' Signed-off-by: Nico Schottelius --- conf/type/__process/man.text | 1 - 1 file changed, 1 deletion(-) diff --git a/conf/type/__process/man.text b/conf/type/__process/man.text index d144498d..3f7004c7 100644 --- a/conf/type/__process/man.text +++ b/conf/type/__process/man.text @@ -50,7 +50,6 @@ __process /usr/sbin/sshd --state stopped --stop "/etc/rc.d/sshd stop" # Ensure cups is running, which runs with -C ...: __process cups --start "/etc/rc.d/cups start" --state running \ --name "/usr/sbin/cupsd -C /etc/cups/cupsd.conf" - -------------------------------------------------------------------------------- From dbe74dcc3330117d01df306833c019361c448742 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 28 Mar 2011 08:56:53 +0200 Subject: [PATCH 1009/6109] compile all manpages in parallel! Signed-off-by: Nico Schottelius --- build.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index b91db496..4b0311c5 100755 --- a/build.sh +++ b/build.sh @@ -51,9 +51,10 @@ case "$1" in manbuild) for src in ${MAN1DSTDIR}/*.text ${MAN7DSTDIR}/*.text; do echo "Compiling manpage and html for $src" - $A2XM "$src" - $A2XH "$src" + $A2XM "$src" & + $A2XH "$src" & done + wait ;; mandirs) From 3d87f3f19a6de515923a74fcdd761bfcf3d76bf7 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 28 Mar 2011 09:58:36 +0200 Subject: [PATCH 1010/6109] more ideas for future version Signed-off-by: Steven Armstrong --- doc/dev/logs/2011-03-28.execution-order | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/dev/logs/2011-03-28.execution-order diff --git a/doc/dev/logs/2011-03-28.execution-order b/doc/dev/logs/2011-03-28.execution-order new file mode 100644 index 00000000..940da522 --- /dev/null +++ b/doc/dev/logs/2011-03-28.execution-order @@ -0,0 +1,14 @@ +run global explorers +run init manitest + +run all objects + -> depencies aufloesen wie/was/wo ???????? + run object + run explorer + run manifest + -> object liste wird evt veraendert + run gencode + run push -> target + run exec code + + From 4687d32771316506396fb0214b6cdb073a4c1ad4 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 28 Mar 2011 10:00:22 +0200 Subject: [PATCH 1011/6109] add half backed code for new object-run ideas Signed-off-by: Steven Armstrong --- bin/cdist-deploy-to | 2 +- bin/cdist-object-run-all | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 96b65e8b..c9aa1e2f 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -49,7 +49,7 @@ cdist-dir push "$__cdist_target_host" "${__cdist_abs_mydir}" "${__cdist_remote_b cdist-explorer-run-global "$__cdist_target_host" cdist-manifest-run-init "$__cdist_target_host" -cdist-manifest-run-all "$__cdist_target_host" +#cdist-manifest-run-all "$__cdist_target_host" cdist-object-run-all "$__cdist_target_host" echo "cdist $__cdist_version: Successfully finished run on $__cdist_target_host" diff --git a/bin/cdist-object-run-all b/bin/cdist-object-run-all index 14a6d9b3..abf01b23 100755 --- a/bin/cdist-object-run-all +++ b/bin/cdist-object-run-all @@ -48,6 +48,8 @@ done < "$__cdist_objects" while [ $# -gt 0 ]; do __cdist_object="$1"; shift + echo + echo "Running object $__cdist_object" __cdist_type="$(__cdist_type_from_object "$__cdist_object")" @@ -67,6 +69,9 @@ while [ $# -gt 0 ]; do fi + # Run the manifest for the current object + cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object" + # Run the gencode scripts for the current object cdist-object-gencode-run "$__cdist_target_host" "$__cdist_object" From b5ab490a23a1413eb949ba9b3512561455303e07 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 28 Mar 2011 10:02:13 +0200 Subject: [PATCH 1012/6109] add more half backed code for new object-run ideas Signed-off-by: Steven Armstrong --- bin/cdist-object-manifest-run | 64 +++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100755 bin/cdist-object-manifest-run diff --git a/bin/cdist-object-manifest-run b/bin/cdist-object-manifest-run new file mode 100755 index 00000000..e20848cd --- /dev/null +++ b/bin/cdist-object-manifest-run @@ -0,0 +1,64 @@ +#!/bin/sh +# +# 2010 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 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 . +# +# +# Run the manifest for the given object. +# + +. cdist-config +[ $# -eq 2 ] || __cdist_usage " " +set -eu + +__cdist_target_host="$1"; shift +__cdist_object="$1"; shift + +# Full path to current object +__cdist_cur_object_dir="$(__cdist_object_dir "$__cdist_object")" + +# Only the id +__cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")" + +if [ ! -f "${__cdist_cur_object_dir}/$__cdist_name_object_finished" ]; then + echo "Checking manifest for $__cdist_object ..." + + __cdist_type="$(__cdist_type_from_object "$__cdist_object")" + __cdist_manifest="$(__cdist_type_manifest "$__cdist_type")" + + if [ -f "$__cdist_manifest" ]; then + if [ -x "$__cdist_manifest" ]; then + # Make __cdist_manifest available for cdist-type-emulator + export __cdist_manifest + + echo "Executing manifest ${__cdist_manifest} ..." + # Make variables available to non-core - FIXME: beatify + export $__cdist_name_var_object="$__cdist_cur_object_dir" + export $__cdist_name_var_object_id="$__cdist_object_id" + export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" + + cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" + else + __cdist_exit_err "${__cdist_manifest} needs to be executable." + fi + fi +fi + +# done with this object +touch "$__cdist_cur_object_dir/$__cdist_name_object_finished" + From c5d8eaa63dd7f44990a2e4bf4fe282198adf1131 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 28 Mar 2011 10:54:22 +0200 Subject: [PATCH 1013/6109] add stevens todo list Signed-off-by: Steven Armstrong --- doc/dev/todo/steven | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/dev/todo/steven diff --git a/doc/dev/todo/steven b/doc/dev/todo/steven new file mode 100644 index 00000000..5f91a198 --- /dev/null +++ b/doc/dev/todo/steven @@ -0,0 +1,16 @@ +- document object_id=$1 for manifest + gencode :-) + +- update docs regarding flow in cdist-stages.text +- create man pages for new executables +- nuke legacy manpages + +- prettify output of cdist-deploy-to, e.g. + +Processing object __file/etc/cdist-configured + transfering type explorers ... + running type explorers ... + running manifest ... + running gencode ... + transfering object to target ... + running code ... + From d7a607d54a9b595259408e2f3a60e7e1cf368568 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 28 Mar 2011 11:22:25 +0200 Subject: [PATCH 1014/6109] update man pages for type explorer transfer and execution Signed-off-by: Steven Armstrong --- doc/man/cdist-object-explorer-all.text | 33 -------------------------- doc/man/cdist-object-explorer-run.text | 32 +++++++++++++++++++++++++ doc/man/cdist-type-explorer-push.text | 32 +++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 33 deletions(-) delete mode 100644 doc/man/cdist-object-explorer-all.text create mode 100644 doc/man/cdist-object-explorer-run.text create mode 100644 doc/man/cdist-type-explorer-push.text diff --git a/doc/man/cdist-object-explorer-all.text b/doc/man/cdist-object-explorer-all.text deleted file mode 100644 index dda3d30d..00000000 --- a/doc/man/cdist-object-explorer-all.text +++ /dev/null @@ -1,33 +0,0 @@ -cdist-object-explorer-all(1) -============================ -Nico Schottelius - - -NAME ----- -cdist-object-explorer-all - Run type explorer for every object - - -SYNOPSIS --------- -cdist-object-explorer-all HOSTNAME - - -DESCRIPTION ------------ -For every object, it checks whether the type has one or more explorers. -If so, the explorers of the type are copied to the target and executed -once per object. - - -SEE ALSO --------- -- cdist(7) -- cdist-deploy-to(1) -- cdist-remote-explorer-run(1) - - -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/doc/man/cdist-object-explorer-run.text b/doc/man/cdist-object-explorer-run.text new file mode 100644 index 00000000..a94047c3 --- /dev/null +++ b/doc/man/cdist-object-explorer-run.text @@ -0,0 +1,32 @@ +cdist-object-explorer-run(1) +============================ +Nico Schottelius +Steven Armstrong + + +NAME +---- +cdist-object-explorer-run - Run type explorers for a object + + +SYNOPSIS +-------- +cdist-object-explorer-run HOSTNAME OBJECT + + +DESCRIPTION +----------- +Runs the explorers for the given object on the target host. + + +SEE ALSO +-------- +- cdist(7) +- cdist-deploy-to(1) +- cdist-remote-explorer-run(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/doc/man/cdist-type-explorer-push.text b/doc/man/cdist-type-explorer-push.text new file mode 100644 index 00000000..31da880c --- /dev/null +++ b/doc/man/cdist-type-explorer-push.text @@ -0,0 +1,32 @@ +cdist-type-explorer-push(1) +============================ +Nico Schottelius +Steven Armstrong + + +NAME +---- +cdist-type-explorer-push - Transfer type explorers to the target host + + +SYNOPSIS +-------- +cdist-type-explorer-push HOSTNAME TYPE + + +DESCRIPTION +----------- +Transfers the explorers of the given type to the target host. + + +SEE ALSO +-------- +- cdist(7) +- cdist-object-run(1) +- cdist-type(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). From 269ad8c4325c6435c288cc3071f0e8c3949d6cbd Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 28 Mar 2011 11:27:05 +0200 Subject: [PATCH 1015/6109] update man pages for object gencode generation Signed-off-by: Steven Armstrong --- doc/man/cdist-object-gencode-all.text | 32 -------------------------- doc/man/cdist-object-gencode-run.text | 33 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 32 deletions(-) delete mode 100644 doc/man/cdist-object-gencode-all.text create mode 100644 doc/man/cdist-object-gencode-run.text diff --git a/doc/man/cdist-object-gencode-all.text b/doc/man/cdist-object-gencode-all.text deleted file mode 100644 index b1c96748..00000000 --- a/doc/man/cdist-object-gencode-all.text +++ /dev/null @@ -1,32 +0,0 @@ -cdist-object-gencode-all(1) -=========================== -Nico Schottelius - - -NAME ----- -cdist-object-gencode-all - Generate code for every existing object - - -SYNOPSIS --------- -cdist-object-gencode-all HOSTNAME - - -DESCRIPTION ------------ -For every object that exists, the cdist-object-gencode is executed. - - -SEE ALSO --------- -- cdist(7) -- cdist-code-run(1) -- cdist-deploy-to(1) -- cdist-object-gencode(1) - - -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/doc/man/cdist-object-gencode-run.text b/doc/man/cdist-object-gencode-run.text new file mode 100644 index 00000000..d69d1787 --- /dev/null +++ b/doc/man/cdist-object-gencode-run.text @@ -0,0 +1,33 @@ +cdist-object-gencode-run(1) +=========================== +Nico Schottelius +Steven Armstrong + + +NAME +---- +cdist-object-gencode-run - Generate code for a object + + +SYNOPSIS +-------- +cdist-object-gencode-run HOSTNAME OBJECT + + +DESCRIPTION +----------- +For the given object, generate the code for local and remote execution. + + +SEE ALSO +-------- +- cdist(7) +- cdist-code-run(1) +- cdist-object-run-all(1) +- cdist-object-gencode(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). From 70caac86e914eee4a0c969003a3be691d1bb5377 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 28 Mar 2011 12:11:55 +0200 Subject: [PATCH 1016/6109] man page for cdist-object-push Signed-off-by: Steven Armstrong --- doc/man/cdist-object-push.txt | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 doc/man/cdist-object-push.txt diff --git a/doc/man/cdist-object-push.txt b/doc/man/cdist-object-push.txt new file mode 100644 index 00000000..c4190e00 --- /dev/null +++ b/doc/man/cdist-object-push.txt @@ -0,0 +1,32 @@ +cdist-object-push(1) +============================ +Nico Schottelius +Steven Armstrong + + +NAME +---- +cdist-object-push - Transfer a object to the target host + + +SYNOPSIS +-------- +cdist-object-push HOSTNAME OBJECT + + +DESCRIPTION +----------- +Transfers the given object to the target host. + + +SEE ALSO +-------- +- cdist(7) +- cdist-object-run-all(1) +- cdist-type(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). From 2ee4f7e95207dfcb2b6cac9c0dabe99ba106e224 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 28 Mar 2011 12:12:57 +0200 Subject: [PATCH 1017/6109] cdist-object-push.txt -> cdist-object-push.text Signed-off-by: Steven Armstrong --- doc/man/{cdist-object-push.txt => cdist-object-push.text} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/man/{cdist-object-push.txt => cdist-object-push.text} (100%) diff --git a/doc/man/cdist-object-push.txt b/doc/man/cdist-object-push.text similarity index 100% rename from doc/man/cdist-object-push.txt rename to doc/man/cdist-object-push.text From c680f3e81d45c6afd4d74ef3bacb86fb88e54ef3 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 28 Mar 2011 12:21:45 +0200 Subject: [PATCH 1018/6109] added man page for cdist-object-run-all Signed-off-by: Steven Armstrong --- doc/man/cdist-object-run-all.text | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 doc/man/cdist-object-run-all.text diff --git a/doc/man/cdist-object-run-all.text b/doc/man/cdist-object-run-all.text new file mode 100644 index 00000000..c5163208 --- /dev/null +++ b/doc/man/cdist-object-run-all.text @@ -0,0 +1,38 @@ +cdist-object-run-all(1) +======================= +Nico Schottelius +Steven Armstrong + + +NAME +---- +cdist-object-run-all - Run all created objects on the target host + + +SYNOPSIS +-------- +cdist-object-run-all HOSTNAME + + +DESCRIPTION +----------- +Iterates over all objects and runs them on the given target host. +The different subtasks are dispatched to specialized exectuables. +See related man pages for details. + + +SEE ALSO +-------- +- cdist(7) +- cdist-type-explorer-push(1) +- cdist-object-explorer-run(1) +- cdist-object-gencode-run(1) +- cdist-object-push(1) +- cdist-object-code-run(1) +- cdist-type(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). From a5633df809cc05c5a242e086f1e82ee9262fbf8b Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 28 Mar 2011 12:23:52 +0200 Subject: [PATCH 1019/6109] fix asciidoc headers Signed-off-by: Steven Armstrong --- doc/man/cdist-object-push.text | 2 +- doc/man/cdist-type-explorer-push.text | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/man/cdist-object-push.text b/doc/man/cdist-object-push.text index c4190e00..69648a4d 100644 --- a/doc/man/cdist-object-push.text +++ b/doc/man/cdist-object-push.text @@ -1,5 +1,5 @@ cdist-object-push(1) -============================ +==================== Nico Schottelius Steven Armstrong diff --git a/doc/man/cdist-type-explorer-push.text b/doc/man/cdist-type-explorer-push.text index 31da880c..e32f10a4 100644 --- a/doc/man/cdist-type-explorer-push.text +++ b/doc/man/cdist-type-explorer-push.text @@ -1,5 +1,5 @@ cdist-type-explorer-push(1) -============================ +=========================== Nico Schottelius Steven Armstrong From 23e2fb82c7c725b097e34c4e36c197d1ef822a22 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 28 Mar 2011 12:27:43 +0200 Subject: [PATCH 1020/6109] add man page for cdist-object-code-run Signed-off-by: Steven Armstrong --- doc/man/cdist-object-code-run.text | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 doc/man/cdist-object-code-run.text diff --git a/doc/man/cdist-object-code-run.text b/doc/man/cdist-object-code-run.text new file mode 100644 index 00000000..4d19b5eb --- /dev/null +++ b/doc/man/cdist-object-code-run.text @@ -0,0 +1,33 @@ +cdist-object-code-run(1) +======================== +Nico Schottelius +Steven Armstrong + + +NAME +---- +cdist-object-code-run - Execute the generated code for a object + + +SYNOPSIS +-------- +cdist-object-code-run HOSTNAME OBJECT + + +DESCRIPTION +----------- +Execute the local and remote code for the given object. + + +SEE ALSO +-------- +- cdist(7) +- cdist-object-run-all(1) +- cdist-code-run(1) +- cdist-run-remote(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). From d56b7d19448282594047480936e7d976f4614eaa Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 28 Mar 2011 12:29:46 +0200 Subject: [PATCH 1021/6109] remove legacy man pages Signed-off-by: Steven Armstrong --- doc/man/cdist-code-run-all.text | 32 -------------------------------- doc/man/cdist-run-remote.text | 2 +- 2 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 doc/man/cdist-code-run-all.text diff --git a/doc/man/cdist-code-run-all.text b/doc/man/cdist-code-run-all.text deleted file mode 100644 index fba2e7e3..00000000 --- a/doc/man/cdist-code-run-all.text +++ /dev/null @@ -1,32 +0,0 @@ -cdist-code-run-all(1) -===================== -Nico Schottelius - - -NAME ----- -cdist-code-run-all - Execute all generated code on the target - - -SYNOPSIS --------- -cdist-code-run-all HOSTNAME - - -DESCRIPTION ------------ -cdist-code-run-all is just a wrapper for cdist-remote-code-run-all. - - -SEE ALSO --------- -- cdist(7) -- cdist-deploy-to(1) -- cdist-remote-code-run-all(1) -- cdist-run-remote(1) - - -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/doc/man/cdist-run-remote.text b/doc/man/cdist-run-remote.text index 6f06360f..ee7a6337 100644 --- a/doc/man/cdist-run-remote.text +++ b/doc/man/cdist-run-remote.text @@ -22,7 +22,7 @@ It ensures PATH is setup correctly on the target side. SEE ALSO -------- - cdist(7) -- cdist-code-run-all(1) +- cdist-object-code-run(1) - cdist-deploy-to(1) - cdist-remote-code-run-all(1) From 0f2193c5e3b731e4f92be2631e63c471d3f6a838 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 28 Mar 2011 12:44:03 +0200 Subject: [PATCH 1022/6109] concentrate on iteration in cdist-object-run-all; move all execution code into new executable bin/cdist-object-run Signed-off-by: Steven Armstrong --- bin/cdist-object-run | 55 ++++++++++++++++++++++++++++++++++++++++ bin/cdist-object-run-all | 29 +++++---------------- 2 files changed, 61 insertions(+), 23 deletions(-) create mode 100755 bin/cdist-object-run diff --git a/bin/cdist-object-run b/bin/cdist-object-run new file mode 100755 index 00000000..44be01be --- /dev/null +++ b/bin/cdist-object-run @@ -0,0 +1,55 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 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 . +# +# +# For the given object: +# - run type explorers +# - generate code +# - copy object to target +# - execute code on target +# + +. cdist-config +[ $# -eq 2 ] || __cdist_usage " " +set -eu + +__cdist_target_host="$1"; shift +__cdist_object="$1"; shift + + +__cdist_type="$(__cdist_type_from_object "$__cdist_object")" + +# Check if type of object has >= 1 explorer +__cdist_has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" + +# Run the type explorers for the current object if any +if [ "$__cdist_has_explorer" ]; then + cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object" +fi + +# Run the gencode scripts for the current object +cdist-object-gencode-run "$__cdist_target_host" "$__cdist_object" + +# Transfer the current object to the target +cdist-object-push "$__cdist_target_host" "$__cdist_object" + +# Run the code for the current object +cdist-object-code-run "$__cdist_target_host" "$__cdist_object" + diff --git a/bin/cdist-object-run-all b/bin/cdist-object-run-all index 14a6d9b3..3d2cb21c 100755 --- a/bin/cdist-object-run-all +++ b/bin/cdist-object-run-all @@ -19,11 +19,7 @@ # along with cdist. If not, see . # # -# For each created object: -# - run type explorers -# - generate code -# - copy object to target -# - execute code on target +# Run cdist-object-run for each created object. # . cdist-config @@ -49,32 +45,19 @@ done < "$__cdist_objects" while [ $# -gt 0 ]; do __cdist_object="$1"; shift - __cdist_type="$(__cdist_type_from_object "$__cdist_object")" - # Check if type of object has >= 1 explorer __cdist_has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" - # If so, run explorers on remote side + # Transfer the type explorers if any if [ "$__cdist_has_explorer" ]; then - # Transfer the type explorers if ! grep -q "$__cdist_type" "$__cdist_types_pushed"; then cdist-type-explorer-push "$__cdist_target_host" "$__cdist_type" - echo "$__cdist_type" >> "$__cdist_types_pushed" - fi - - # Run the type explorers for the current object - cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object" - + echo "$__cdist_type" >> "$__cdist_types_pushed" + fi fi - # Run the gencode scripts for the current object - cdist-object-gencode-run "$__cdist_target_host" "$__cdist_object" - - # Transfer the current object to the target - cdist-object-push "$__cdist_target_host" "$__cdist_object" - - # Run the code for the current object - cdist-object-code-run "$__cdist_target_host" "$__cdist_object" + # Process the given object + cdist-object-run "$__cdist_target_host" "$__cdist_object" done From 1c51d32cdca9a6372274ff8dedaf845222973712 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 28 Mar 2011 12:45:16 +0200 Subject: [PATCH 1023/6109] add missing variable __cdist_type Signed-off-by: Steven Armstrong --- bin/cdist-object-run-all | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/cdist-object-run-all b/bin/cdist-object-run-all index 3d2cb21c..e95c7841 100755 --- a/bin/cdist-object-run-all +++ b/bin/cdist-object-run-all @@ -45,6 +45,8 @@ done < "$__cdist_objects" while [ $# -gt 0 ]; do __cdist_object="$1"; shift + __cdist_type="$(__cdist_type_from_object "$__cdist_object")" + # Check if type of object has >= 1 explorer __cdist_has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" From 0726735f38623efe0b825644a45a8ce63ed889b8 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 28 Mar 2011 12:49:46 +0200 Subject: [PATCH 1024/6109] update man pages for cdist-object-run-all and cdist-object-run Signed-off-by: Steven Armstrong --- doc/man/cdist-object-run-all.text | 10 +++------ doc/man/cdist-object-run.text | 37 +++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 7 deletions(-) create mode 100644 doc/man/cdist-object-run.text diff --git a/doc/man/cdist-object-run-all.text b/doc/man/cdist-object-run-all.text index c5163208..a3a8d56b 100644 --- a/doc/man/cdist-object-run-all.text +++ b/doc/man/cdist-object-run-all.text @@ -16,19 +16,15 @@ cdist-object-run-all HOSTNAME DESCRIPTION ----------- -Iterates over all objects and runs them on the given target host. -The different subtasks are dispatched to specialized exectuables. -See related man pages for details. +Transfers type explorers to the target then runs cdist-object-run(1) +for each created object. SEE ALSO -------- - cdist(7) - cdist-type-explorer-push(1) -- cdist-object-explorer-run(1) -- cdist-object-gencode-run(1) -- cdist-object-push(1) -- cdist-object-code-run(1) +- cdist-object-run(1) - cdist-type(1) diff --git a/doc/man/cdist-object-run.text b/doc/man/cdist-object-run.text new file mode 100644 index 00000000..b527c0e6 --- /dev/null +++ b/doc/man/cdist-object-run.text @@ -0,0 +1,37 @@ +cdist-object-run(1) +=================== +Nico Schottelius +Steven Armstrong + + +NAME +---- +cdist-object-run - Run an object + + +SYNOPSIS +-------- +cdist-object-run HOSTNAME OBJECT + + +DESCRIPTION +----------- +Runs the given object on the given target host. +The different subtasks are dispatched to specialized exectuables. +See related man pages for details. + + +SEE ALSO +-------- +- cdist(7) +- cdist-object-explorer-run(1) +- cdist-object-gencode-run(1) +- cdist-object-push(1) +- cdist-object-code-run(1) +- cdist-type(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). From 4ee5d74c9ff5cb36132ef1751602087892b1d1fe Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 28 Mar 2011 14:55:58 +0200 Subject: [PATCH 1025/6109] implement dependency handling at the object level Signed-off-by: Steven Armstrong --- bin/cdist-code-run | 15 ---------- bin/cdist-config | 16 ++++++++-- bin/cdist-object-manifest-run | 37 +++++++++++------------ bin/cdist-object-run | 54 ++++++++++++++++++++++------------ bin/cdist-object-run-all | 55 +++++++++++++++++------------------ 5 files changed, 93 insertions(+), 84 deletions(-) diff --git a/bin/cdist-code-run b/bin/cdist-code-run index a6a9137f..e969d942 100755 --- a/bin/cdist-code-run +++ b/bin/cdist-code-run @@ -32,31 +32,16 @@ if [ ! -d "$(__cdist_object_dir "$object")" ]; then __cdist_exit_err "Object $object is missing." fi -finished="$(__cdist_object_code_finished "$object")" -require="$(__cdist_object_require "$object")" - code="$(__cdist_object_code "$object")-${__cdist_gencode_type}" -# Do nothing if our work has been done -if [ -f "$finished" ]; then - exit 0 -fi - echo "Checking code-${__cdist_gencode_type} for $object ..." -if [ -f "$require" ]; then - while read requirement; do - echo "Requiring dependency $requirement for $object ..." - cdist-code-run "$requirement" "$__cdist_gencode_type" - done < "$require" -fi if [ -e "$code" ]; then if [ -f "$code" ]; then if [ -x "$code" ]; then echo "Executing code-${__cdist_gencode_type} for $object ..." "$code" - touch "$finished" else __cdist_exit_err "$code exists, but is not executable." fi diff --git a/bin/cdist-config b/bin/cdist-config index 26139819..1b172ddb 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -42,7 +42,6 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_bin:=bin} : ${__cdist_name_code:=code} -: ${__cdist_name_code_finished:=codedone} : ${__cdist_name_conf_dir:=conf} : ${__cdist_name_dot_cdist:=.cdist} : ${__cdist_name_explorer:=explorer} @@ -68,6 +67,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_type:=type} : ${__cdist_name_type_bin:=type_bin} : ${__cdist_name_type_explorer:=type_explorer} +: ${__cdist_name_objects_created:=objects_created} # Used for IDs: Allow everything not starting with - and . : ${__cdist_sane_regexp:=[^-\.].*} @@ -107,6 +107,7 @@ __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") : ${__cdist_manifest_dir:=$__cdist_conf_dir/$__cdist_name_manifest} : ${__cdist_manifest_init:=$__cdist_manifest_dir/$__cdist_name_init} : ${__cdist_type_dir:=$__cdist_conf_dir/$__cdist_name_type} +: ${__cdist_new_objects_created:=$__cdist_local_base_dir/$__cdist_name_objects_created} ################################################################################ # Local output @@ -176,6 +177,14 @@ __cdist_init_deploy() ln -sf "$__cdist_conf_dir" "$__cdist_local_base_dir/$__cdist_name_conf_dir" } +__cdist_new_objects_created() { + touch "$__cdist_tmp_dir/object_created" +} + +__cdist_has_new_objects() { + touch "$__cdist_tmp_dir/object_created" +} + ################################################################################ # Object # @@ -185,9 +194,9 @@ __cdist_object_code() echo "$(__cdist_object_dir "$1")/${__cdist_name_code}" } -__cdist_object_code_finished() +__cdist_object_finished() { - echo "$(__cdist_object_dir "$1")/${__cdist_name_code_finished}" + echo "$(__cdist_object_dir "$1")/${__cdist_name_object_finished}" } __cdist_object_dir() @@ -250,6 +259,7 @@ __cdist_object_type_explorer_dir() echo "$(__cdist_object_dir "$1")/${__cdist_name_explorer}" } + ################################################################################ # Remote # diff --git a/bin/cdist-object-manifest-run b/bin/cdist-object-manifest-run index e20848cd..4f8111f6 100755 --- a/bin/cdist-object-manifest-run +++ b/bin/cdist-object-manifest-run @@ -35,30 +35,27 @@ __cdist_cur_object_dir="$(__cdist_object_dir "$__cdist_object")" # Only the id __cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")" -if [ ! -f "${__cdist_cur_object_dir}/$__cdist_name_object_finished" ]; then - echo "Checking manifest for $__cdist_object ..." +echo "Checking manifest for $__cdist_object ..." - __cdist_type="$(__cdist_type_from_object "$__cdist_object")" - __cdist_manifest="$(__cdist_type_manifest "$__cdist_type")" +__cdist_type="$(__cdist_type_from_object "$__cdist_object")" +__cdist_manifest="$(__cdist_type_manifest "$__cdist_type")" - if [ -f "$__cdist_manifest" ]; then - if [ -x "$__cdist_manifest" ]; then - # Make __cdist_manifest available for cdist-type-emulator - export __cdist_manifest +if [ -f "$__cdist_manifest" ]; then + if [ -x "$__cdist_manifest" ]; then + # Make __cdist_manifest available for cdist-type-emulator + export __cdist_manifest - echo "Executing manifest ${__cdist_manifest} ..." - # Make variables available to non-core - FIXME: beatify - export $__cdist_name_var_object="$__cdist_cur_object_dir" - export $__cdist_name_var_object_id="$__cdist_object_id" - export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" + echo "Executing manifest ${__cdist_manifest} ..." + # Make variables available to non-core - FIXME: beatify + export $__cdist_name_var_object="$__cdist_cur_object_dir" + export $__cdist_name_var_object_id="$__cdist_object_id" + export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" - cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" - else - __cdist_exit_err "${__cdist_manifest} needs to be executable." - fi + cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" + # Tell cdist that there may be new objects + touch "$__cdist_new_objects_created" + else + __cdist_exit_err "${__cdist_manifest} needs to be executable." fi fi -# done with this object -touch "$__cdist_cur_object_dir/$__cdist_name_object_finished" - diff --git a/bin/cdist-object-run b/bin/cdist-object-run index e123c7a4..6ad95656 100755 --- a/bin/cdist-object-run +++ b/bin/cdist-object-run @@ -21,6 +21,7 @@ # # For the given object: # - run type explorers +# - run type manifest # - generate code # - copy object to target # - execute code on target @@ -35,24 +36,41 @@ __cdist_object="$1"; shift __cdist_type="$(__cdist_type_from_object "$__cdist_object")" +__cdist_types_pushed="$__cdist_tmp_dir/types_pushed" +touch "$__cdist_types_pushed" -# Check if type of object has >= 1 explorer -__cdist_has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" +__cdist_object_finished="$(__cdist_object_finished "$__cdist_object")" +if [ ! -f "$__cdist_object_finished" ]; then + + echo + echo "Running object $__cdist_object" + + # Check if type of object has >= 1 explorer + __cdist_has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" + + # Run the type explorers for the current object if any + if [ "$__cdist_has_explorer" ]; then + if ! grep -q "$__cdist_type" "$__cdist_types_pushed"; then + cdist-type-explorer-push "$__cdist_target_host" "$__cdist_type" + echo "$__cdist_type" >> "$__cdist_types_pushed" + fi + + cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object" + fi + + # Run the manifest for the current object + cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object" + + # Run the gencode scripts for the current object + cdist-object-gencode-run "$__cdist_target_host" "$__cdist_object" + + # Transfer the current object to the target + cdist-object-push "$__cdist_target_host" "$__cdist_object" + + # Run the code for the current object + cdist-object-code-run "$__cdist_target_host" "$__cdist_object" + + # Mark this object as done + touch "$__cdist_object_finished" -# Run the type explorers for the current object if any -if [ "$__cdist_has_explorer" ]; then - cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object" fi - -# Run the manifest for the current object -cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object" - -# Run the gencode scripts for the current object -cdist-object-gencode-run "$__cdist_target_host" "$__cdist_object" - -# Transfer the current object to the target -cdist-object-push "$__cdist_target_host" "$__cdist_object" - -# Run the code for the current object -cdist-object-code-run "$__cdist_target_host" "$__cdist_object" - diff --git a/bin/cdist-object-run-all b/bin/cdist-object-run-all index 45a1ae2a..582ff163 100755 --- a/bin/cdist-object-run-all +++ b/bin/cdist-object-run-all @@ -29,39 +29,38 @@ set -eu __cdist_target_host="$1"; shift __cdist_objects="$__cdist_tmp_dir/objects" -__cdist_types_pushed="$__cdist_tmp_dir/types_pushed" -touch "$__cdist_types_pushed" + +# Loop until we do not create new objects anymore +# which is equal to all objects have been run +touch "$__cdist_new_objects_created" +while [ -f "$__cdist_new_objects_created" ]; do + # Assume we're done after this run + rm "$__cdist_new_objects_created" + + # Get listing of objects + __cdist_object_list "$__cdist_out_object_dir" > "$__cdist_objects" -# Get listing of objects -__cdist_object_list "$__cdist_out_object_dir" > "$__cdist_objects" + # NEED TO CREATE ARRAY, SSH DESTROYS WHILE READ LOOP + while read __cdist_object; do + set -- "$@" "$__cdist_object" + done < "$__cdist_objects" + while [ $# -gt 0 ]; do + __cdist_object="$1"; shift -# NEED TO CREATE ARRAY, SSH DESTROYS WHILE READ LOOP -while read __cdist_object; do - set -- "$@" "$__cdist_object" -done < "$__cdist_objects" + __cdist_object_require="$(__cdist_object_require "$__cdist_object")" + if [ -f "$__cdist_object_require" ]; then + echo + while read __cdist_requirement; do + echo "Resolving dependency $__cdist_object -> $__cdist_requirement ..." + cdist-object-run "$__cdist_target_host" "$__cdist_requirement" + done < "$__cdist_object_require" + fi -while [ $# -gt 0 ]; do - __cdist_object="$1"; shift - echo - echo "Running object $__cdist_object" - - __cdist_type="$(__cdist_type_from_object "$__cdist_object")" - - # Check if type of object has >= 1 explorer - __cdist_has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" - - # Transfer the type explorers if any - if [ "$__cdist_has_explorer" ]; then - if ! grep -q "$__cdist_type" "$__cdist_types_pushed"; then - cdist-type-explorer-push "$__cdist_target_host" "$__cdist_type" - echo "$__cdist_type" >> "$__cdist_types_pushed" - fi - fi - - # Process the given object - cdist-object-run "$__cdist_target_host" "$__cdist_object" + # Process the object + cdist-object-run "$__cdist_target_host" "$__cdist_object" + done done From 62c4f0d086d76f54a5cc63e5a8741d5f30a7691a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 28 Mar 2011 15:16:48 +0200 Subject: [PATCH 1026/6109] ABORT if explorer fails, not only WARN Signed-off-by: Nico Schottelius --- bin/cdist-remote-explorer-run | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/cdist-remote-explorer-run b/bin/cdist-remote-explorer-run index 1fdd1467..028f8d7d 100755 --- a/bin/cdist-remote-explorer-run +++ b/bin/cdist-remote-explorer-run @@ -57,16 +57,16 @@ for explorer in "$__cdist_explorer_dir/"*; do if [ -f "$explorer" ]; then if [ ! -x "$explorer" ]; then - echo "Explorer \"$explorer\" exists, but is not executable." - continue + echo "Explorer \"$explorer\" exists, but is not executable." >&2 + exit 1 fi # Execute explorers and save results in remote destination directory "$explorer" > "${__cdist_my_out_dir}/$explorer_name" else if [ -e "$explorer" ]; then - echo "Explorer \"$explorer\" exists, but is not a file." - continue + echo "Explorer \"$explorer\" exists, but is not a file." >&2 + exit 1 fi fi done From 9bdba19d4a077641d8a797ff1ae7f1cca4d696b8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 28 Mar 2011 15:20:58 +0200 Subject: [PATCH 1027/6109] prepend slash when using __object_id as name for __process Signed-off-by: Nico Schottelius --- conf/type/__process/explorer/runs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__process/explorer/runs b/conf/type/__process/explorer/runs index 240ebef9..2bfa8f84 100755 --- a/conf/type/__process/explorer/runs +++ b/conf/type/__process/explorer/runs @@ -24,7 +24,7 @@ if [ -f "$__object/parameter/name" ]; then name="$(cat "$__object/parameter/name")" else - name="$__object_id" + name="/$__object_id" fi pgrep -x -f "$name" || true From 8b0b7052c67673684018d0010eea94611a6febe7 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 28 Mar 2011 15:28:55 +0200 Subject: [PATCH 1028/6109] remove commented obsolete code Signed-off-by: Steven Armstrong --- 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 c9aa1e2f..b0a0117d 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -49,7 +49,7 @@ cdist-dir push "$__cdist_target_host" "${__cdist_abs_mydir}" "${__cdist_remote_b cdist-explorer-run-global "$__cdist_target_host" cdist-manifest-run-init "$__cdist_target_host" -#cdist-manifest-run-all "$__cdist_target_host" cdist-object-run-all "$__cdist_target_host" echo "cdist $__cdist_version: Successfully finished run on $__cdist_target_host" + From ba0bc4d02b320422a8605d56ea7932edb6de1c81 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 28 Mar 2011 18:09:02 +0200 Subject: [PATCH 1029/6109] add somo todo proposals for steven / questions Signed-off-by: Nico Schottelius --- doc/dev/todo/steven-from-nico | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/dev/todo/steven-from-nico diff --git a/doc/dev/todo/steven-from-nico b/doc/dev/todo/steven-from-nico new file mode 100644 index 00000000..1aa81aaa --- /dev/null +++ b/doc/dev/todo/steven-from-nico @@ -0,0 +1,12 @@ +- check: echo without parameters == valid in posix? bin/cdist-object-run:45 and others +- align messages (already in todo for steven, but makes life much easier, thus repeated) +- advantage of touch/rm loop vs. y == variable? bin/cdist-object-run-all +- bin/cdist-object-run-all: "->" graphic: can be useful, but if -> consistent! + -> all graphics could look cool: + + Object foo + | + |--> Requires ... + |--> ... + + but maybe bad do parse from outside From 29b61f38eaede3edab65fc5ef3308caecce77da3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 28 Mar 2011 18:09:35 +0200 Subject: [PATCH 1030/6109] remove unecessary empty lines (interrupts read flow) Signed-off-by: Nico Schottelius --- bin/cdist-object-run-all | 3 --- 1 file changed, 3 deletions(-) diff --git a/bin/cdist-object-run-all b/bin/cdist-object-run-all index 582ff163..a3745689 100755 --- a/bin/cdist-object-run-all +++ b/bin/cdist-object-run-all @@ -40,7 +40,6 @@ while [ -f "$__cdist_new_objects_created" ]; do # Get listing of objects __cdist_object_list "$__cdist_out_object_dir" > "$__cdist_objects" - # NEED TO CREATE ARRAY, SSH DESTROYS WHILE READ LOOP while read __cdist_object; do set -- "$@" "$__cdist_object" @@ -60,7 +59,5 @@ while [ -f "$__cdist_new_objects_created" ]; do # Process the object cdist-object-run "$__cdist_target_host" "$__cdist_object" - done done - From 98c7b98aac81776d2a109dee08f3b8e0c25c15b0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 28 Mar 2011 18:16:55 +0200 Subject: [PATCH 1031/6109] more todo for steven :-p Signed-off-by: Nico Schottelius --- doc/dev/todo/steven-from-nico | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/dev/todo/steven-from-nico b/doc/dev/todo/steven-from-nico index 1aa81aaa..c879144d 100644 --- a/doc/dev/todo/steven-from-nico +++ b/doc/dev/todo/steven-from-nico @@ -1,6 +1,7 @@ - check: echo without parameters == valid in posix? bin/cdist-object-run:45 and others - align messages (already in todo for steven, but makes life much easier, thus repeated) - advantage of touch/rm loop vs. y == variable? bin/cdist-object-run-all + also in bin/cdist-object-run - bin/cdist-object-run-all: "->" graphic: can be useful, but if -> consistent! -> all graphics could look cool: @@ -10,3 +11,7 @@ |--> ... but maybe bad do parse from outside + +- bin/cdist-object-run: type_explorer stuff: probably put into own binary + - sounds like cdist-object-explorer-run is already the right executable to + place such stuff into From 4ab770400a8f7349ca04f7c6d48f7581f3e678da Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 28 Mar 2011 18:17:17 +0200 Subject: [PATCH 1032/6109] - lines + variable alignement Signed-off-by: Nico Schottelius --- bin/cdist-object-run | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/bin/cdist-object-run b/bin/cdist-object-run index 6ad95656..90e61fd4 100755 --- a/bin/cdist-object-run +++ b/bin/cdist-object-run @@ -34,14 +34,12 @@ set -eu __cdist_target_host="$1"; shift __cdist_object="$1"; shift - __cdist_type="$(__cdist_type_from_object "$__cdist_object")" __cdist_types_pushed="$__cdist_tmp_dir/types_pushed" touch "$__cdist_types_pushed" __cdist_object_finished="$(__cdist_object_finished "$__cdist_object")" if [ ! -f "$__cdist_object_finished" ]; then - echo echo "Running object $__cdist_object" @@ -59,18 +57,17 @@ if [ ! -f "$__cdist_object_finished" ]; then fi # Run the manifest for the current object - cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object" + cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object" # Run the gencode scripts for the current object - cdist-object-gencode-run "$__cdist_target_host" "$__cdist_object" + cdist-object-gencode-run "$__cdist_target_host" "$__cdist_object" # Transfer the current object to the target - cdist-object-push "$__cdist_target_host" "$__cdist_object" + cdist-object-push "$__cdist_target_host" "$__cdist_object" # Run the code for the current object - cdist-object-code-run "$__cdist_target_host" "$__cdist_object" + cdist-object-code-run "$__cdist_target_host" "$__cdist_object" # Mark this object as done touch "$__cdist_object_finished" - fi From 4e68c3027b1b96a6f9348667241532c42d591d47 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 28 Mar 2011 18:19:51 +0200 Subject: [PATCH 1033/6109] remove self explanatory comments Signed-off-by: Nico Schottelius --- bin/cdist-object-run | 7 ------- 1 file changed, 7 deletions(-) diff --git a/bin/cdist-object-run b/bin/cdist-object-run index 90e61fd4..d633e537 100755 --- a/bin/cdist-object-run +++ b/bin/cdist-object-run @@ -56,16 +56,9 @@ if [ ! -f "$__cdist_object_finished" ]; then cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object" fi - # Run the manifest for the current object cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object" - - # Run the gencode scripts for the current object cdist-object-gencode-run "$__cdist_target_host" "$__cdist_object" - - # Transfer the current object to the target cdist-object-push "$__cdist_target_host" "$__cdist_object" - - # Run the code for the current object cdist-object-code-run "$__cdist_target_host" "$__cdist_object" # Mark this object as done From 10c96dee875240c8290da46b72e61271d5e25d33 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 28 Mar 2011 18:26:17 +0200 Subject: [PATCH 1034/6109] -useless emptly line in bin/cdist-deploy-to Signed-off-by: Nico Schottelius --- bin/cdist-deploy-to | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index af33c3fe..e44ceff4 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -53,4 +53,3 @@ cdist-object-run-all "$__cdist_target_host" cdist-cache "$__cdist_target_host" echo "cdist $__cdist_version: Successfully finished run on $__cdist_target_host" - From 78777ba9f3e8870975089d63fbd787361adc915a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 28 Mar 2011 18:30:09 +0200 Subject: [PATCH 1035/6109] use same argv processing as elsewhere Signed-off-by: Nico Schottelius --- bin/cdist-remote-explorer-run | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/cdist-remote-explorer-run b/bin/cdist-remote-explorer-run index 028f8d7d..cef91e0d 100755 --- a/bin/cdist-remote-explorer-run +++ b/bin/cdist-remote-explorer-run @@ -25,9 +25,7 @@ # . cdist-config -if [ $# -ne 3 ]; then - __cdist_usage " " -fi +[ $# -eq 3 ] || __cdist_usage " " set -ue # Variable that defines the home of the explorers From 332548ba4f231c7d47f39dd8c64ef3954963527a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 28 Mar 2011 18:31:26 +0200 Subject: [PATCH 1036/6109] more todo, less whiteline in bin/cdist-object-explorer-run Signed-off-by: Nico Schottelius --- bin/cdist-object-explorer-run | 1 - doc/dev/todo/steven-from-nico | 28 ++++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/bin/cdist-object-explorer-run b/bin/cdist-object-explorer-run index e349a490..637d4448 100755 --- a/bin/cdist-object-explorer-run +++ b/bin/cdist-object-explorer-run @@ -24,7 +24,6 @@ . cdist-config [ $# -eq 2 ] || __cdist_usage " " - set -eu __cdist_target_host="$1"; shift diff --git a/doc/dev/todo/steven-from-nico b/doc/dev/todo/steven-from-nico index c879144d..bbfe13dc 100644 --- a/doc/dev/todo/steven-from-nico +++ b/doc/dev/todo/steven-from-nico @@ -15,3 +15,31 @@ - bin/cdist-object-run: type_explorer stuff: probably put into own binary - sounds like cdist-object-explorer-run is already the right executable to place such stuff into + +- remove enormous amount of empty lines :-) + - at end of file + - between [ $# -eq 2 ] || and set + - after if + - before fi + +- cdist-type-explorer-push: wherefore if [ -d "$src_dir" ];? + -> does this not even hide bugs? + -> not sure whether covering cdist-dir in its own script makes + sense, as cdist-dir push is only a one liner + -> if cdist-dir does too less, enhance it + +- code aus cdist-object-run-all für requirements: + in cdist-object-requirements oder so auslagern? + cdist-object-run-all wäre dann eine schöne zwei-zeiler-schleife + +- try to prefix all internal variables with __cdist! + - only avoid if waayyyyyyyyyyy tooooooooo long + - f.i.: cdist-object-explorer-run + +- cdist-object-explorer-run and bin/cdist-object-run seem to contain + very very similar code regarding transfer and co. + + +- general: cdist-object-run-all looks like a good idea! + + From 8abd5ce33ed323719bd29b1e8f97b3b1b14e85e4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 28 Mar 2011 18:37:26 +0200 Subject: [PATCH 1037/6109] - another empty line Signed-off-by: Nico Schottelius --- bin/cdist-object-gencode-run | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/cdist-object-gencode-run b/bin/cdist-object-gencode-run index 76ce6953..bfc65730 100755 --- a/bin/cdist-object-gencode-run +++ b/bin/cdist-object-gencode-run @@ -41,4 +41,3 @@ cdist-object-gencode "$__cdist_target_host" "$__cdist_object" \ "${__cdist_name_gencode_remote}" > "${code_remote}" chmod u+x "${code_local}" "${code_remote}" - From 8315ac2e256ff7de0f77bf9806ae94b391bd01bc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 28 Mar 2011 18:38:08 +0200 Subject: [PATCH 1038/6109] - blank lines Signed-off-by: Nico Schottelius --- bin/cdist-object-push | 2 -- doc/dev/todo/steven-from-nico | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-object-push b/bin/cdist-object-push index 9c44d14e..170aaef3 100755 --- a/bin/cdist-object-push +++ b/bin/cdist-object-push @@ -29,9 +29,7 @@ set -eu __cdist_target_host="$1"; shift __cdist_object="$1"; shift - echo "Transferring object $__cdist_object to target host ..." cdist-dir push "$__cdist_target_host" \ "$(__cdist_object_dir "$__cdist_object")" \ "$(__cdist_remote_object_dir "$__cdist_object")" - diff --git a/doc/dev/todo/steven-from-nico b/doc/dev/todo/steven-from-nico index bbfe13dc..52d3047f 100644 --- a/doc/dev/todo/steven-from-nico +++ b/doc/dev/todo/steven-from-nico @@ -39,6 +39,8 @@ - cdist-object-explorer-run and bin/cdist-object-run seem to contain very very similar code regarding transfer and co. +- cdist-object-manifest-run: + # Tell cdist that there may be new objects -> WHO? :-) - general: cdist-object-run-all looks like a good idea! From a46c0a43726e66ed1903f0b7018bb9c5282d5089 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 28 Mar 2011 18:38:43 +0200 Subject: [PATCH 1039/6109] replace CONSTANT target host by variable target host Signed-off-by: Nico Schottelius --- bin/cdist-object-push | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-object-push b/bin/cdist-object-push index 170aaef3..f7d46be4 100755 --- a/bin/cdist-object-push +++ b/bin/cdist-object-push @@ -29,7 +29,7 @@ set -eu __cdist_target_host="$1"; shift __cdist_object="$1"; shift -echo "Transferring object $__cdist_object to target host ..." +echo "Transferring object $__cdist_object to $__cdist_target_host ..." cdist-dir push "$__cdist_target_host" \ "$(__cdist_object_dir "$__cdist_object")" \ "$(__cdist_remote_object_dir "$__cdist_object")" From c80fa65af1236c68e391ad6753d37a2631ad420d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 28 Mar 2011 18:42:04 +0200 Subject: [PATCH 1040/6109] -blank line Signed-off-by: Nico Schottelius --- bin/cdist-object-code-run | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/cdist-object-code-run b/bin/cdist-object-code-run index b75f6f46..d0722788 100755 --- a/bin/cdist-object-code-run +++ b/bin/cdist-object-code-run @@ -39,4 +39,3 @@ cdist-run-remote "$__cdist_target_host" \ "export __cdist_out_object_dir=\"$__cdist_remote_out_object_dir\";" \ "cdist-code-run" "$__cdist_object" "${__cdist_name_gencode_remote}" \ || __cdist_exit_err "Remote code failed for $__cdist_object" - From bb66523ea517822874125b4959ea9be4b52b131e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 28 Mar 2011 22:43:50 +0200 Subject: [PATCH 1041/6109] todo: fix __ in asciidoc Signed-off-by: Nico Schottelius --- doc/dev/todo/TAKEME | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index 138f7714..b362d491 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -18,4 +18,7 @@ Types to be written/extended: -> aka sed. - __cron - +DOCUMENTATION +-------------- +- asciidoc interprets __, which we use for variables + names -> seek through docs and replace with \_\_! From 3618b225a39835d56bac0c1eda11b07688e1bb49 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 29 Mar 2011 10:34:04 +0200 Subject: [PATCH 1042/6109] make all internal variables __cdist_ prefixed Signed-off-by: Nico Schottelius --- bin/cdist-object-explorer-run | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/cdist-object-explorer-run b/bin/cdist-object-explorer-run index 637d4448..e9a20921 100755 --- a/bin/cdist-object-explorer-run +++ b/bin/cdist-object-explorer-run @@ -33,10 +33,10 @@ __object_id="$(__cdist_object_id_from_object "$__object")" __cdist_type="$(__cdist_type_from_object "$__object")" # Check if type of object has >= 1 explorer -has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" +__cdist_has_explorer="$(__cdist_type___cdist_has_explorer "$__cdist_type")" # If so, run explorers on remote side -if [ "$has_explorer" ]; then +if [ "$__cdist_has_explorer" ]; then echo "Running explorers for $__object ..." # Copy object parameters cdist-dir push "$__cdist_target_host" \ @@ -57,4 +57,3 @@ if [ "$has_explorer" ]; then "$(__cdist_remote_object_type_explorer_dir "$__object")" \ "$(__cdist_object_type_explorer_dir "$__object")" fi - From 5306737d22aa2da3b685cd02a0134202e401a7ca Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 29 Mar 2011 10:38:35 +0200 Subject: [PATCH 1043/6109] discuss todos / cleanup / make more fun for us Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 -- bin/cdist-object-manifest-run | 3 +- bin/cdist-object-run | 1 + bin/cdist-object-run-all | 7 ++++- doc/dev/todo/niconext | 2 ++ doc/dev/todo/steven-from-nico | 59 +++++++++++++++++++++-------------- 6 files changed, 45 insertions(+), 29 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index c4b8d44c..9a00395d 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -68,7 +68,6 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_type:=type} : ${__cdist_name_type_bin:=type_bin} : ${__cdist_name_type_explorer:=type_explorer} -: ${__cdist_name_objects_created:=objects_created} # Used for IDs: Allow everything not starting with - and . : ${__cdist_sane_regexp:=[^-\.].*} @@ -109,7 +108,6 @@ __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") : ${__cdist_manifest_dir:=$__cdist_conf_dir/$__cdist_name_manifest} : ${__cdist_manifest_init:=$__cdist_manifest_dir/$__cdist_name_init} : ${__cdist_type_dir:=$__cdist_conf_dir/$__cdist_name_type} -: ${__cdist_new_objects_created:=$__cdist_local_base_dir/$__cdist_name_objects_created} ################################################################################ # Local output diff --git a/bin/cdist-object-manifest-run b/bin/cdist-object-manifest-run index 4f8111f6..a65ed138 100755 --- a/bin/cdist-object-manifest-run +++ b/bin/cdist-object-manifest-run @@ -52,10 +52,9 @@ if [ -f "$__cdist_manifest" ]; then export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" - # Tell cdist that there may be new objects + FIXME: Tell cdist that there may be new objects - WHO? Mama? touch "$__cdist_new_objects_created" else __cdist_exit_err "${__cdist_manifest} needs to be executable." fi fi - diff --git a/bin/cdist-object-run b/bin/cdist-object-run index d633e537..015d95fa 100755 --- a/bin/cdist-object-run +++ b/bin/cdist-object-run @@ -46,6 +46,7 @@ if [ ! -f "$__cdist_object_finished" ]; then # Check if type of object has >= 1 explorer __cdist_has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" + FIXME: put into cdist-object-explorer-run # Run the type explorers for the current object if any if [ "$__cdist_has_explorer" ]; then if ! grep -q "$__cdist_type" "$__cdist_types_pushed"; then diff --git a/bin/cdist-object-run-all b/bin/cdist-object-run-all index a3745689..7c87660b 100755 --- a/bin/cdist-object-run-all +++ b/bin/cdist-object-run-all @@ -30,6 +30,9 @@ __cdist_target_host="$1"; shift __cdist_objects="$__cdist_tmp_dir/objects" +FIXME: reuse in subscripts, save in objects_base_dir +export __cdist_objects_created="$__cdist_tmp_dir/objects_created" + # Loop until we do not create new objects anymore # which is equal to all objects have been run touch "$__cdist_new_objects_created" @@ -48,11 +51,13 @@ while [ -f "$__cdist_new_objects_created" ]; do while [ $# -gt 0 ]; do __cdist_object="$1"; shift + FIXME: migrate into cdist-object-run + FIXME: take care of SSH foo after migration in while loop __cdist_object_require="$(__cdist_object_require "$__cdist_object")" if [ -f "$__cdist_object_require" ]; then echo while read __cdist_requirement; do - echo "Resolving dependency $__cdist_object -> $__cdist_requirement ..." + echo "Resolving dependency $__cdist_requirement for $__cdist_object ..." cdist-object-run "$__cdist_target_host" "$__cdist_requirement" done < "$__cdist_object_require" fi diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index e9a6ddfc..be66a33d 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,3 +1,5 @@ +/ prefix all internal variables with __cdist! -> Nico + Cache: - add example how to use - export variable $__cache diff --git a/doc/dev/todo/steven-from-nico b/doc/dev/todo/steven-from-nico index 52d3047f..c04e980f 100644 --- a/doc/dev/todo/steven-from-nico +++ b/doc/dev/todo/steven-from-nico @@ -1,8 +1,5 @@ -- check: echo without parameters == valid in posix? bin/cdist-object-run:45 and others -- align messages (already in todo for steven, but makes life much easier, thus repeated) -- advantage of touch/rm loop vs. y == variable? bin/cdist-object-run-all - also in bin/cdist-object-run -- bin/cdist-object-run-all: "->" graphic: can be useful, but if -> consistent! +x check: echo without parameters == valid in posix? bin/cdist-object-run:45 and others +x bin/cdist-object-run-all: "->" graphic: can be useful, but if -> consistent! -> all graphics could look cool: Object foo @@ -12,36 +9,50 @@ but maybe bad do parse from outside -- bin/cdist-object-run: type_explorer stuff: probably put into own binary - - sounds like cdist-object-explorer-run is already the right executable to - place such stuff into - -- remove enormous amount of empty lines :-) +x advantage of touch/rm loop vs. y == variable? bin/cdist-object-run-all + also in bin/cdist-object-run + -> cool :-) +x remove enormous amount of empty lines :-) - at end of file - between [ $# -eq 2 ] || and set - after if - before fi +x code aus cdist-object-run-all für requirements: + in cdist-object-requirements oder so auslagern? + cdist-object-run-all wäre dann eine schöne zwei-zeiler-schleife + +x cdist-object-explorer-run and bin/cdist-object-run seem to contain + very very similar code regarding transfer and co. + -> indirect solved by moving code into cdist-object-explorer-run + +x cdist-object-manifest-run: + # Tell cdist that there may be new objects -> WHO? :-) + +x general: cdist-object-run-all looks like a good idea! + +- export $__cdist_name_var_self=$__cdist_object_self -> non core + +- bin/cdist-object-run: type_explorer stuff: probably put into own binary + - sounds like cdist-object-explorer-run is already the right executable to + place such stuff into + - cdist-type-explorer-push: wherefore if [ -d "$src_dir" ];? -> does this not even hide bugs? -> not sure whether covering cdist-dir in its own script makes sense, as cdist-dir push is only a one liner -> if cdist-dir does too less, enhance it + => merge into cdist-object-explorer-run -- code aus cdist-object-run-all für requirements: - in cdist-object-requirements oder so auslagern? - cdist-object-run-all wäre dann eine schöne zwei-zeiler-schleife +- marker for type transferred / pushed goes into out/type/ + -> new variables for out/type + -> new variables for out/type/.MARKERFOONAMEMEGOOD -- try to prefix all internal variables with __cdist! - - only avoid if waayyyyyyyyyyy tooooooooo long - - f.i.: cdist-object-explorer-run - -- cdist-object-explorer-run and bin/cdist-object-run seem to contain - very very similar code regarding transfer and co. - -- cdist-object-manifest-run: - # Tell cdist that there may be new objects -> WHO? :-) - -- general: cdist-object-run-all looks like a good idea! +- new function: __cdist_type_explorer_created $name + if ! -d foo -> mkdir foo, echo $name >> foo/$NEW_FANCY_VAR +- align messages (already in todo for steven, but makes life much easier, thus repeated) + -> prefix all object stuff with $__self + -> __cdist_echo object string + -> $__cdist_object_self :-) From f187ed257aed536c8b0d12a8d0d42bb83d327dec Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 14:36:35 +0200 Subject: [PATCH 1044/6109] implement the big code shuffle Signed-off-by: Steven Armstrong --- bin/cdist-config | 20 ++++++++++++++++++ bin/cdist-object-explorer-run | 14 +++++++++--- bin/cdist-object-manifest-run | 4 ++-- bin/cdist-object-run | 29 +++++++++++++------------ bin/cdist-object-run-all | 21 +++--------------- bin/cdist-type-explorer-push | 40 ----------------------------------- doc/dev/todo/steven-from-nico | 19 +++++++++-------- doc/man/cdist-stages.text | 7 ++++-- 8 files changed, 67 insertions(+), 87 deletions(-) delete mode 100755 bin/cdist-type-explorer-push diff --git a/bin/cdist-config b/bin/cdist-config index 9a00395d..2c751cd8 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -57,6 +57,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_object_finished:=done} : ${__cdist_name_object_id:=object_id} : ${__cdist_name_object_source:=source} +: ${__cdist_name_objects_created:=.objects_created} : ${__cdist_name_out_dir:=out} : ${__cdist_name_parameter:=parameter} : ${__cdist_name_parameter_required:=required} @@ -68,6 +69,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_type:=type} : ${__cdist_name_type_bin:=type_bin} : ${__cdist_name_type_explorer:=type_explorer} +: ${__cdist_name_type_explorer_pushed:=.explorer_pushed} # Used for IDs: Allow everything not starting with - and . : ${__cdist_sane_regexp:=[^-\.].*} @@ -115,6 +117,7 @@ __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") : ${__cdist_out_dir:=$__cdist_local_base_dir/$__cdist_name_out_dir} : ${__cdist_out_explorer_dir:=$__cdist_out_dir/$__cdist_name_explorer} : ${__cdist_out_object_dir:=$__cdist_out_dir/$__cdist_name_object} +: ${__cdist_out_type_dir:=$__cdist_out_dir/$__cdist_name_type} : ${__cdist_out_type_bin_dir:=$__cdist_out_dir/$__cdist_name_type_bin} ################################################################################ @@ -134,6 +137,11 @@ __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") : ${__cdist_remote_out_explorer_dir:=$__cdist_remote_out_dir/$__cdist_name_explorer} : ${__cdist_remote_out_object_dir:=$__cdist_remote_out_dir/$__cdist_name_object} +################################################################################ +# Global internal variables +# +: ${__cdist_objects_created:=$__cdist_out_object_dir/$__cdist_name_objects_created} + ################################################################################ # Internal functions # @@ -329,6 +337,18 @@ __cdist_type_has_explorer() fi } +__cdist_type_explorer_pushed() +{ + [ -f "${__cdist_out_type_dir}/${__cdist_name_type_explorer_pushed}" ] \ + && grep -q "$1" "${__cdist_out_type_dir}/${__cdist_name_type_explorer_pushed}" +} + +__cdist_type_explorer_pushed_add() +{ + [ -d "$__cdist_out_type_dir" ] || mkdir "$__cdist_out_type_dir" + echo "$1" >> "${__cdist_out_type_dir}/${__cdist_name_type_explorer_pushed}" +} + __cdist_type_gencode() { echo "${__cdist_type_dir}/$1/${__cdist_name_gencode}" diff --git a/bin/cdist-object-explorer-run b/bin/cdist-object-explorer-run index e9a20921..72ca7a1d 100755 --- a/bin/cdist-object-explorer-run +++ b/bin/cdist-object-explorer-run @@ -32,11 +32,19 @@ __object="$1"; shift __object_id="$(__cdist_object_id_from_object "$__object")" __cdist_type="$(__cdist_type_from_object "$__object")" -# Check if type of object has >= 1 explorer -__cdist_has_explorer="$(__cdist_type___cdist_has_explorer "$__cdist_type")" -# If so, run explorers on remote side +# Check if type of object has >= 1 explorer +__cdist_has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" +# Run the type explorers for the current object if any if [ "$__cdist_has_explorer" ]; then + if ! __cdist_type_explorer_pushed "$__cdist_type"; then + src_dir="$(__cdist_type_explorer_dir "$__cdist_type")" + dst_dir="$(__cdist_remote_type_explorer_dir "$__cdist_type")" + echo "Transfering explorers for $__cdist_type ..." + cdist-dir push "$__cdist_target_host" "$src_dir" "$dst_dir" + __cdist_type_explorer_pushed_add "$__cdist_type" + fi + echo "Running explorers for $__object ..." # Copy object parameters cdist-dir push "$__cdist_target_host" \ diff --git a/bin/cdist-object-manifest-run b/bin/cdist-object-manifest-run index a65ed138..25378eb2 100755 --- a/bin/cdist-object-manifest-run +++ b/bin/cdist-object-manifest-run @@ -52,8 +52,8 @@ if [ -f "$__cdist_manifest" ]; then export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" - FIXME: Tell cdist that there may be new objects - WHO? Mama? - touch "$__cdist_new_objects_created" + # Tell cdist-object-run-all that there may be new objects + touch "$__cdist_objects_created" else __cdist_exit_err "${__cdist_manifest} needs to be executable." fi diff --git a/bin/cdist-object-run b/bin/cdist-object-run index 015d95fa..f5d846e3 100755 --- a/bin/cdist-object-run +++ b/bin/cdist-object-run @@ -40,23 +40,26 @@ touch "$__cdist_types_pushed" __cdist_object_finished="$(__cdist_object_finished "$__cdist_object")" if [ ! -f "$__cdist_object_finished" ]; then - echo - echo "Running object $__cdist_object" - # Check if type of object has >= 1 explorer - __cdist_has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" + # Resolve dependencies if any + __cdist_object_require="$(__cdist_object_require "$__cdist_object")" + if [ -f "$__cdist_object_require" ]; then + echo + # NEED TO CREATE ARRAY, SSH DESTROYS WHILE READ LOOP + while read __cdist_requirement; do + set -- "$@" "$__cdist_requirement" + done < "$__cdist_object_require" - FIXME: put into cdist-object-explorer-run - # Run the type explorers for the current object if any - if [ "$__cdist_has_explorer" ]; then - if ! grep -q "$__cdist_type" "$__cdist_types_pushed"; then - cdist-type-explorer-push "$__cdist_target_host" "$__cdist_type" - echo "$__cdist_type" >> "$__cdist_types_pushed" - fi - - cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object" + while [ $# -gt 0 ]; do + __cdist_requirement="$1"; shift + echo "Resolving dependency $__cdist_requirement for $__cdist_object ..." + cdist-object-run "$__cdist_target_host" "$__cdist_requirement" + done fi + echo + echo "Running object $__cdist_object" + cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object" cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object" cdist-object-gencode-run "$__cdist_target_host" "$__cdist_object" cdist-object-push "$__cdist_target_host" "$__cdist_object" diff --git a/bin/cdist-object-run-all b/bin/cdist-object-run-all index 7c87660b..c646ab16 100755 --- a/bin/cdist-object-run-all +++ b/bin/cdist-object-run-all @@ -30,15 +30,12 @@ __cdist_target_host="$1"; shift __cdist_objects="$__cdist_tmp_dir/objects" -FIXME: reuse in subscripts, save in objects_base_dir -export __cdist_objects_created="$__cdist_tmp_dir/objects_created" - # Loop until we do not create new objects anymore # which is equal to all objects have been run -touch "$__cdist_new_objects_created" -while [ -f "$__cdist_new_objects_created" ]; do +touch "$__cdist_objects_created" +while [ -f "$__cdist_objects_created" ]; do # Assume we're done after this run - rm "$__cdist_new_objects_created" + rm "$__cdist_objects_created" # Get listing of objects __cdist_object_list "$__cdist_out_object_dir" > "$__cdist_objects" @@ -50,18 +47,6 @@ while [ -f "$__cdist_new_objects_created" ]; do while [ $# -gt 0 ]; do __cdist_object="$1"; shift - - FIXME: migrate into cdist-object-run - FIXME: take care of SSH foo after migration in while loop - __cdist_object_require="$(__cdist_object_require "$__cdist_object")" - if [ -f "$__cdist_object_require" ]; then - echo - while read __cdist_requirement; do - echo "Resolving dependency $__cdist_requirement for $__cdist_object ..." - cdist-object-run "$__cdist_target_host" "$__cdist_requirement" - done < "$__cdist_object_require" - fi - # Process the object cdist-object-run "$__cdist_target_host" "$__cdist_object" done diff --git a/bin/cdist-type-explorer-push b/bin/cdist-type-explorer-push deleted file mode 100755 index 7ba412ca..00000000 --- a/bin/cdist-type-explorer-push +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# -# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) -# 2011 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 . -# -# -# Push the given types explorers to the target host -# - -. cdist-config -[ $# -eq 2 ] || __cdist_usage " " - -set -eu - -__cdist_target_host="$1"; shift -__cdist_type="$1"; shift - -src_dir="$(__cdist_type_explorer_dir "$__cdist_type")" -dst_dir="$(__cdist_remote_type_explorer_dir "$__cdist_type")" - -if [ -d "$src_dir" ]; then - echo "Transfering explorers for $__cdist_type ..." - cdist-dir push "$__cdist_target_host" "$src_dir" "$dst_dir" -fi - diff --git a/doc/dev/todo/steven-from-nico b/doc/dev/todo/steven-from-nico index c04e980f..2f0ca2b5 100644 --- a/doc/dev/todo/steven-from-nico +++ b/doc/dev/todo/steven-from-nico @@ -31,28 +31,29 @@ x cdist-object-manifest-run: x general: cdist-object-run-all looks like a good idea! -- export $__cdist_name_var_self=$__cdist_object_self -> non core - -- bin/cdist-object-run: type_explorer stuff: probably put into own binary - - sounds like cdist-object-explorer-run is already the right executable to - place such stuff into - -- cdist-type-explorer-push: wherefore if [ -d "$src_dir" ];? +x cdist-type-explorer-push: wherefore if [ -d "$src_dir" ];? -> does this not even hide bugs? -> not sure whether covering cdist-dir in its own script makes sense, as cdist-dir push is only a one liner -> if cdist-dir does too less, enhance it => merge into cdist-object-explorer-run -- marker for type transferred / pushed goes into out/type/ +x bin/cdist-object-run: type_explorer stuff: probably put into own binary + - sounds like cdist-object-explorer-run is already the right executable to + place such stuff into + +x marker for type transferred / pushed goes into out/type/ -> new variables for out/type -> new variables for out/type/.MARKERFOONAMEMEGOOD -- new function: __cdist_type_explorer_created $name +x new function: __cdist_type_explorer_created $name if ! -d foo -> mkdir foo, echo $name >> foo/$NEW_FANCY_VAR +- export $__cdist_name_var_self=$__cdist_object_self -> non core + - align messages (already in todo for steven, but makes life much easier, thus repeated) -> prefix all object stuff with $__self -> __cdist_echo object string -> $__cdist_object_self :-) + diff --git a/doc/man/cdist-stages.text b/doc/man/cdist-stages.text index 4ab93cff..fbd60cea 100644 --- a/doc/man/cdist-stages.text +++ b/doc/man/cdist-stages.text @@ -51,8 +51,11 @@ Related manpages: - cdist-manifest-run-init(1) -STAGE 3: EXECUTION OF TYPES ---------------------------- +STAGE 3: EXECUTION OF OBJECTS +----------------------------- +Each object in the cconfig database is run through the following stages: +- + Every object is checked whether its type has a manifest file. If the type has a manifest file and it is executable, it will be executed. The manifest script may generate and change the created objects. In other words, one type can reuse From 801d2be3d2fbfacd84affbd2e50f85685278d848 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 15:17:45 +0200 Subject: [PATCH 1045/6109] remove legacy variables Signed-off-by: Steven Armstrong --- bin/cdist-object-run | 2 -- 1 file changed, 2 deletions(-) diff --git a/bin/cdist-object-run b/bin/cdist-object-run index f5d846e3..af543316 100755 --- a/bin/cdist-object-run +++ b/bin/cdist-object-run @@ -35,8 +35,6 @@ __cdist_target_host="$1"; shift __cdist_object="$1"; shift __cdist_type="$(__cdist_type_from_object "$__cdist_object")" -__cdist_types_pushed="$__cdist_tmp_dir/types_pushed" -touch "$__cdist_types_pushed" __cdist_object_finished="$(__cdist_object_finished "$__cdist_object")" if [ ! -f "$__cdist_object_finished" ]; then From 32392d129a3cafdaca0ba509e1aada102e656b48 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 15:27:17 +0200 Subject: [PATCH 1046/6109] implement $__self Signed-off-by: Steven Armstrong --- bin/cdist-config | 2 ++ bin/cdist-object-explorer-run | 1 + bin/cdist-object-run | 2 ++ 3 files changed, 5 insertions(+) diff --git a/bin/cdist-config b/bin/cdist-config index 2c751cd8..19c127d4 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -63,6 +63,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_parameter_required:=required} : ${__cdist_name_parameter_optional:=optional} : ${__cdist_name_require:=require} +: ${__cdist_name_self:=self} : ${__cdist_name_singleton:=singleton} : ${__cdist_name_target_host:=target_host} : ${__cdist_name_target_user:=target_user} @@ -89,6 +90,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_var_target_user:=__$__cdist_name_target_user} : ${__cdist_name_var_object:=__$__cdist_name_object} : ${__cdist_name_var_object_id:=__$__cdist_name_object_id} +: ${__cdist_name_var_self:=__$__cdist_name_self} : ${__cdist_name_var_type:=__$__cdist_name_type} diff --git a/bin/cdist-object-explorer-run b/bin/cdist-object-explorer-run index 72ca7a1d..99e12e89 100755 --- a/bin/cdist-object-explorer-run +++ b/bin/cdist-object-explorer-run @@ -55,6 +55,7 @@ if [ "$__cdist_has_explorer" ]; then cdist-run-remote "$__cdist_target_host" \ "__object=\"$(__cdist_remote_object_dir "$__object")\"" \ "__object_id=\"$__object_id\"" \ + "$__cdist_name_var_self=\"$__cdist_object\"" \ cdist-remote-explorer-run \ "$__cdist_name_var_type_explorer" \ "$(__cdist_remote_type_explorer_dir "$__cdist_type")" \ diff --git a/bin/cdist-object-run b/bin/cdist-object-run index af543316..450ba361 100755 --- a/bin/cdist-object-run +++ b/bin/cdist-object-run @@ -33,6 +33,8 @@ set -eu __cdist_target_host="$1"; shift __cdist_object="$1"; shift +# Export to non-core for use in manifest and gencode scripts +export $__cdist_name_var_self=$__cdist_object __cdist_type="$(__cdist_type_from_object "$__cdist_object")" From ce62775aecd5117040cc4f188d5ff700e7dc46d7 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 15:29:56 +0200 Subject: [PATCH 1047/6109] remove hard coded variable names; prefix all variables with __cdist_ Signed-off-by: Steven Armstrong --- bin/cdist-object-explorer-run | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/bin/cdist-object-explorer-run b/bin/cdist-object-explorer-run index 99e12e89..ff0668e5 100755 --- a/bin/cdist-object-explorer-run +++ b/bin/cdist-object-explorer-run @@ -27,10 +27,10 @@ set -eu __cdist_target_host="$1"; shift -__object="$1"; shift +__cdist_object="$1"; shift -__object_id="$(__cdist_object_id_from_object "$__object")" -__cdist_type="$(__cdist_type_from_object "$__object")" +__object_id="$(__cdist_object_id_from_object "$__cdist_object")" +__cdist_type="$(__cdist_type_from_object "$__cdist_object")" # Check if type of object has >= 1 explorer @@ -45,24 +45,24 @@ if [ "$__cdist_has_explorer" ]; then __cdist_type_explorer_pushed_add "$__cdist_type" fi - echo "Running explorers for $__object ..." + echo "Running explorers for $__cdist_object ..." # Copy object parameters cdist-dir push "$__cdist_target_host" \ - "$(__cdist_object_parameter_dir "$__object")" \ - "$(__cdist_remote_object_parameter_dir "$__object")" + "$(__cdist_object_parameter_dir "$__cdist_object")" \ + "$(__cdist_remote_object_parameter_dir "$__cdist_object")" # Execute explorers cdist-run-remote "$__cdist_target_host" \ - "__object=\"$(__cdist_remote_object_dir "$__object")\"" \ - "__object_id=\"$__object_id\"" \ - "$__cdist_name_var_self=\"$__cdist_object\"" \ + "$__cdist_name_var_object=\"$(__cdist_remote_object_dir "$__cdist_object")\"" \ + "$__cdist_name_var_object_id=\"$__object_id\"" \ + "$__cdist_name_var_self=\"$__cdist_object\"" \ cdist-remote-explorer-run \ "$__cdist_name_var_type_explorer" \ "$(__cdist_remote_type_explorer_dir "$__cdist_type")" \ - "$(__cdist_remote_object_type_explorer_dir "$__object")" + "$(__cdist_remote_object_type_explorer_dir "$__cdist_object")" # Copy back results cdist-dir pull "$__cdist_target_host" \ - "$(__cdist_remote_object_type_explorer_dir "$__object")" \ - "$(__cdist_object_type_explorer_dir "$__object")" + "$(__cdist_remote_object_type_explorer_dir "$__cdist_object")" \ + "$(__cdist_object_type_explorer_dir "$__cdist_object")" fi From f671df1c67abdebf79918596cd3407339c57d036 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 15:33:37 +0200 Subject: [PATCH 1048/6109] less todo Signed-off-by: Steven Armstrong --- doc/dev/todo/steven-from-nico | 54 ----------------------------------- 1 file changed, 54 deletions(-) diff --git a/doc/dev/todo/steven-from-nico b/doc/dev/todo/steven-from-nico index 2f0ca2b5..21c8fb52 100644 --- a/doc/dev/todo/steven-from-nico +++ b/doc/dev/todo/steven-from-nico @@ -1,57 +1,3 @@ -x check: echo without parameters == valid in posix? bin/cdist-object-run:45 and others -x bin/cdist-object-run-all: "->" graphic: can be useful, but if -> consistent! - -> all graphics could look cool: - - Object foo - | - |--> Requires ... - |--> ... - - but maybe bad do parse from outside - -x advantage of touch/rm loop vs. y == variable? bin/cdist-object-run-all - also in bin/cdist-object-run - -> cool :-) -x remove enormous amount of empty lines :-) - - at end of file - - between [ $# -eq 2 ] || and set - - after if - - before fi - -x code aus cdist-object-run-all für requirements: - in cdist-object-requirements oder so auslagern? - cdist-object-run-all wäre dann eine schöne zwei-zeiler-schleife - -x cdist-object-explorer-run and bin/cdist-object-run seem to contain - very very similar code regarding transfer and co. - -> indirect solved by moving code into cdist-object-explorer-run - -x cdist-object-manifest-run: - # Tell cdist that there may be new objects -> WHO? :-) - -x general: cdist-object-run-all looks like a good idea! - -x cdist-type-explorer-push: wherefore if [ -d "$src_dir" ];? - -> does this not even hide bugs? - -> not sure whether covering cdist-dir in its own script makes - sense, as cdist-dir push is only a one liner - -> if cdist-dir does too less, enhance it - => merge into cdist-object-explorer-run - -x bin/cdist-object-run: type_explorer stuff: probably put into own binary - - sounds like cdist-object-explorer-run is already the right executable to - place such stuff into - -x marker for type transferred / pushed goes into out/type/ - -> new variables for out/type - -> new variables for out/type/.MARKERFOONAMEMEGOOD - -x new function: __cdist_type_explorer_created $name - if ! -d foo -> mkdir foo, echo $name >> foo/$NEW_FANCY_VAR - -- export $__cdist_name_var_self=$__cdist_object_self -> non core - - - align messages (already in todo for steven, but makes life much easier, thus repeated) -> prefix all object stuff with $__self -> __cdist_echo object string From f2967ef9f13596a4fdaef6e7d07b569ed4ad1154 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 15:36:23 +0200 Subject: [PATCH 1049/6109] remove legacy script Signed-off-by: Steven Armstrong --- bin/cdist-manifest-run-all | 77 -------------------------------------- 1 file changed, 77 deletions(-) delete mode 100755 bin/cdist-manifest-run-all diff --git a/bin/cdist-manifest-run-all b/bin/cdist-manifest-run-all deleted file mode 100755 index a431576d..00000000 --- a/bin/cdist-manifest-run-all +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/sh -# -# 2010-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 . -# -# Run all manifests -# - -. cdist-config -[ $# -eq 1 ] || __cdist_usage "" -set -eu - -__cdist_target_host="$1"; shift - -__cdist_objects_list="${__cdist_tmp_dir}/objects_file" -__cdist_new_objects_list="${__cdist_tmp_dir}/new_objects_file" - -# Loop until we do not create new objects anymore -# which is equal to all objects have been run -__cdist_new_objects_created=y -while [ "$__cdist_new_objects_created" = "y" ]; do - # Assume we're done after this run - __cdist_new_objects_created=n - - __cdist_object_list "$__cdist_out_object_dir" > "$__cdist_objects_list" - - # Check every object, if we need to run it - while read __cdist_object_self; do - # Full path to current object - __cdist_cur_object_dir="$(__cdist_object_dir "$__cdist_object_self")" - - # Only the id - __cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object_self")" - - if [ ! -f "${__cdist_cur_object_dir}/$__cdist_name_object_finished" ]; then - echo "Checking manifest for ${__cdist_object_self} ..." - - __cdist_type="$(__cdist_type_from_object "$__cdist_object_self")" - __cdist_manifest="$(__cdist_type_manifest "${__cdist_type}")" - - if [ -f "$__cdist_manifest" ]; then - if [ -x "$__cdist_manifest" ]; then - # Make __cdist_manifest available for cdist-type-emulator - export __cdist_manifest - - echo "Executing manifest ${__cdist_manifest} ..." - # Make variables available to non-core - FIXME: beatify - export $__cdist_name_var_object="$__cdist_cur_object_dir" - export $__cdist_name_var_object_id="$__cdist_object_id" - export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" - - cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" - __cdist_new_objects_created=y - else - __cdist_exit_err "${__cdist_manifest} needs to be executable." - fi - fi - fi - - # done with this object - touch "$__cdist_cur_object_dir/$__cdist_name_object_finished" - done < "$__cdist_objects_list" -done From 49e987236fed77a1fc4314a1637ac82b29eba3bc Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 15:42:17 +0200 Subject: [PATCH 1050/6109] add manpage for cdist-object-manifest-run Signed-off-by: Steven Armstrong --- doc/man/cdist-object-manifest-run.text | 32 ++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 doc/man/cdist-object-manifest-run.text diff --git a/doc/man/cdist-object-manifest-run.text b/doc/man/cdist-object-manifest-run.text new file mode 100644 index 00000000..76132425 --- /dev/null +++ b/doc/man/cdist-object-manifest-run.text @@ -0,0 +1,32 @@ +cdist-object-manifest-run(1) +============================ +Nico Schottelius +Steven Armstrong + + +NAME +---- +cdist-object-manifest-run - Run an objects manifest + + +SYNOPSIS +-------- +cdist-object-manifest-run HOSTNAME OBJECT + + +DESCRIPTION +----------- +Run the manifest for the given object. + + +SEE ALSO +-------- +- cdist(7) +- cdist-deploy-to(1) +- cdist-manifest-run(1) + + +COPYING +------- +Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). From 59cc3dc1b3afb9f5abc2a4dc55fd4984ed3b05b1 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 15:42:40 +0200 Subject: [PATCH 1051/6109] remove legacy manpage Signed-off-by: Steven Armstrong --- doc/man/cdist-manifest-run-all.text | 32 ----------------------------- 1 file changed, 32 deletions(-) delete mode 100644 doc/man/cdist-manifest-run-all.text diff --git a/doc/man/cdist-manifest-run-all.text b/doc/man/cdist-manifest-run-all.text deleted file mode 100644 index 717089ad..00000000 --- a/doc/man/cdist-manifest-run-all.text +++ /dev/null @@ -1,32 +0,0 @@ -cdist-manifest-run-all(1) -========================== -Nico Schottelius - - -NAME ----- -cdist-manifest-run-all - Run manifests of all created types - - -SYNOPSIS --------- -cdist-manifest-run-all HOSTNAME - - -DESCRIPTION ------------ -cdist-manifest-run-all iterates over every existing object and -executes the manifest of its type. - - -SEE ALSO --------- -- cdist(7) -- cdist-deploy-to(1) -- cdist-manifest-run-init(1) - - -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). From 7ff24008308faf57bc1638c68e967230c918c4cc Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 15:43:37 +0200 Subject: [PATCH 1052/6109] remove legacy manpage Signed-off-by: Steven Armstrong --- doc/man/cdist-type-explorer-push.text | 32 --------------------------- 1 file changed, 32 deletions(-) delete mode 100644 doc/man/cdist-type-explorer-push.text diff --git a/doc/man/cdist-type-explorer-push.text b/doc/man/cdist-type-explorer-push.text deleted file mode 100644 index e32f10a4..00000000 --- a/doc/man/cdist-type-explorer-push.text +++ /dev/null @@ -1,32 +0,0 @@ -cdist-type-explorer-push(1) -=========================== -Nico Schottelius -Steven Armstrong - - -NAME ----- -cdist-type-explorer-push - Transfer type explorers to the target host - - -SYNOPSIS --------- -cdist-type-explorer-push HOSTNAME TYPE - - -DESCRIPTION ------------ -Transfers the explorers of the given type to the target host. - - -SEE ALSO --------- -- cdist(7) -- cdist-object-run(1) -- cdist-type(1) - - -COPYING -------- -Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). From 7c920231b7ac1de4b3aead46b0ed288c29b0721f Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 16:11:38 +0200 Subject: [PATCH 1053/6109] update stages man page to reflect new situation Signed-off-by: Steven Armstrong --- doc/man/cdist-stages.text | 60 ++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 19 deletions(-) diff --git a/doc/man/cdist-stages.text b/doc/man/cdist-stages.text index fbd60cea..465a7fc8 100644 --- a/doc/man/cdist-stages.text +++ b/doc/man/cdist-stages.text @@ -1,6 +1,7 @@ cdist-stages(7) =============== Nico Schottelius +Steven Armstrong NAME @@ -12,8 +13,8 @@ DESCRIPTION ----------- Starting the execution of deployment with cdist-deploy-to(1), cdist passes through different stages, each can be triggered and debugged on its own. -Reading the source of the cdist-deploy-to executable shous the scripts -responsible for each stage. +Reading the source of the cdist-deploy-to and cdist-object-run-all executables +shows the scripts responsible for each stage. STAGE 0: INTERNAL PREPERATION @@ -23,7 +24,7 @@ to contain cdist binaries and creates a clean environment for the configuration run. Related manpages: - - cdist-bin-transfer(1) + - cdist-bin-transfer(1) FIXME: does not exist STAGE 1: TARGET INFORMATION RETRIEVAL @@ -34,6 +35,8 @@ explorers are copied back into the local cache. The results can be used by manifests and types. Related manpages: + - cdist-explorer-run-global(1) + - cdist-remote-explorer-run(1) - cdist-explorer(7) @@ -46,16 +49,27 @@ no conflicts may occur, i.e. no object of the same type with the same id may be created. Related manpages: - - cdist-manifest(7) - - cdist-manifest-run(1) - cdist-manifest-run-init(1) + - cdist-manifest-run(1) + - cdist-manifest(7) -STAGE 3: EXECUTION OF OBJECTS ------------------------------ -Each object in the cconfig database is run through the following stages: -- +STAGE 3: OBJECT INFORMATION RETRIEVAL +------------------------------------- +Every object is checked whether its type has explorers and if so, these are +transfered to the target host and executed. The results are transfered back +and can be used in the following stages to decide what changes need to made +on the target to implement the desired state. +Related manpages: + - cdist-object-explorer-run(1) + - cdist-remote-explorer-run(1) + - cdist-type(7) + - cdist-explorer(7) + + +STAGE 4: RUN THE OBJECT MANIFEST +-------------------------------- Every object is checked whether its type has a manifest file. If the type has a manifest file and it is executable, it will be executed. The manifest script may generate and change the created objects. In other words, one type can reuse @@ -69,12 +83,12 @@ may occur during the merge. A conflict would mean that two different objects try to create the same object, which indicates a broken configuration. Related manpages: + - cdist-object-manifest-run(1) - cdist-manifest-run(1) - - cdist-manifest-run-all(1) - cdist-type(7) -STAGE 4: CODE GENERATION +STAGE 5: CODE GENERATION ------------------------ In this stage for every created objects its type is checked whether it has a gencode script. If the type has a gencode script and it is executable it will @@ -83,19 +97,27 @@ on stdout. If the gencode executable fails, it must print diagnostic messages on stderr and exit non-zero. Related manpages: - - cdist-gencode(1) - - cdist-gencode-all(1) + - cdist-object-gencode-run(1) + - cdist-object-gencode(1) - cdist-type(7) -STAGE 5: CODE EXECUTION +STAGE 6: CODE EXECUTION ----------------------- -The resulting code from the previous stage is transferred to the target host -and executed there to apply the configuration changes, +For every object the resulting code from the previous stage is transferred to +the target host and executed there to apply the configuration changes. Related manpages: - - cdist-exec-run(1) - - cdist-exec-transfer(1) + - cdist-object-code-run(1) + - cdist-code-run(1) + + +STAGE 7: CACHE +-------------- +The cache stores the information from the current run for later use. + +Related manpages: + - cdist-cache(1) SUMMARY @@ -115,5 +137,5 @@ SEE ALSO COPYING ------- -Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +Copyright \(C) 2010-2011 Nico Schottelius, Steven Armstrong. Free use of this software is granted under the terms of the GNU General Public License version 3 (GPLv3). From 44fd2e3c1ce0f59e0c0b0d4de54c4c5a2955b4f9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 29 Mar 2011 16:23:45 +0200 Subject: [PATCH 1054/6109] :%s/Related manpages/Related documentation/g Signed-off-by: Nico Schottelius --- doc/man/cdist-stages.text | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/man/cdist-stages.text b/doc/man/cdist-stages.text index 465a7fc8..279e1d5f 100644 --- a/doc/man/cdist-stages.text +++ b/doc/man/cdist-stages.text @@ -23,7 +23,7 @@ Before running the user facing stages, cdist prepares the target host to contain cdist binaries and creates a clean environment for the configuration run. -Related manpages: +Related documentation: - cdist-bin-transfer(1) FIXME: does not exist @@ -34,7 +34,7 @@ explorers. Every existing explorer is run on the target and the output of all explorers are copied back into the local cache. The results can be used by manifests and types. -Related manpages: +Related documentation: - cdist-explorer-run-global(1) - cdist-remote-explorer-run(1) - cdist-explorer(7) @@ -48,7 +48,7 @@ the objects as defined in the manifest for the specific host. In this stage, no conflicts may occur, i.e. no object of the same type with the same id may be created. -Related manpages: +Related documentation: - cdist-manifest-run-init(1) - cdist-manifest-run(1) - cdist-manifest(7) @@ -61,7 +61,7 @@ transfered to the target host and executed. The results are transfered back and can be used in the following stages to decide what changes need to made on the target to implement the desired state. -Related manpages: +Related documentation: - cdist-object-explorer-run(1) - cdist-remote-explorer-run(1) - cdist-type(7) @@ -82,7 +82,7 @@ The newly created objects are merged back into the existing tree. No conflicts may occur during the merge. A conflict would mean that two different objects try to create the same object, which indicates a broken configuration. -Related manpages: +Related documentation: - cdist-object-manifest-run(1) - cdist-manifest-run(1) - cdist-type(7) @@ -96,7 +96,7 @@ be executed. This executable should create code to be executed on the target on stdout. If the gencode executable fails, it must print diagnostic messages on stderr and exit non-zero. -Related manpages: +Related documentation: - cdist-object-gencode-run(1) - cdist-object-gencode(1) - cdist-type(7) @@ -107,7 +107,7 @@ STAGE 6: CODE EXECUTION For every object the resulting code from the previous stage is transferred to the target host and executed there to apply the configuration changes. -Related manpages: +Related documentation: - cdist-object-code-run(1) - cdist-code-run(1) @@ -116,7 +116,7 @@ STAGE 7: CACHE -------------- The cache stores the information from the current run for later use. -Related manpages: +Related documentation: - cdist-cache(1) From e2e4936103379d6e25de2198a633b6bc8ae9bfca Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 29 Mar 2011 16:24:13 +0200 Subject: [PATCH 1055/6109] -FIXME in doc/man/cdist-stages.text Signed-off-by: Nico Schottelius --- doc/man/cdist-stages.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/cdist-stages.text b/doc/man/cdist-stages.text index 279e1d5f..6ac6efe2 100644 --- a/doc/man/cdist-stages.text +++ b/doc/man/cdist-stages.text @@ -24,7 +24,7 @@ to contain cdist binaries and creates a clean environment for the configuration run. Related documentation: - - cdist-bin-transfer(1) FIXME: does not exist + - Source of cdist-deploy-to STAGE 1: TARGET INFORMATION RETRIEVAL From 3fae65539e58b02cbad9bc3e901f65098bad6772 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 16:25:26 +0200 Subject: [PATCH 1056/6109] remove legacy man pages Signed-off-by: Steven Armstrong --- build.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 709c1c55..335bbe9c 100755 --- a/build.sh +++ b/build.sh @@ -70,12 +70,11 @@ case "$1" in ;; man1) - for man in cdist-code-run.text cdist-code-run-all.text cdist-config.text \ + for man in cdist-code-run.text cdist-config.text \ cdist-dir.text cdist-env.text cdist-explorer-run-global.text \ cdist-deploy-to.text cdist-explorer.text cdist-manifest.text \ cdist-manifest-run.text cdist-manifest-run-init.text \ - cdist-manifest-run-all.text cdist-object-explorer-all.text \ - cdist-object-gencode.text cdist-object-gencode-all.text \ + cdist-object-gencode.text \ cdist-remote-explorer-run.text cdist-run-remote.text \ cdist-type-build-emulation.text cdist-type-emulator.text \ cdist-type-template.text From ad7a9f82f77526a2c52b30447686ecf6391cd6e3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 29 Mar 2011 16:27:57 +0200 Subject: [PATCH 1057/6109] __cdist_objects_created == local output Signed-off-by: Nico Schottelius --- bin/cdist-config | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 19c127d4..1882d1bb 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -122,6 +122,8 @@ __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") : ${__cdist_out_type_dir:=$__cdist_out_dir/$__cdist_name_type} : ${__cdist_out_type_bin_dir:=$__cdist_out_dir/$__cdist_name_type_bin} +: ${__cdist_objects_created:=$__cdist_out_object_dir/$__cdist_name_objects_created} + ################################################################################ # Remote base # @@ -139,10 +141,6 @@ __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") : ${__cdist_remote_out_explorer_dir:=$__cdist_remote_out_dir/$__cdist_name_explorer} : ${__cdist_remote_out_object_dir:=$__cdist_remote_out_dir/$__cdist_name_object} -################################################################################ -# Global internal variables -# -: ${__cdist_objects_created:=$__cdist_out_object_dir/$__cdist_name_objects_created} ################################################################################ # Internal functions From 6be9d02e6a8f588d4b40ef0fdf01743d8f9736cc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 29 Mar 2011 16:28:59 +0200 Subject: [PATCH 1058/6109] consistency: function {} begin on next line Signed-off-by: Nico Schottelius --- bin/cdist-config | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 1882d1bb..531f709c 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -185,11 +185,13 @@ __cdist_init_deploy() ln -sf "$__cdist_conf_dir" "$__cdist_local_base_dir/$__cdist_name_conf_dir" } -__cdist_new_objects_created() { +__cdist_new_objects_created() +{ touch "$__cdist_tmp_dir/object_created" } -__cdist_has_new_objects() { +__cdist_has_new_objects() +{ touch "$__cdist_tmp_dir/object_created" } @@ -267,7 +269,6 @@ __cdist_object_type_explorer_dir() echo "$(__cdist_object_dir "$1")/${__cdist_name_explorer}" } - ################################################################################ # Remote # From 0422eda599f51916c9c7d3cbd213b818d00c62e0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 29 Mar 2011 16:33:09 +0200 Subject: [PATCH 1059/6109] WARNING: WHITESPACE-NAZI Signed-off-by: Nico Schottelius --- doc/dev/todo/TAKEME | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index 138f7714..e63d3dfb 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -17,5 +17,3 @@ Types to be written/extended: - regexp replace (can probably cover all?) -> aka sed. - __cron - - From a5586aecff4ef3a37e41da1fe86b772027130329 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 16:36:10 +0200 Subject: [PATCH 1060/6109] changelog++ Signed-off-by: Steven Armstrong --- doc/changelog | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/changelog b/doc/changelog index 7faf789b..20c59b93 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,7 +1,11 @@ 1.5.0: * Add cache functionality * New type __process - * Restructured execution: Run whole object at once (REPHRASE) (Steven Armstrong) + * Restructured execution: (Steven Armstrong) + Process each object as a whole, resolve dependencies and ensure + correct execution order. + * Documentation: Rewrite stages docs + * Documentation: Remove legacy man pages 1.4.1: 2011-03-25 * New type __key_value (Steven Armstrong) From ebbacf48732ee2375a7fe8704985162ce121ed87 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 16:41:38 +0200 Subject: [PATCH 1061/6109] remove unused functions Signed-off-by: Steven Armstrong --- bin/cdist-config | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 531f709c..eb2a8e90 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -185,16 +185,6 @@ __cdist_init_deploy() ln -sf "$__cdist_conf_dir" "$__cdist_local_base_dir/$__cdist_name_conf_dir" } -__cdist_new_objects_created() -{ - touch "$__cdist_tmp_dir/object_created" -} - -__cdist_has_new_objects() -{ - touch "$__cdist_tmp_dir/object_created" -} - ################################################################################ # Object # From 5024c4bf580141e049bc30e825c660306295eeb5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 29 Mar 2011 16:45:16 +0200 Subject: [PATCH 1062/6109] more changes, quote author correctly Signed-off-by: Nico Schottelius --- doc/changelog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/changelog b/doc/changelog index 20c59b93..5e0e2314 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,11 +1,11 @@ 1.5.0: - * Add cache functionality + * Add basic cache functionality * New type __process * Restructured execution: (Steven Armstrong) Process each object as a whole, resolve dependencies and ensure correct execution order. - * Documentation: Rewrite stages docs - * Documentation: Remove legacy man pages + * Documentation: Rewrite stages docs (Steven Armstrong) + * Documentation: Remove legacy man pages (Steven Armstrong) 1.4.1: 2011-03-25 * New type __key_value (Steven Armstrong) From 1d057560766e2377e1aa4fa914f0a1d368c321f9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 29 Mar 2011 16:47:02 +0200 Subject: [PATCH 1063/6109] release 1.5.0 Signed-off-by: Nico Schottelius --- README | 3 ++- bin/cdist-config | 2 +- doc/changelog | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README b/README index c498e3b8..a62ac61c 100644 --- a/README +++ b/README @@ -127,10 +127,11 @@ how to use cdist. There are at least the following branches available: * master: the development branch - * 1.4: Support for redefiniton of objects (if equal) + * 1.5: Focus on object orientation instead of global stage orientation Old versions: + * 1.4: Support for redefiniton of objects (if equal) * 1.3: Support for local and remote code execution (current stable) * 1.2: Dependencies supported * 1.1: __file to __file, __directory, __link migration diff --git a/bin/cdist-config b/bin/cdist-config index eb2a8e90..ae84ced4 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -19,7 +19,7 @@ # # -__cdist_version="1.5.0pre" +__cdist_version="1.5.0" # Fail if something bogus is going on set -u diff --git a/doc/changelog b/doc/changelog index 5e0e2314..d3091fd7 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,4 +1,4 @@ -1.5.0: +1.5.0: 2011-03-29 * Add basic cache functionality * New type __process * Restructured execution: (Steven Armstrong) From f64c7988de1ecdc1af61be97bc74a47b04e09e88 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 16:52:27 +0200 Subject: [PATCH 1064/6109] document __self Signed-off-by: Steven Armstrong --- doc/man/cdist-reference.text.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/man/cdist-reference.text.sh b/doc/man/cdist-reference.text.sh index f6840880..48954b8e 100755 --- a/doc/man/cdist-reference.text.sh +++ b/doc/man/cdist-reference.text.sh @@ -166,6 +166,9 @@ __object:: __object_id:: The type unique object id. Available for: type manifest, type explorer, type codegen +__self:: + The full qualified name of the current object. + Available for: type manifest, type explorer, type codegen __target_host:: The host we are deploying to. Available for: initial manifest, type manifest, type codegen From a891a951e71736136de2c88855ff0252b11d7fed Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 29 Mar 2011 16:49:05 +0200 Subject: [PATCH 1065/6109] cleanup todos Signed-off-by: Nico Schottelius --- doc/dev/todo/TAKEME | 11 +++++++++++ doc/dev/todo/niconext | 12 +----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index a591038c..7e6a44d9 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -21,3 +21,14 @@ DOCUMENTATION -------------- - asciidoc interprets __, which we use for variables names -> seek through docs and replace with \_\_! +- check all all internal variables are prefixed with __cdist + +Cache: + - add example how to use + - export variable $__cache + -> for current host + -> add function to cdist-config, import from cdist-cache + + +remove --preseed from package_apt and add debconf_set_selection or similar + -> much cleaner! diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index be66a33d..29229d64 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,11 +1 @@ -/ prefix all internal variables with __cdist! -> Nico - -Cache: - - add example how to use - - export variable $__cache - -> for current host - -> add function to cdist-config, import from cdist-cache - - -remove --preseed from package_apt and add debconf_set_selection or similar - -> much cleaner! +Release 1.5.0 correctly :-) From 1ca8aec2066a19e1ec58e59a80a84420f56e81bb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 29 Mar 2011 16:49:49 +0200 Subject: [PATCH 1066/6109] update web/readme Signed-off-by: Nico Schottelius --- README | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README b/README index a62ac61c..3a4b2051 100644 --- a/README +++ b/README @@ -144,7 +144,8 @@ may vanish at any point. To select a specific branch use git checkout -b origin/ # Stay on a specific version - git checkout -b 1.4 origin/1.4 + version=1.5 + git checkout -b $version origin/$version ### Mirrors From dde2f370546e03a1e2a85b11162c20aadd80b87f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 29 Mar 2011 16:51:11 +0200 Subject: [PATCH 1067/6109] make build.sh die on error Signed-off-by: Nico Schottelius --- build.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.sh b/build.sh index 335bbe9c..52b3466e 100755 --- a/build.sh +++ b/build.sh @@ -23,6 +23,9 @@ # Pull a directory from a target, both sides have the same name (i.e. explorers) # +# exit on any error +set -e + # Manpage and HTML A2XM="a2x -f manpage --no-xmllint" A2XH="a2x -f xhtml --no-xmllint" From 9a56c5122c86649e6665516c77d82f7668523378 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 29 Mar 2011 16:52:53 +0200 Subject: [PATCH 1068/6109] +release target in build.sh Signed-off-by: Nico Schottelius --- build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.sh b/build.sh index 52b3466e..1d02256f 100755 --- a/build.sh +++ b/build.sh @@ -99,6 +99,10 @@ case "$1" in ${MANDIR}/cdist-reference.text.sh ;; + release) + "$0" clean && "$0" man && "$0" web + ;; + web) cp README ${WEBDIR}/${WEBPAGE} rm -rf ${WEBDIR}/${WEBBASE}/man && mkdir ${WEBDIR}/${WEBBASE}/man From bcbabe885b6c8ecfbe0cc346ece8034e658a2374 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 29 Mar 2011 16:54:11 +0200 Subject: [PATCH 1069/6109] authors on one line Signed-off-by: Nico Schottelius --- doc/man/cdist-stages.text | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/man/cdist-stages.text b/doc/man/cdist-stages.text index 6ac6efe2..cbd541fe 100644 --- a/doc/man/cdist-stages.text +++ b/doc/man/cdist-stages.text @@ -1,7 +1,6 @@ cdist-stages(7) =============== -Nico Schottelius -Steven Armstrong +Nico Schottelius , Steven Armstrong NAME From 022e255d7a0bb497e19cf9f5c48e723c3a0e4f6b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 29 Mar 2011 16:55:40 +0200 Subject: [PATCH 1070/6109] less line breaks in asciidoc Signed-off-by: Nico Schottelius --- doc/man/cdist-object-code-run.text | 3 +-- doc/man/cdist-object-explorer-run.text | 3 +-- doc/man/cdist-object-gencode-run.text | 3 +-- doc/man/cdist-object-push.text | 3 +-- doc/man/cdist-object-run-all.text | 3 +-- doc/man/cdist-object-run.text | 3 +-- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/doc/man/cdist-object-code-run.text b/doc/man/cdist-object-code-run.text index 4d19b5eb..c662d4c3 100644 --- a/doc/man/cdist-object-code-run.text +++ b/doc/man/cdist-object-code-run.text @@ -1,7 +1,6 @@ cdist-object-code-run(1) ======================== -Nico Schottelius -Steven Armstrong +Nico Schottelius , Steven Armstrong NAME diff --git a/doc/man/cdist-object-explorer-run.text b/doc/man/cdist-object-explorer-run.text index a94047c3..a1c87cd6 100644 --- a/doc/man/cdist-object-explorer-run.text +++ b/doc/man/cdist-object-explorer-run.text @@ -1,7 +1,6 @@ cdist-object-explorer-run(1) ============================ -Nico Schottelius -Steven Armstrong +Nico Schottelius , Steven Armstrong NAME diff --git a/doc/man/cdist-object-gencode-run.text b/doc/man/cdist-object-gencode-run.text index d69d1787..fc93ebfd 100644 --- a/doc/man/cdist-object-gencode-run.text +++ b/doc/man/cdist-object-gencode-run.text @@ -1,7 +1,6 @@ cdist-object-gencode-run(1) =========================== -Nico Schottelius -Steven Armstrong +Nico Schottelius , Steven Armstrong NAME diff --git a/doc/man/cdist-object-push.text b/doc/man/cdist-object-push.text index 69648a4d..168f5190 100644 --- a/doc/man/cdist-object-push.text +++ b/doc/man/cdist-object-push.text @@ -1,7 +1,6 @@ cdist-object-push(1) ==================== -Nico Schottelius -Steven Armstrong +Nico Schottelius , Steven Armstrong NAME diff --git a/doc/man/cdist-object-run-all.text b/doc/man/cdist-object-run-all.text index a3a8d56b..2b27347c 100644 --- a/doc/man/cdist-object-run-all.text +++ b/doc/man/cdist-object-run-all.text @@ -1,7 +1,6 @@ cdist-object-run-all(1) ======================= -Nico Schottelius -Steven Armstrong +Nico Schottelius , Steven Armstrong NAME diff --git a/doc/man/cdist-object-run.text b/doc/man/cdist-object-run.text index b527c0e6..b91e50ca 100644 --- a/doc/man/cdist-object-run.text +++ b/doc/man/cdist-object-run.text @@ -1,7 +1,6 @@ cdist-object-run(1) =================== -Nico Schottelius -Steven Armstrong +Nico Schottelius , Steven Armstrong NAME From d27afe352860c366b7c4decddde2a516a4444d35 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 17:24:40 +0200 Subject: [PATCH 1071/6109] move manpages Signed-off-by: Steven Armstrong --- doc/man/{ => man1}/cdist-cache.text | 0 doc/man/{ => man1}/cdist-code-run.text | 0 doc/man/{ => man1}/cdist-config.text | 0 doc/man/{ => man1}/cdist-deploy-to.text | 0 doc/man/{ => man1}/cdist-dir.text | 0 doc/man/{ => man1}/cdist-env.text | 0 doc/man/{ => man1}/cdist-explorer-run-global.text | 0 doc/man/{ => man1}/cdist-manifest-run-init.text | 0 doc/man/{ => man1}/cdist-manifest-run.text | 0 doc/man/{ => man1}/cdist-object-code-run.text | 0 doc/man/{ => man1}/cdist-object-explorer-run.text | 0 doc/man/{ => man1}/cdist-object-gencode-run.text | 0 doc/man/{ => man1}/cdist-object-gencode.text | 0 doc/man/{ => man1}/cdist-object-manifest-run.text | 0 doc/man/{ => man1}/cdist-object-push.text | 0 doc/man/{ => man1}/cdist-object-run-all.text | 0 doc/man/{ => man1}/cdist-object-run.text | 0 doc/man/{ => man1}/cdist-quickstart.text | 0 doc/man/{ => man1}/cdist-remote-explorer-run.text | 0 doc/man/{ => man1}/cdist-run-remote.text | 0 doc/man/{ => man1}/cdist-type-build-emulation.text | 0 doc/man/{ => man1}/cdist-type-emulator.text | 0 doc/man/{ => man1}/cdist-type-template.text | 0 doc/man/{ => man7}/cdist-best-practice.text | 0 doc/man/{ => man7}/cdist-explorer.text | 0 doc/man/{ => man7}/cdist-hacker.text | 0 doc/man/{ => man7}/cdist-manifest.text | 0 doc/man/{ => man7}/cdist-stages.text | 0 doc/man/{ => man7}/cdist-type.text | 0 doc/man/{ => man7}/cdist.text | 0 30 files changed, 0 insertions(+), 0 deletions(-) rename doc/man/{ => man1}/cdist-cache.text (100%) rename doc/man/{ => man1}/cdist-code-run.text (100%) rename doc/man/{ => man1}/cdist-config.text (100%) rename doc/man/{ => man1}/cdist-deploy-to.text (100%) rename doc/man/{ => man1}/cdist-dir.text (100%) rename doc/man/{ => man1}/cdist-env.text (100%) rename doc/man/{ => man1}/cdist-explorer-run-global.text (100%) rename doc/man/{ => man1}/cdist-manifest-run-init.text (100%) rename doc/man/{ => man1}/cdist-manifest-run.text (100%) rename doc/man/{ => man1}/cdist-object-code-run.text (100%) rename doc/man/{ => man1}/cdist-object-explorer-run.text (100%) rename doc/man/{ => man1}/cdist-object-gencode-run.text (100%) rename doc/man/{ => man1}/cdist-object-gencode.text (100%) rename doc/man/{ => man1}/cdist-object-manifest-run.text (100%) rename doc/man/{ => man1}/cdist-object-push.text (100%) rename doc/man/{ => man1}/cdist-object-run-all.text (100%) rename doc/man/{ => man1}/cdist-object-run.text (100%) rename doc/man/{ => man1}/cdist-quickstart.text (100%) rename doc/man/{ => man1}/cdist-remote-explorer-run.text (100%) rename doc/man/{ => man1}/cdist-run-remote.text (100%) rename doc/man/{ => man1}/cdist-type-build-emulation.text (100%) rename doc/man/{ => man1}/cdist-type-emulator.text (100%) rename doc/man/{ => man1}/cdist-type-template.text (100%) rename doc/man/{ => man7}/cdist-best-practice.text (100%) rename doc/man/{ => man7}/cdist-explorer.text (100%) rename doc/man/{ => man7}/cdist-hacker.text (100%) rename doc/man/{ => man7}/cdist-manifest.text (100%) rename doc/man/{ => man7}/cdist-stages.text (100%) rename doc/man/{ => man7}/cdist-type.text (100%) rename doc/man/{ => man7}/cdist.text (100%) diff --git a/doc/man/cdist-cache.text b/doc/man/man1/cdist-cache.text similarity index 100% rename from doc/man/cdist-cache.text rename to doc/man/man1/cdist-cache.text diff --git a/doc/man/cdist-code-run.text b/doc/man/man1/cdist-code-run.text similarity index 100% rename from doc/man/cdist-code-run.text rename to doc/man/man1/cdist-code-run.text diff --git a/doc/man/cdist-config.text b/doc/man/man1/cdist-config.text similarity index 100% rename from doc/man/cdist-config.text rename to doc/man/man1/cdist-config.text diff --git a/doc/man/cdist-deploy-to.text b/doc/man/man1/cdist-deploy-to.text similarity index 100% rename from doc/man/cdist-deploy-to.text rename to doc/man/man1/cdist-deploy-to.text diff --git a/doc/man/cdist-dir.text b/doc/man/man1/cdist-dir.text similarity index 100% rename from doc/man/cdist-dir.text rename to doc/man/man1/cdist-dir.text diff --git a/doc/man/cdist-env.text b/doc/man/man1/cdist-env.text similarity index 100% rename from doc/man/cdist-env.text rename to doc/man/man1/cdist-env.text diff --git a/doc/man/cdist-explorer-run-global.text b/doc/man/man1/cdist-explorer-run-global.text similarity index 100% rename from doc/man/cdist-explorer-run-global.text rename to doc/man/man1/cdist-explorer-run-global.text diff --git a/doc/man/cdist-manifest-run-init.text b/doc/man/man1/cdist-manifest-run-init.text similarity index 100% rename from doc/man/cdist-manifest-run-init.text rename to doc/man/man1/cdist-manifest-run-init.text diff --git a/doc/man/cdist-manifest-run.text b/doc/man/man1/cdist-manifest-run.text similarity index 100% rename from doc/man/cdist-manifest-run.text rename to doc/man/man1/cdist-manifest-run.text diff --git a/doc/man/cdist-object-code-run.text b/doc/man/man1/cdist-object-code-run.text similarity index 100% rename from doc/man/cdist-object-code-run.text rename to doc/man/man1/cdist-object-code-run.text diff --git a/doc/man/cdist-object-explorer-run.text b/doc/man/man1/cdist-object-explorer-run.text similarity index 100% rename from doc/man/cdist-object-explorer-run.text rename to doc/man/man1/cdist-object-explorer-run.text diff --git a/doc/man/cdist-object-gencode-run.text b/doc/man/man1/cdist-object-gencode-run.text similarity index 100% rename from doc/man/cdist-object-gencode-run.text rename to doc/man/man1/cdist-object-gencode-run.text diff --git a/doc/man/cdist-object-gencode.text b/doc/man/man1/cdist-object-gencode.text similarity index 100% rename from doc/man/cdist-object-gencode.text rename to doc/man/man1/cdist-object-gencode.text diff --git a/doc/man/cdist-object-manifest-run.text b/doc/man/man1/cdist-object-manifest-run.text similarity index 100% rename from doc/man/cdist-object-manifest-run.text rename to doc/man/man1/cdist-object-manifest-run.text diff --git a/doc/man/cdist-object-push.text b/doc/man/man1/cdist-object-push.text similarity index 100% rename from doc/man/cdist-object-push.text rename to doc/man/man1/cdist-object-push.text diff --git a/doc/man/cdist-object-run-all.text b/doc/man/man1/cdist-object-run-all.text similarity index 100% rename from doc/man/cdist-object-run-all.text rename to doc/man/man1/cdist-object-run-all.text diff --git a/doc/man/cdist-object-run.text b/doc/man/man1/cdist-object-run.text similarity index 100% rename from doc/man/cdist-object-run.text rename to doc/man/man1/cdist-object-run.text diff --git a/doc/man/cdist-quickstart.text b/doc/man/man1/cdist-quickstart.text similarity index 100% rename from doc/man/cdist-quickstart.text rename to doc/man/man1/cdist-quickstart.text diff --git a/doc/man/cdist-remote-explorer-run.text b/doc/man/man1/cdist-remote-explorer-run.text similarity index 100% rename from doc/man/cdist-remote-explorer-run.text rename to doc/man/man1/cdist-remote-explorer-run.text diff --git a/doc/man/cdist-run-remote.text b/doc/man/man1/cdist-run-remote.text similarity index 100% rename from doc/man/cdist-run-remote.text rename to doc/man/man1/cdist-run-remote.text diff --git a/doc/man/cdist-type-build-emulation.text b/doc/man/man1/cdist-type-build-emulation.text similarity index 100% rename from doc/man/cdist-type-build-emulation.text rename to doc/man/man1/cdist-type-build-emulation.text diff --git a/doc/man/cdist-type-emulator.text b/doc/man/man1/cdist-type-emulator.text similarity index 100% rename from doc/man/cdist-type-emulator.text rename to doc/man/man1/cdist-type-emulator.text diff --git a/doc/man/cdist-type-template.text b/doc/man/man1/cdist-type-template.text similarity index 100% rename from doc/man/cdist-type-template.text rename to doc/man/man1/cdist-type-template.text diff --git a/doc/man/cdist-best-practice.text b/doc/man/man7/cdist-best-practice.text similarity index 100% rename from doc/man/cdist-best-practice.text rename to doc/man/man7/cdist-best-practice.text diff --git a/doc/man/cdist-explorer.text b/doc/man/man7/cdist-explorer.text similarity index 100% rename from doc/man/cdist-explorer.text rename to doc/man/man7/cdist-explorer.text diff --git a/doc/man/cdist-hacker.text b/doc/man/man7/cdist-hacker.text similarity index 100% rename from doc/man/cdist-hacker.text rename to doc/man/man7/cdist-hacker.text diff --git a/doc/man/cdist-manifest.text b/doc/man/man7/cdist-manifest.text similarity index 100% rename from doc/man/cdist-manifest.text rename to doc/man/man7/cdist-manifest.text diff --git a/doc/man/cdist-stages.text b/doc/man/man7/cdist-stages.text similarity index 100% rename from doc/man/cdist-stages.text rename to doc/man/man7/cdist-stages.text diff --git a/doc/man/cdist-type.text b/doc/man/man7/cdist-type.text similarity index 100% rename from doc/man/cdist-type.text rename to doc/man/man7/cdist-type.text diff --git a/doc/man/cdist.text b/doc/man/man7/cdist.text similarity index 100% rename from doc/man/cdist.text rename to doc/man/man7/cdist.text From ac274802dee55104a92ea4bcda8dfe6e0f6d8c94 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 18:12:19 +0200 Subject: [PATCH 1072/6109] update build.sh to work with new man source layout Signed-off-by: Steven Armstrong --- build.sh | 44 ++++++++------------------------------------ 1 file changed, 8 insertions(+), 36 deletions(-) diff --git a/build.sh b/build.sh index 1d02256f..a6a0e7b0 100755 --- a/build.sh +++ b/build.sh @@ -24,7 +24,7 @@ # # exit on any error -set -e +#set -e # Manpage and HTML A2XM="a2x -f manpage --no-xmllint" @@ -43,11 +43,8 @@ MAN7DSTDIR=${MANDIR}/man7 case "$1" in man) set -e - "$0" mandirs "$0" mangen "$0" mantype - "$0" man1 - "$0" man7 "$0" manbuild ;; @@ -57,12 +54,6 @@ case "$1" in $A2XM "$src" $A2XH "$src" done - wait - ;; - - mandirs) - # Create destination directories - mkdir -p "${MAN1DSTDIR}" "${MAN7DSTDIR}" ;; mantype) @@ -72,29 +63,6 @@ case "$1" in done ;; - man1) - for man in cdist-code-run.text cdist-config.text \ - cdist-dir.text cdist-env.text cdist-explorer-run-global.text \ - cdist-deploy-to.text cdist-explorer.text cdist-manifest.text \ - cdist-manifest-run.text cdist-manifest-run-init.text \ - cdist-object-gencode.text \ - cdist-remote-explorer-run.text cdist-run-remote.text \ - cdist-type-build-emulation.text cdist-type-emulator.text \ - cdist-type-template.text - do - ln -sf ../$man ${MAN1DSTDIR} - done - ;; - - man7) - for man in cdist.text cdist-best-practice.text cdist-hacker.text \ - cdist-quickstart.text cdist-reference.text cdist-stages.text \ - cdist-type.text cdist-cache.text - do - ln -sf ../$man ${MAN7DSTDIR} - done - ;; - mangen) ${MANDIR}/cdist-reference.text.sh ;; @@ -118,8 +86,13 @@ case "$1" in ;; clean) - rm -rf "$MAN1DSTDIR" "$MAN7DSTDIR" - rm -f ${MANDIR}/cdist-reference.text + rm -f ${MANDIR}/cdist-reference.text + find "${MANDIR}" -mindepth 2 -type l \ + -o -name "*.1" \ + -o -name "*.7" \ + -o -name "*.html" \ + -o -name "*.xml" \ + | xargs rm -f ;; *) @@ -129,7 +102,6 @@ case "$1" in echo 'Here are the possible targets:' echo '' echo ' man: Build manpages (requires Asciidoc)' - echo ' manhtml: Build html-manpages (requires Asciidoc)' echo ' clean: Remove build stuff' echo '' echo '' From fb426bd412ed1e0f1843a0bcad9dde939310e948 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 20:10:40 +0200 Subject: [PATCH 1073/6109] __directory type does not have a destination parameter Signed-off-by: Steven Armstrong --- conf/type/__directory/explorer/exists | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/conf/type/__directory/explorer/exists b/conf/type/__directory/explorer/exists index b0be82fc..f8b85671 100755 --- a/conf/type/__directory/explorer/exists +++ b/conf/type/__directory/explorer/exists @@ -21,11 +21,7 @@ # Check whether file exists or not # -if [ -f "$__object/parameter/destination" ]; then - destination="$(cat "$__object/parameter/destination")" -else - destination="/$__object_id" -fi +destination="/$__object_id" if [ -e "$destination" ]; then echo yes From 2345d6509bc8ba2000c4d88d27f6976c04345325 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 21:20:07 +0200 Subject: [PATCH 1074/6109] add missing function call to __cdist_usage Signed-off-by: Steven Armstrong --- bin/cdist-type-emulator | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index b3ed1f3d..d0464533 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -25,7 +25,7 @@ # . cdist-config -set -eu +set -u ################################################################################ # Prepare object and type @@ -137,7 +137,7 @@ cd "$__cdist_parameter_dir" for parameter in $(ls -1); do is_valid=$(grep "^$parameter\$" "$__cdist_tmp_file") - [ "$is_valid" ] || "Unknown parameter $parameter" + [ "$is_valid" ] || __cdist_usage "Unknown parameter $parameter" done ################################################################################ From fe159eccb2946a85c1b0654a5258c3f45f5c31d5 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 21:47:05 +0200 Subject: [PATCH 1075/6109] prefix all variables with __cdist Signed-off-by: Steven Armstrong --- bin/cdist-code-run | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/cdist-code-run b/bin/cdist-code-run index e969d942..db1a2378 100755 --- a/bin/cdist-code-run +++ b/bin/cdist-code-run @@ -25,22 +25,22 @@ [ $# -eq 2 ] || __cdist_usage " " set -ue -object="$1"; shift +__cdist_object="$1"; shift __cdist_gencode_type="$1"; shift -if [ ! -d "$(__cdist_object_dir "$object")" ]; then - __cdist_exit_err "Object $object is missing." +if [ ! -d "$(__cdist_object_dir "$__cdist_object")" ]; then + __cdist_exit_err "Object $__cdist_object is missing." fi -code="$(__cdist_object_code "$object")-${__cdist_gencode_type}" +code="$(__cdist_object_code "$__cdist_object")-${__cdist_gencode_type}" -echo "Checking code-${__cdist_gencode_type} for $object ..." +echo "Checking code-${__cdist_gencode_type} for $__cdist_object ..." if [ -e "$code" ]; then if [ -f "$code" ]; then if [ -x "$code" ]; then - echo "Executing code-${__cdist_gencode_type} for $object ..." + echo "Executing code-${__cdist_gencode_type} for $__cdist_object ..." "$code" else __cdist_exit_err "$code exists, but is not executable." @@ -49,5 +49,5 @@ if [ -e "$code" ]; then __cdist_exit_err "$code exists, but is not a file." fi else - __cdist_exit_err "Missing code for ${object}." + __cdist_exit_err "Missing code for ${__cdist_object}." fi From 878f7d18ce295126ae4362d368e3a4bc37512fb2 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 21:49:06 +0200 Subject: [PATCH 1076/6109] move export of __cdist_out_object_dir to cdist-run-remote Signed-off-by: Steven Armstrong --- bin/cdist-object-code-run | 1 - bin/cdist-run-remote | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/cdist-object-code-run b/bin/cdist-object-code-run index d0722788..97cb58ac 100755 --- a/bin/cdist-object-code-run +++ b/bin/cdist-object-code-run @@ -36,6 +36,5 @@ cdist-code-run "$__cdist_object" "${__cdist_name_gencode_local}" \ # Code remote cdist-run-remote "$__cdist_target_host" \ - "export __cdist_out_object_dir=\"$__cdist_remote_out_object_dir\";" \ "cdist-code-run" "$__cdist_object" "${__cdist_name_gencode_remote}" \ || __cdist_exit_err "Remote code failed for $__cdist_object" diff --git a/bin/cdist-run-remote b/bin/cdist-run-remote index 93cf9062..4a4452a2 100755 --- a/bin/cdist-run-remote +++ b/bin/cdist-run-remote @@ -28,4 +28,6 @@ set -ue __cdist_target_host="$1"; shift ssh "${__cdist_remote_user}@${__cdist_target_host}" \ - "export PATH=\"${__cdist_remote_bin_dir}:\$PATH\";" "$@" + "export PATH=\"${__cdist_remote_bin_dir}:\$PATH\";" \ + "export __cdist_out_object_dir=\"$__cdist_remote_out_object_dir\";" \ + "$@" From 1cfdc6886f7aeaf1f241a4673b0485e04c4a4917 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 21:51:59 +0200 Subject: [PATCH 1077/6109] fail if a requested object is not defined Signed-off-by: Steven Armstrong --- bin/cdist-object-run | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/cdist-object-run b/bin/cdist-object-run index 450ba361..e3fc1629 100755 --- a/bin/cdist-object-run +++ b/bin/cdist-object-run @@ -33,6 +33,9 @@ set -eu __cdist_target_host="$1"; shift __cdist_object="$1"; shift +__cdist_object_dir="$(__cdist_object_dir "$__cdist_object")" +[ -d "$__cdist_object_dir" ] || __cdist_exit_err "Requested object is not defined: $__cdist_object" + # Export to non-core for use in manifest and gencode scripts export $__cdist_name_var_self=$__cdist_object From e7f7a883575ab7ece200771bda3368fdac34c83a Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 22:00:54 +0200 Subject: [PATCH 1078/6109] prefix error messages with Error: Signed-off-by: Steven Armstrong --- bin/cdist-config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-config b/bin/cdist-config index ae84ced4..9cd3a53c 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -160,7 +160,7 @@ __cdist_exec_fail_on_error() __cdist_exit_err() { - echo "$@" >&2 + echo "Error: $@" >&2 exit 1 } From 90448a479de47aa482e2975471e6edf4e51698bb Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 23:52:31 +0200 Subject: [PATCH 1079/6109] only generate man|html pages when necessery; allow the process to be interrupted Signed-off-by: Steven Armstrong --- build.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index a6a0e7b0..7fbb94cc 100755 --- a/build.sh +++ b/build.sh @@ -49,10 +49,24 @@ case "$1" in ;; manbuild) - for src in ${MAN1DSTDIR}/*.text ${MAN7DSTDIR}/*.text; do - echo "Compiling manpage and html for $src" - $A2XM "$src" - $A2XH "$src" + trap abort INT + abort() { + kill 0 + } + for section in 1 7; do + for src in ${MANDIR}/man${section}/*.text; do + manpage="${src%.text}.$section" + if [ ! -f "$manpage" -o "$manpage" -ot "$src" ]; then + echo "Compiling manpage for $src" + setsid $A2XM "$src" + a2x_pids="" + fi + htmlpage="${src%.text}.html" + if [ ! -f "$htmlpage" -o "$htmlpage" -ot "$src" ]; then + echo "Compiling html for $src" + $A2XH "$src" + fi + done done ;; From d85af22ce3a928246fee7f7579fe80d1bd90a958 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 Mar 2011 23:57:37 +0200 Subject: [PATCH 1080/6109] remove second author, asciidoc/docbook cant handle it Signed-off-by: Steven Armstrong --- doc/man/man1/cdist-object-code-run.text | 2 +- doc/man/man1/cdist-object-explorer-run.text | 2 +- doc/man/man1/cdist-object-gencode-run.text | 2 +- doc/man/man1/cdist-object-manifest-run.text | 1 - doc/man/man1/cdist-object-push.text | 2 +- doc/man/man1/cdist-object-run-all.text | 2 +- doc/man/man1/cdist-object-run.text | 2 +- doc/man/man7/cdist-stages.text | 5 ++--- 8 files changed, 8 insertions(+), 10 deletions(-) diff --git a/doc/man/man1/cdist-object-code-run.text b/doc/man/man1/cdist-object-code-run.text index c662d4c3..a055fc97 100644 --- a/doc/man/man1/cdist-object-code-run.text +++ b/doc/man/man1/cdist-object-code-run.text @@ -1,6 +1,6 @@ cdist-object-code-run(1) ======================== -Nico Schottelius , Steven Armstrong +Nico Schottelius NAME diff --git a/doc/man/man1/cdist-object-explorer-run.text b/doc/man/man1/cdist-object-explorer-run.text index a1c87cd6..a791681e 100644 --- a/doc/man/man1/cdist-object-explorer-run.text +++ b/doc/man/man1/cdist-object-explorer-run.text @@ -1,6 +1,6 @@ cdist-object-explorer-run(1) ============================ -Nico Schottelius , Steven Armstrong +Nico Schottelius NAME diff --git a/doc/man/man1/cdist-object-gencode-run.text b/doc/man/man1/cdist-object-gencode-run.text index fc93ebfd..be2d3448 100644 --- a/doc/man/man1/cdist-object-gencode-run.text +++ b/doc/man/man1/cdist-object-gencode-run.text @@ -1,6 +1,6 @@ cdist-object-gencode-run(1) =========================== -Nico Schottelius , Steven Armstrong +Nico Schottelius NAME diff --git a/doc/man/man1/cdist-object-manifest-run.text b/doc/man/man1/cdist-object-manifest-run.text index 76132425..a6f12f78 100644 --- a/doc/man/man1/cdist-object-manifest-run.text +++ b/doc/man/man1/cdist-object-manifest-run.text @@ -1,7 +1,6 @@ cdist-object-manifest-run(1) ============================ Nico Schottelius -Steven Armstrong NAME diff --git a/doc/man/man1/cdist-object-push.text b/doc/man/man1/cdist-object-push.text index 168f5190..5bff71cf 100644 --- a/doc/man/man1/cdist-object-push.text +++ b/doc/man/man1/cdist-object-push.text @@ -1,6 +1,6 @@ cdist-object-push(1) ==================== -Nico Schottelius , Steven Armstrong +Nico Schottelius NAME diff --git a/doc/man/man1/cdist-object-run-all.text b/doc/man/man1/cdist-object-run-all.text index 2b27347c..9e36b3d4 100644 --- a/doc/man/man1/cdist-object-run-all.text +++ b/doc/man/man1/cdist-object-run-all.text @@ -1,6 +1,6 @@ cdist-object-run-all(1) ======================= -Nico Schottelius , Steven Armstrong +Nico Schottelius NAME diff --git a/doc/man/man1/cdist-object-run.text b/doc/man/man1/cdist-object-run.text index b91e50ca..fca6db91 100644 --- a/doc/man/man1/cdist-object-run.text +++ b/doc/man/man1/cdist-object-run.text @@ -1,6 +1,6 @@ cdist-object-run(1) =================== -Nico Schottelius , Steven Armstrong +Nico Schottelius NAME diff --git a/doc/man/man7/cdist-stages.text b/doc/man/man7/cdist-stages.text index cbd541fe..e2eef3da 100644 --- a/doc/man/man7/cdist-stages.text +++ b/doc/man/man7/cdist-stages.text @@ -1,7 +1,6 @@ cdist-stages(7) =============== -Nico Schottelius , Steven Armstrong - +Nico Schottelius NAME ---- @@ -27,7 +26,7 @@ Related documentation: STAGE 1: TARGET INFORMATION RETRIEVAL --------------------------------------- +------------------------------------- In this stage information is collected about the target host using so called explorers. Every existing explorer is run on the target and the output of all explorers are copied back into the local cache. The results can be used by From 61b7b6867167a7d5a377f7ede31b0d92ed3bd47f Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 30 Mar 2011 22:46:49 +0200 Subject: [PATCH 1081/6109] split explorer/manifest and gencode runcode into to 2 steps Signed-off-by: Steven Armstrong --- bin/cdist-config | 6 +++ bin/cdist-deploy-to | 3 +- ...{cdist-object-run-all => cdist-object-all} | 8 ++-- bin/cdist-object-process | 48 +++++++++++++++++++ bin/cdist-object-run | 6 +-- 5 files changed, 62 insertions(+), 9 deletions(-) rename bin/{cdist-object-run-all => cdist-object-all} (88%) create mode 100755 bin/cdist-object-process diff --git a/bin/cdist-config b/bin/cdist-config index 9cd3a53c..393a963b 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -55,6 +55,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_manifest:=manifest} : ${__cdist_name_object:=object} : ${__cdist_name_object_finished:=done} +: ${__cdist_name_object_processed:=processed} : ${__cdist_name_object_id:=object_id} : ${__cdist_name_object_source:=source} : ${__cdist_name_objects_created:=.objects_created} @@ -194,6 +195,11 @@ __cdist_object_code() echo "$(__cdist_object_dir "$1")/${__cdist_name_code}" } +__cdist_object_processed() +{ + echo "$(__cdist_object_dir "$1")/${__cdist_name_object_processed}" +} + __cdist_object_finished() { echo "$(__cdist_object_dir "$1")/${__cdist_name_object_finished}" diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index e44ceff4..aeae3b6c 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -49,7 +49,8 @@ cdist-dir push "$__cdist_target_host" "${__cdist_abs_mydir}" "${__cdist_remote_b cdist-explorer-run-global "$__cdist_target_host" cdist-manifest-run-init "$__cdist_target_host" -cdist-object-run-all "$__cdist_target_host" +cdist-object-all "$__cdist_target_host" cdist-object-process +cdist-object-all "$__cdist_target_host" cdist-object-run cdist-cache "$__cdist_target_host" echo "cdist $__cdist_version: Successfully finished run on $__cdist_target_host" diff --git a/bin/cdist-object-run-all b/bin/cdist-object-all similarity index 88% rename from bin/cdist-object-run-all rename to bin/cdist-object-all index c646ab16..28df0613 100755 --- a/bin/cdist-object-run-all +++ b/bin/cdist-object-all @@ -19,14 +19,15 @@ # along with cdist. If not, see . # # -# Run cdist-object-run for each created object. +# Run the given command for each created object. # . cdist-config -[ $# -eq 1 ] || __cdist_usage "" +[ $# -eq 2 ] || __cdist_usage " " set -eu __cdist_target_host="$1"; shift +__cdist_command="$1"; shift __cdist_objects="$__cdist_tmp_dir/objects" @@ -47,7 +48,6 @@ while [ -f "$__cdist_objects_created" ]; do while [ $# -gt 0 ]; do __cdist_object="$1"; shift - # Process the object - cdist-object-run "$__cdist_target_host" "$__cdist_object" + $__cdist_command "$__cdist_target_host" "$__cdist_object" done done diff --git a/bin/cdist-object-process b/bin/cdist-object-process new file mode 100755 index 00000000..371f3737 --- /dev/null +++ b/bin/cdist-object-process @@ -0,0 +1,48 @@ +#!/bin/sh +# +# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 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 . +# +# +# For the given object: +# - run type explorers +# - run type manifest +# + +. cdist-config +[ $# -eq 2 ] || __cdist_usage " " +set -eu + +__cdist_target_host="$1"; shift +__cdist_object="$1"; shift +__cdist_object_dir="$(__cdist_object_dir "$__cdist_object")" +[ -d "$__cdist_object_dir" ] || __cdist_exit_err "Requested object is not defined: $__cdist_object" + +# Export to non-core for use in manifest and gencode scripts +export $__cdist_name_var_self=$__cdist_object + +__cdist_object_processed="$(__cdist_object_processed "$__cdist_object")" +if [ ! -f "$__cdist_object_processed" ]; then + echo + echo "Processing object $__cdist_object" + cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object" + cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object" + + # Mark this object as done + touch "$__cdist_object_processed" +fi diff --git a/bin/cdist-object-run b/bin/cdist-object-run index e3fc1629..b49c8c2d 100755 --- a/bin/cdist-object-run +++ b/bin/cdist-object-run @@ -39,8 +39,6 @@ __cdist_object_dir="$(__cdist_object_dir "$__cdist_object")" # Export to non-core for use in manifest and gencode scripts export $__cdist_name_var_self=$__cdist_object -__cdist_type="$(__cdist_type_from_object "$__cdist_object")" - __cdist_object_finished="$(__cdist_object_finished "$__cdist_object")" if [ ! -f "$__cdist_object_finished" ]; then @@ -62,8 +60,8 @@ if [ ! -f "$__cdist_object_finished" ]; then echo echo "Running object $__cdist_object" - cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object" - cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object" + #cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object" + #cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object" cdist-object-gencode-run "$__cdist_target_host" "$__cdist_object" cdist-object-push "$__cdist_target_host" "$__cdist_object" cdist-object-code-run "$__cdist_target_host" "$__cdist_object" From e7ff4c37ff555700398a61647dcc2d973845d0e3 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 31 Mar 2011 11:08:10 +0200 Subject: [PATCH 1082/6109] remove legacy commented code Signed-off-by: Steven Armstrong --- bin/cdist-object-process | 2 +- bin/cdist-object-run | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/cdist-object-process b/bin/cdist-object-process index 371f3737..d10840e8 100755 --- a/bin/cdist-object-process +++ b/bin/cdist-object-process @@ -43,6 +43,6 @@ if [ ! -f "$__cdist_object_processed" ]; then cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object" cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object" - # Mark this object as done + # Mark this object as processed touch "$__cdist_object_processed" fi diff --git a/bin/cdist-object-run b/bin/cdist-object-run index b49c8c2d..6c159ecf 100755 --- a/bin/cdist-object-run +++ b/bin/cdist-object-run @@ -60,8 +60,6 @@ if [ ! -f "$__cdist_object_finished" ]; then echo echo "Running object $__cdist_object" - #cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object" - #cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object" cdist-object-gencode-run "$__cdist_target_host" "$__cdist_object" cdist-object-push "$__cdist_target_host" "$__cdist_object" cdist-object-code-run "$__cdist_target_host" "$__cdist_object" From dd176d7a642745ac2f748f81928abc4be88a8cc9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 31 Mar 2011 15:40:08 +0200 Subject: [PATCH 1083/6109] construct cache dir path in cdist-config, not cdist-cache Signed-off-by: Nico Schottelius --- bin/cdist-cache | 12 ++++++------ bin/cdist-config | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/bin/cdist-cache b/bin/cdist-cache index 120b0df2..f9480162 100755 --- a/bin/cdist-cache +++ b/bin/cdist-cache @@ -27,11 +27,11 @@ set -u __cdist_target_host="$1"; shift +__cdist_ddir="$(__cdist_host_cache_dir "$__cdist_target_host")" -mkdir -p "${__cdist_local_base_cache_dir}" -__cdist_abs_cache_dir="$(cd "$__cdist_local_base_cache_dir" && pwd -P)" -__cdist_abs_ddir="$__cdist_abs_cache_dir/$__cdist_target_host" +# Create base to move into +mkdir -p "$(__cdist_cache_dir)" -echo "Saving cache to $__cdist_abs_ddir ..." -rm -rf "$__cdist_abs_ddir" -mv "$__cdist_local_base_dir" "$__cdist_abs_ddir" +echo "Saving cache to $__cdist_ddir ..." +rm -rf "$__cdist_ddir" +mv "$__cdist_local_base_dir" "$__cdist_ddir" diff --git a/bin/cdist-config b/bin/cdist-config index 393a963b..fac1b5c6 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -105,6 +105,8 @@ __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") # Local Base # : ${__cdist_local_base_dir:=$__cdist_tmp_dir} + +# Cache may *NOT* be below __cdist_local_base_dir! : ${__cdist_local_base_cache_dir:=$__cdist_abs_mydir/../$__cdist_name_cache} : ${__cdist_conf_dir:="$(cd "$__cdist_abs_mydir/../conf" && pwd -P)"} @@ -186,6 +188,19 @@ __cdist_init_deploy() ln -sf "$__cdist_conf_dir" "$__cdist_local_base_dir/$__cdist_name_conf_dir" } +################################################################################ +# Cache +# +__cdist_cache_dir() +{ + cd "${__cdist_local_base_cache_dir}" && pwd -P +} + +__cdist_host_cache_dir() +{ + echo "$(__cdist_cache_dir)/$1" +} + ################################################################################ # Object # From 7431802b0357c7a528a33d88f4ec94864e190912 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 31 Mar 2011 15:43:07 +0200 Subject: [PATCH 1084/6109] ++todo Signed-off-by: Nico Schottelius --- doc/dev/todo/TAKEME | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index 7e6a44d9..e85ddebd 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -6,6 +6,10 @@ Feel free to pick one! CORE ---- - Only build manpages if necessary for types as well as for the core! +- Add echo function: + __cdist_echo [level] [messages...] + level := syslog alike: + debug, notice, err TYPES ------ From 9955dc74c670d25270ada8bab2b280753143f33e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 31 Mar 2011 18:43:08 +0200 Subject: [PATCH 1085/6109] cleanups in bin/ Signed-off-by: Nico Schottelius --- bin/cdist-code-run | 1 - bin/cdist-deploy-to | 6 +++--- bin/cdist-dir | 5 +---- doc/dev/todo/TAKEME | 3 +++ 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/bin/cdist-code-run b/bin/cdist-code-run index db1a2378..54cb312f 100755 --- a/bin/cdist-code-run +++ b/bin/cdist-code-run @@ -36,7 +36,6 @@ code="$(__cdist_object_code "$__cdist_object")-${__cdist_gencode_type}" echo "Checking code-${__cdist_gencode_type} for $__cdist_object ..." - if [ -e "$code" ]; then if [ -f "$code" ]; then if [ -x "$code" ]; then diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index aeae3b6c..02fd34fa 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -18,7 +18,7 @@ # along with cdist. If not, see . # # -# Apply configuration to a host +# Deploy configuration to a host # . cdist-config @@ -45,8 +45,8 @@ __cdist_init_deploy "$__cdist_target_host" # Transfer cdist executables echo "Transferring cdist binaries to $__cdist_target_host ..." -cdist-dir push "$__cdist_target_host" "${__cdist_abs_mydir}" "${__cdist_remote_bin_dir}" - +cdist-dir push "$__cdist_target_host" \ + "${__cdist_abs_mydir}" "${__cdist_remote_bin_dir}" cdist-explorer-run-global "$__cdist_target_host" cdist-manifest-run-init "$__cdist_target_host" cdist-object-all "$__cdist_target_host" cdist-object-process diff --git a/bin/cdist-dir b/bin/cdist-dir index 72f4730b..0d30e14a 100755 --- a/bin/cdist-dir +++ b/bin/cdist-dir @@ -25,14 +25,11 @@ . cdist-config -if [ $# -ne 4 ]; then - __cdist_usage " " -fi +[ $# -eq 4 ] || __cdist_usage " " set -ue __cdist_action="$1"; shift __cdist_target_host="$1"; shift - __cdist_src_dir="$1"; shift __cdist_dst_dir="$1"; shift diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index e85ddebd..7807c9e0 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -10,6 +10,9 @@ CORE __cdist_echo [level] [messages...] level := syslog alike: debug, notice, err +- Think about moving cdist-type-build-emulation out of cdist-manifest-run to + cdist-deploy-to: more dependency of cdist-manifest-run, but a lot of + less cycles consumed TYPES ------ From b3d7cf31925767be55f6baf399326722eb3c2432 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 31 Mar 2011 19:35:26 +0200 Subject: [PATCH 1086/6109] more cleanups, __cdist prefixes Signed-off-by: Nico Schottelius --- bin/cdist-object-explorer-run | 7 +++---- bin/cdist-object-gencode-run | 10 +++++----- doc/dev/todo/TAKEME | 3 +++ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/bin/cdist-object-explorer-run b/bin/cdist-object-explorer-run index ff0668e5..4d8e2321 100755 --- a/bin/cdist-object-explorer-run +++ b/bin/cdist-object-explorer-run @@ -32,7 +32,6 @@ __cdist_object="$1"; shift __object_id="$(__cdist_object_id_from_object "$__cdist_object")" __cdist_type="$(__cdist_type_from_object "$__cdist_object")" - # Check if type of object has >= 1 explorer __cdist_has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" # Run the type explorers for the current object if any @@ -47,8 +46,8 @@ if [ "$__cdist_has_explorer" ]; then echo "Running explorers for $__cdist_object ..." # Copy object parameters - cdist-dir push "$__cdist_target_host" \ - "$(__cdist_object_parameter_dir "$__cdist_object")" \ + cdist-dir push "$__cdist_target_host" \ + "$(__cdist_object_parameter_dir "$__cdist_object")" \ "$(__cdist_remote_object_parameter_dir "$__cdist_object")" # Execute explorers @@ -62,7 +61,7 @@ if [ "$__cdist_has_explorer" ]; then "$(__cdist_remote_object_type_explorer_dir "$__cdist_object")" # Copy back results - cdist-dir pull "$__cdist_target_host" \ + cdist-dir pull "$__cdist_target_host" \ "$(__cdist_remote_object_type_explorer_dir "$__cdist_object")" \ "$(__cdist_object_type_explorer_dir "$__cdist_object")" fi diff --git a/bin/cdist-object-gencode-run b/bin/cdist-object-gencode-run index bfc65730..4d21fec9 100755 --- a/bin/cdist-object-gencode-run +++ b/bin/cdist-object-gencode-run @@ -29,15 +29,15 @@ set -eu __cdist_target_host="$1"; shift __cdist_object="$1"; shift -code_local="$(__cdist_object_code "$__cdist_object")-${__cdist_name_gencode_local}" -code_remote="$(__cdist_object_code "$__cdist_object")-${__cdist_name_gencode_remote}" +__cdist_code_local="$(__cdist_object_code "$__cdist_object")-${__cdist_name_gencode_local}" +__cdist_code_remote="$(__cdist_object_code "$__cdist_object")-${__cdist_name_gencode_remote}" echo "Generating local code for $__cdist_object ..." cdist-object-gencode "$__cdist_target_host" "$__cdist_object" \ - "${__cdist_name_gencode_local}" > "${code_local}" + "${__cdist_name_gencode_local}" > "${__cdist_code_local}" echo "Generating remote code for $__cdist_object ..." cdist-object-gencode "$__cdist_target_host" "$__cdist_object" \ - "${__cdist_name_gencode_remote}" > "${code_remote}" + "${__cdist_name_gencode_remote}" > "${__cdist_code_remote}" -chmod u+x "${code_local}" "${code_remote}" +chmod u+x "${__cdist_code_local}" "${__cdist_code_remote}" diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index 7807c9e0..4dc5b53b 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -14,6 +14,9 @@ CORE cdist-deploy-to: more dependency of cdist-manifest-run, but a lot of less cycles consumed +- cdist-object-gencode: remove code if output empty? + - also take care of that in cdist-code-run! + TYPES ------ Types to be written/extended: From 5359ed863cde6f920e0e59ec474e8a3ddbe9dfc6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 31 Mar 2011 20:21:08 +0200 Subject: [PATCH 1087/6109] +cleanups++ Signed-off-by: Nico Schottelius --- bin/cdist-object-manifest-run | 2 +- bin/cdist-object-process | 2 +- doc/dev/todo/TAKEME | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/cdist-object-manifest-run b/bin/cdist-object-manifest-run index 25378eb2..74a81469 100755 --- a/bin/cdist-object-manifest-run +++ b/bin/cdist-object-manifest-run @@ -46,12 +46,12 @@ if [ -f "$__cdist_manifest" ]; then export __cdist_manifest echo "Executing manifest ${__cdist_manifest} ..." - # Make variables available to non-core - FIXME: beatify export $__cdist_name_var_object="$__cdist_cur_object_dir" export $__cdist_name_var_object_id="$__cdist_object_id" export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest" + # Tell cdist-object-run-all that there may be new objects touch "$__cdist_objects_created" else diff --git a/bin/cdist-object-process b/bin/cdist-object-process index d10840e8..777d2c88 100755 --- a/bin/cdist-object-process +++ b/bin/cdist-object-process @@ -31,7 +31,7 @@ set -eu __cdist_target_host="$1"; shift __cdist_object="$1"; shift __cdist_object_dir="$(__cdist_object_dir "$__cdist_object")" -[ -d "$__cdist_object_dir" ] || __cdist_exit_err "Requested object is not defined: $__cdist_object" +[ -d "$__cdist_object_dir" ] || __cdist_exit_err "Object undefined: $__cdist_object" # Export to non-core for use in manifest and gencode scripts export $__cdist_name_var_self=$__cdist_object diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index 4dc5b53b..03c4f244 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -16,6 +16,7 @@ CORE - cdist-object-gencode: remove code if output empty? - also take care of that in cdist-code-run! +- cdist-object-process -> cdist-object-prepare TYPES ------ From 7d0877d8ceb4055e6267632689034fdc65a2a3af Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 31 Mar 2011 20:29:22 +0200 Subject: [PATCH 1088/6109] ++cleanups Signed-off-by: Nico Schottelius --- bin/cdist-object-manifest-run | 3 --- bin/cdist-object-run | 3 +-- bin/cdist-type-emulator | 1 - bin/cdist-type-template | 1 - doc/dev/todo/TAKEME | 9 ++++++++- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/bin/cdist-object-manifest-run b/bin/cdist-object-manifest-run index 74a81469..ce44cbbc 100755 --- a/bin/cdist-object-manifest-run +++ b/bin/cdist-object-manifest-run @@ -29,10 +29,7 @@ set -eu __cdist_target_host="$1"; shift __cdist_object="$1"; shift -# Full path to current object __cdist_cur_object_dir="$(__cdist_object_dir "$__cdist_object")" - -# Only the id __cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")" echo "Checking manifest for $__cdist_object ..." diff --git a/bin/cdist-object-run b/bin/cdist-object-run index 6c159ecf..667bf386 100755 --- a/bin/cdist-object-run +++ b/bin/cdist-object-run @@ -41,8 +41,7 @@ export $__cdist_name_var_self=$__cdist_object __cdist_object_finished="$(__cdist_object_finished "$__cdist_object")" if [ ! -f "$__cdist_object_finished" ]; then - - # Resolve dependencies if any + # Resolve dependencies, if any __cdist_object_require="$(__cdist_object_require "$__cdist_object")" if [ -f "$__cdist_object_require" ]; then echo diff --git a/bin/cdist-type-emulator b/bin/cdist-type-emulator index d0464533..2dcb47b3 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -53,7 +53,6 @@ if [ "$(echo $__cdist_object_id | grep "^/")" ]; then else __cdist_object_self="${__cdist_type}/${__cdist_object_id}" fi - ################################################################################ # Internal quirks # diff --git a/bin/cdist-type-template b/bin/cdist-type-template index cd34027c..dc853614 100755 --- a/bin/cdist-type-template +++ b/bin/cdist-type-template @@ -27,7 +27,6 @@ set -eu __cdist_type="$1"; shift - # Base mkdir -p "$(__cdist_type_dir "$__cdist_type")" diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index 03c4f244..e4edeabe 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -6,10 +6,11 @@ Feel free to pick one! CORE ---- - Only build manpages if necessary for types as well as for the core! -- Add echo function: +- Add echo function / beautify output __cdist_echo [level] [messages...] level := syslog alike: debug, notice, err + Include object_self prefixing, if given! - Think about moving cdist-type-build-emulation out of cdist-manifest-run to cdist-deploy-to: more dependency of cdist-manifest-run, but a lot of less cycles consumed @@ -17,6 +18,12 @@ CORE - cdist-object-gencode: remove code if output empty? - also take care of that in cdist-code-run! - cdist-object-process -> cdist-object-prepare +- Remove cdist-object-push, covers only one line and is used only once: + [20:22] kr:bin% grep cdist-object-push * + cdist-object-run: cdist-object-push "$__cdist_target_host" "$__cdist_object" + [20:22] kr:bin% + +- probably remove or improve cdist-type-template TYPES ------ From db1f1d0c2d406c18b2ef26212c261158fac26017 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 31 Mar 2011 20:46:58 +0200 Subject: [PATCH 1089/6109] remove leftovers from experimenting with process group control Signed-off-by: Steven Armstrong --- build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 7fbb94cc..ab62287e 100755 --- a/build.sh +++ b/build.sh @@ -58,8 +58,7 @@ case "$1" in manpage="${src%.text}.$section" if [ ! -f "$manpage" -o "$manpage" -ot "$src" ]; then echo "Compiling manpage for $src" - setsid $A2XM "$src" - a2x_pids="" + $A2XM "$src" fi htmlpage="${src%.text}.html" if [ ! -f "$htmlpage" -o "$htmlpage" -ot "$src" ]; then From c69feec5a0cfac25541aba7be7661c24f33e3ced Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Thu, 31 Mar 2011 20:49:02 +0200 Subject: [PATCH 1090/6109] -todo: conditional manpage building Signed-off-by: Steven Armstrong --- doc/dev/todo/TAKEME | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index e85ddebd..7f319790 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -5,7 +5,6 @@ Feel free to pick one! CORE ---- -- Only build manpages if necessary for types as well as for the core! - Add echo function: __cdist_echo [level] [messages...] level := syslog alike: From dbed2f1f83b0729ca57a57b3c37e269f658bef98 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 31 Mar 2011 21:44:44 +0200 Subject: [PATCH 1091/6109] 1.5 not yet released, correct changelog Signed-off-by: Nico Schottelius --- doc/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog b/doc/changelog index d3091fd7..5e0e2314 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,4 +1,4 @@ -1.5.0: 2011-03-29 +1.5.0: * Add basic cache functionality * New type __process * Restructured execution: (Steven Armstrong) From a648aa5333d331123f7e4da00bb562b710ea8d18 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 31 Mar 2011 22:25:56 +0200 Subject: [PATCH 1092/6109] fix cdist-object-all: ensure output directory exists Signed-off-by: Nico Schottelius --- bin/cdist-object-all | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/cdist-object-all b/bin/cdist-object-all index 28df0613..391c9cc7 100755 --- a/bin/cdist-object-all +++ b/bin/cdist-object-all @@ -31,6 +31,9 @@ __cdist_command="$1"; shift __cdist_objects="$__cdist_tmp_dir/objects" +# Ensure object dir exists, so marker can be created +mkdir -p "${__cdist_out_object_dir}" + # Loop until we do not create new objects anymore # which is equal to all objects have been run touch "$__cdist_objects_created" From 1a0ef5ac6328ec8014710ae676a246682ff3cdce Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 1 Apr 2011 09:56:44 +0200 Subject: [PATCH 1093/6109] update changelog Signed-off-by: Nico Schottelius --- doc/changelog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/changelog b/doc/changelog index 5e0e2314..2fcb8b46 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,9 +1,9 @@ -1.5.0: +1.5.0: 2011-04-01 * Add basic cache functionality * New type __process * Restructured execution: (Steven Armstrong) - Process each object as a whole, resolve dependencies and ensure - correct execution order. + Orientate processing on objects, resolve dependencies and + ensure correct execution order. * Documentation: Rewrite stages docs (Steven Armstrong) * Documentation: Remove legacy man pages (Steven Armstrong) From 815d8cc8cdb22a155062afdfc5e87f9bdf2d7830 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 1 Apr 2011 10:03:43 +0200 Subject: [PATCH 1094/6109] no incompat between 1.3 and 1.5 Signed-off-by: Nico Schottelius --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 3a4b2051..1fd28ffd 100644 --- a/README +++ b/README @@ -166,7 +166,7 @@ If you stay on a version branche (i.e. 1.0, 1.1., ...), nothing should break. The master branch on the other hand is the development branch and may not be working, break your setup or eat the tree in your garden. -### Upgrading from 1.3 to 1.4 +### Upgrading from 1.3 to 1.5 No incompatiblities. From 659bb1d1ac53d0bcab69fec07cd99a8d6180bb72 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 1 Apr 2011 10:47:09 +0200 Subject: [PATCH 1095/6109] create reference in man7 Signed-off-by: Nico Schottelius --- doc/man/cdist-reference.text.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/cdist-reference.text.sh b/doc/man/cdist-reference.text.sh index 48954b8e..6358db9c 100755 --- a/doc/man/cdist-reference.text.sh +++ b/doc/man/cdist-reference.text.sh @@ -28,7 +28,7 @@ __cdist_myname=${0##*/}; __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" filename="${__cdist_myname%.sh}" -dest="$__cdist_abs_mydir/$filename" +dest="$__cdist_abs_mydir/man7/$filename" cd "$__cdist_abs_mydir" From 8828a69d608505d7c52fd6d9f942dcbe259ede46 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 1 Apr 2011 11:04:31 +0200 Subject: [PATCH 1096/6109] unignore doc/man and update cdist-best-practice.text Signed-off-by: Nico Schottelius --- .gitignore | 4 +++- doc/man/man7/cdist-best-practice.text | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 68f829dc..89dba856 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,9 @@ # Ignore generated manpages doc/man/.marker -doc/man/man*/ +doc/man/man1/*.1 +doc/man/man7/*.7 +doc/man/man*/*.html # Ignore cache for version control cache/ diff --git a/doc/man/man7/cdist-best-practice.text b/doc/man/man7/cdist-best-practice.text index febe8f36..666dd414 100644 --- a/doc/man/man7/cdist-best-practice.text +++ b/doc/man/man7/cdist-best-practice.text @@ -60,6 +60,20 @@ machine-a % git clone git://your-git-server/cdist machine-b % git clone git://your-git-server/cdist -------------------------------------------------------------------------------- +SEPERATING WORK BY GROUPS +------------------------- +If you are working with different groups on one cdist-configuration, +you can delegate to other manifests and have the groups edit only +their manifests. You can use the following snippet in +**conf/manifests/init**: + +-------------------------------------------------------------------------------- +# Include other groups +sh -e "$__manifest/systems" + +sh -e "$__manifest/cbrg" +-------------------------------------------------------------------------------- + SEE ALSO -------- From 2d30dd6aad6617a0e7ecfba16cece7fdb85cddfa Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Fri, 1 Apr 2011 11:12:15 +0200 Subject: [PATCH 1097/6109] update to match new location of cdist-reference.text Signed-off-by: Steven Armstrong --- build.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index ab62287e..2df76539 100755 --- a/build.sh +++ b/build.sh @@ -57,12 +57,12 @@ case "$1" in for src in ${MANDIR}/man${section}/*.text; do manpage="${src%.text}.$section" if [ ! -f "$manpage" -o "$manpage" -ot "$src" ]; then - echo "Compiling manpage for $src" + echo "Compiling man page for $src" $A2XM "$src" fi htmlpage="${src%.text}.html" if [ ! -f "$htmlpage" -o "$htmlpage" -ot "$src" ]; then - echo "Compiling html for $src" + echo "Compiling html page for $src" $A2XH "$src" fi done @@ -99,7 +99,6 @@ case "$1" in ;; clean) - rm -f ${MANDIR}/cdist-reference.text find "${MANDIR}" -mindepth 2 -type l \ -o -name "*.1" \ -o -name "*.7" \ From afb1bf2373ce93b996681e0e5d5945848a894633 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 1 Apr 2011 11:22:35 +0200 Subject: [PATCH 1098/6109] ignore type manpages and docbook stuff Signed-off-by: Nico Schottelius --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 89dba856..57950f3b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,8 @@ doc/man/.marker doc/man/man1/*.1 doc/man/man7/*.7 doc/man/man*/*.html +doc/man/man7/cdist-type__*.text +doc/man/man*/docbook-xsl.css # Ignore cache for version control cache/ From 422bfd57d4664ab803461d4e45aaa70855f6c978 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 1 Apr 2011 11:30:55 +0200 Subject: [PATCH 1099/6109] document multiple configuration workflow Signed-off-by: Nico Schottelius --- doc/man/man7/cdist-best-practice.text | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/doc/man/man7/cdist-best-practice.text b/doc/man/man7/cdist-best-practice.text index 666dd414..aa499790 100644 --- a/doc/man/man7/cdist-best-practice.text +++ b/doc/man/man7/cdist-best-practice.text @@ -75,6 +75,37 @@ sh -e "$__manifest/cbrg" -------------------------------------------------------------------------------- +MAINTAINING MULTIPLE CONFIGURATIONS +----------------------------------- +When you need to manage multiple sites with cdist, like company_a, company_b +and private for instance, you can easily use git for this purpose. +Including a possible common base that is reused accross the different sites: + +-------------------------------------------------------------------------------- +# create branches +git branch company_a company_b common private + +# make stuff for company a +git checkout company_a +# work, commit, etc. + +# make stuff for company b +git checkout company_b +# work, commit, etc. + +# make stuff relevant for all sites +git checkout common +# work, commit, etc. + +# change to private and include latest common stuff +git checkout private +git merge common +-------------------------------------------------------------------------------- + +Have a look at git-remote(1) to adjust the remote configuration, which allows +you to push certain branches to certain remotes. + + SEE ALSO -------- - cdist(7) From 2c3d71a7e7e43a7af275a93c991dadc51fd95a15 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 1 Apr 2011 12:11:30 +0200 Subject: [PATCH 1100/6109] update todos Signed-off-by: Nico Schottelius --- doc/dev/todo/TAKEME | 4 ---- doc/dev/todo/niconext | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index 67afba55..7a8c4583 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -45,7 +45,3 @@ Cache: - export variable $__cache -> for current host -> add function to cdist-config, import from cdist-cache - - -remove --preseed from package_apt and add debconf_set_selection or similar - -> much cleaner! diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 29229d64..e7f2c72f 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1 +1,2 @@ -Release 1.5.0 correctly :-) +remove --preseed from package_apt and add debconf_set_selection or similar + -> much cleaner! From 48a96591d14910748744e256975c3fb55795f055 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 1 Apr 2011 12:11:50 +0200 Subject: [PATCH 1101/6109] add template for type __debconf_set_selections/ Signed-off-by: Nico Schottelius --- .../explorer/pkg_status | 31 ++++++++++ .../__debconf_set_selections/gencode-remote | 53 +++++++++++++++++ conf/type/__debconf_set_selections/man.text | 59 +++++++++++++++++++ .../parameter/optional | 3 + .../parameter/required | 1 + 5 files changed, 147 insertions(+) create mode 100755 conf/type/__debconf_set_selections/explorer/pkg_status create mode 100755 conf/type/__debconf_set_selections/gencode-remote create mode 100644 conf/type/__debconf_set_selections/man.text create mode 100644 conf/type/__debconf_set_selections/parameter/optional create mode 100644 conf/type/__debconf_set_selections/parameter/required diff --git a/conf/type/__debconf_set_selections/explorer/pkg_status b/conf/type/__debconf_set_selections/explorer/pkg_status new file mode 100755 index 00000000..86b94825 --- /dev/null +++ b/conf/type/__debconf_set_selections/explorer/pkg_status @@ -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 . +# +# +# Retrieve the status of a package - parsed dpkg output +# + +if [ -f "$__object/parameter/name" ]; then + name="$(cat "$__object/parameter/name")" +else + name="$__object_id" +fi + +# Except dpkg failing, if package is not known / installed +dpkg -s "$name" 2>/dev/null || exit 0 diff --git a/conf/type/__debconf_set_selections/gencode-remote b/conf/type/__debconf_set_selections/gencode-remote new file mode 100755 index 00000000..b2c7179d --- /dev/null +++ b/conf/type/__debconf_set_selections/gencode-remote @@ -0,0 +1,53 @@ +#!/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 . +# +# +# Manage packages on Debian and co. +# + +if [ -f "$__object/parameter/name" ]; then + name="$(cat "$__object/parameter/name")" +else + name="$__object_id" +fi + +# Check for preseeding and add preseed as here document +if [ -f "$__object/parameter/preseed" ]; then + echo "debconf-set-selections << __file-eof" + cat "$(cat "$__object/parameter/preseed")" + echo "__file-eof" +fi + +state="$(cat "$__object/parameter/state")" +is_installed="$(grep "^Status: install ok installed" "$__object/explorer/pkg_status" || true)" + +case "$state" in + installed) + # Install only if non-existent + if [ -z "$is_installed" ]; then + echo apt-get --quiet --yes install \"$name\" + fi + ;; + uninstalled) + # Remove only if existent + if [ -n "$is_installed" ]; then + echo apt-get --quiet --yes remove \"$name\" + fi + ;; +esac diff --git a/conf/type/__debconf_set_selections/man.text b/conf/type/__debconf_set_selections/man.text new file mode 100644 index 00000000..8b7476b4 --- /dev/null +++ b/conf/type/__debconf_set_selections/man.text @@ -0,0 +1,59 @@ +cdist-type__package_apt(7) +========================== +Nico Schottelius + + +NAME +---- +cdist-type__package_apt - Manage packages with apt-get + + +DESCRIPTION +----------- +apt-get is usually used on Debian and variants (like Ubuntu) to +manage packages. + + +REQUIRED PARAMETERS +------------------- +state:: + Either "installed" or "deinstalled". + + +OPTIONAL PARAMETERS +------------------- +name:: + If supplied, use the name and not the object id as the package name. + +preseed:: + If supplied, use the given filename as input for debconf-set-selections(1) + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Ensure zsh in installed +__package_apt zsh --state installed + +# In case you only want *a* webserver, but don't care which one +__package_apt webserver --state installed --name nginx + +# Install package with defaults (from a type) +__package_apt postfix --state installed --preseed "$__type/files/postfix-seed" + +# Remove obsolete package +__package_apt puppet --state deinstalled +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) +- cdist-type__package(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/__debconf_set_selections/parameter/optional b/conf/type/__debconf_set_selections/parameter/optional new file mode 100644 index 00000000..2dae648e --- /dev/null +++ b/conf/type/__debconf_set_selections/parameter/optional @@ -0,0 +1,3 @@ +name +preseed +version diff --git a/conf/type/__debconf_set_selections/parameter/required b/conf/type/__debconf_set_selections/parameter/required new file mode 100644 index 00000000..ff72b5c7 --- /dev/null +++ b/conf/type/__debconf_set_selections/parameter/required @@ -0,0 +1 @@ +state From 0db21eb308135cbc824675bce833a2924f6b6ead Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 1 Apr 2011 12:47:48 +0200 Subject: [PATCH 1102/6109] document, cleanup and theoretically finish __debconf_set_selections Signed-off-by: Nico Schottelius --- .../explorer/pkg_status | 31 ---------------- .../__debconf_set_selections/gencode-remote | 35 +++--------------- conf/type/__debconf_set_selections/man.text | 36 ++++++------------- .../parameter/optional | 3 -- .../parameter/required | 2 +- 5 files changed, 15 insertions(+), 92 deletions(-) delete mode 100755 conf/type/__debconf_set_selections/explorer/pkg_status delete mode 100644 conf/type/__debconf_set_selections/parameter/optional diff --git a/conf/type/__debconf_set_selections/explorer/pkg_status b/conf/type/__debconf_set_selections/explorer/pkg_status deleted file mode 100755 index 86b94825..00000000 --- a/conf/type/__debconf_set_selections/explorer/pkg_status +++ /dev/null @@ -1,31 +0,0 @@ -#!/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 . -# -# -# Retrieve the status of a package - parsed dpkg output -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -# Except dpkg failing, if package is not known / installed -dpkg -s "$name" 2>/dev/null || exit 0 diff --git a/conf/type/__debconf_set_selections/gencode-remote b/conf/type/__debconf_set_selections/gencode-remote index b2c7179d..156fc9f3 100755 --- a/conf/type/__debconf_set_selections/gencode-remote +++ b/conf/type/__debconf_set_selections/gencode-remote @@ -18,36 +18,9 @@ # along with cdist. If not, see . # # -# Manage packages on Debian and co. +# Setup selections # -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -# Check for preseeding and add preseed as here document -if [ -f "$__object/parameter/preseed" ]; then - echo "debconf-set-selections << __file-eof" - cat "$(cat "$__object/parameter/preseed")" - echo "__file-eof" -fi - -state="$(cat "$__object/parameter/state")" -is_installed="$(grep "^Status: install ok installed" "$__object/explorer/pkg_status" || true)" - -case "$state" in - installed) - # Install only if non-existent - if [ -z "$is_installed" ]; then - echo apt-get --quiet --yes install \"$name\" - fi - ;; - uninstalled) - # Remove only if existent - if [ -n "$is_installed" ]; then - echo apt-get --quiet --yes remove \"$name\" - fi - ;; -esac +echo "debconf-set-selections << __file-eof" +cat "$__object/parameter/file" +echo "__file-eof" diff --git a/conf/type/__debconf_set_selections/man.text b/conf/type/__debconf_set_selections/man.text index 8b7476b4..b6b2ad18 100644 --- a/conf/type/__debconf_set_selections/man.text +++ b/conf/type/__debconf_set_selections/man.text @@ -1,31 +1,22 @@ -cdist-type__package_apt(7) -========================== +cdist-type__debconf_set_selections(7) +===================================== Nico Schottelius NAME ---- -cdist-type__package_apt - Manage packages with apt-get +cdist-type__debconf_set_selections - Setup debconf selections DESCRIPTION ----------- -apt-get is usually used on Debian and variants (like Ubuntu) to -manage packages. +On Debian and alike systems debconf-set-selections(1) can be used +to setup configuration parameters. REQUIRED PARAMETERS ------------------- -state:: - Either "installed" or "deinstalled". - - -OPTIONAL PARAMETERS -------------------- -name:: - If supplied, use the name and not the object id as the package name. - -preseed:: +file:: If supplied, use the given filename as input for debconf-set-selections(1) @@ -33,24 +24,17 @@ EXAMPLES -------- -------------------------------------------------------------------------------- -# Ensure zsh in installed -__package_apt zsh --state installed +# Setup configuration for nslcd +__debconf_set_selections nslcd --file /path/to/file -# In case you only want *a* webserver, but don't care which one -__package_apt webserver --state installed --name nginx - -# Install package with defaults (from a type) -__package_apt postfix --state installed --preseed "$__type/files/postfix-seed" - -# Remove obsolete package -__package_apt puppet --state deinstalled +# Setup configuration for nslcd from another type +__debconf_set_selections nslcd --file "$__type/files/preseed/nslcd" -------------------------------------------------------------------------------- SEE ALSO -------- - cdist-type(7) -- cdist-type__package(7) COPYING diff --git a/conf/type/__debconf_set_selections/parameter/optional b/conf/type/__debconf_set_selections/parameter/optional deleted file mode 100644 index 2dae648e..00000000 --- a/conf/type/__debconf_set_selections/parameter/optional +++ /dev/null @@ -1,3 +0,0 @@ -name -preseed -version diff --git a/conf/type/__debconf_set_selections/parameter/required b/conf/type/__debconf_set_selections/parameter/required index ff72b5c7..f73f3093 100644 --- a/conf/type/__debconf_set_selections/parameter/required +++ b/conf/type/__debconf_set_selections/parameter/required @@ -1 +1 @@ -state +file From e21283c579ef4e5da7d590a2b0338668cd2f16fc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 1 Apr 2011 13:08:47 +0200 Subject: [PATCH 1103/6109] remove preseeding support from __package_apt Signed-off-by: Nico Schottelius --- conf/type/__package_apt/man.text | 6 ------ conf/type/__package_apt/parameter/optional | 1 - 2 files changed, 7 deletions(-) diff --git a/conf/type/__package_apt/man.text b/conf/type/__package_apt/man.text index 8b7476b4..0780124d 100644 --- a/conf/type/__package_apt/man.text +++ b/conf/type/__package_apt/man.text @@ -25,9 +25,6 @@ OPTIONAL PARAMETERS name:: If supplied, use the name and not the object id as the package name. -preseed:: - If supplied, use the given filename as input for debconf-set-selections(1) - EXAMPLES -------- @@ -39,9 +36,6 @@ __package_apt zsh --state installed # In case you only want *a* webserver, but don't care which one __package_apt webserver --state installed --name nginx -# Install package with defaults (from a type) -__package_apt postfix --state installed --preseed "$__type/files/postfix-seed" - # Remove obsolete package __package_apt puppet --state deinstalled -------------------------------------------------------------------------------- diff --git a/conf/type/__package_apt/parameter/optional b/conf/type/__package_apt/parameter/optional index 2dae648e..a52167d3 100644 --- a/conf/type/__package_apt/parameter/optional +++ b/conf/type/__package_apt/parameter/optional @@ -1,3 +1,2 @@ name -preseed version From 1b87fc7c3f0a6d3e6135d59f8a0452b7cdf3f907 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 1 Apr 2011 13:10:41 +0200 Subject: [PATCH 1104/6109] changes for 1.6.0 Signed-off-by: Nico Schottelius --- doc/changelog | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/changelog b/doc/changelog index 2fcb8b46..1b9ede30 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,3 +1,7 @@ +1.6.0: + * Removed --preseed support from __package_apt + * New type __debconf_set_selections which allows to preseed debian packages + 1.5.0: 2011-04-01 * Add basic cache functionality * New type __process From cee51f00880919638eab04c40dc988c3adf9f81f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 1 Apr 2011 13:12:00 +0200 Subject: [PATCH 1105/6109] make __package_apt use DEBIAN_FRONTEND=noninteractive Signed-off-by: Nico Schottelius --- conf/type/__package_apt/gencode-remote | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/conf/type/__package_apt/gencode-remote b/conf/type/__package_apt/gencode-remote index b2c7179d..e38653e9 100755 --- a/conf/type/__package_apt/gencode-remote +++ b/conf/type/__package_apt/gencode-remote @@ -37,17 +37,19 @@ fi state="$(cat "$__object/parameter/state")" is_installed="$(grep "^Status: install ok installed" "$__object/explorer/pkg_status" || true)" +aptget="DEBIAN_FRONTEND=noninteractive apt-get --quiet --yes" + case "$state" in installed) # Install only if non-existent if [ -z "$is_installed" ]; then - echo apt-get --quiet --yes install \"$name\" + echo $aptget install \"$name\" fi ;; uninstalled) # Remove only if existent if [ -n "$is_installed" ]; then - echo apt-get --quiet --yes remove \"$name\" + echo $aptget remove \"$name\" fi ;; esac From e700437b01f7bebb6496aba9d55b6a0894319ccd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 01:20:24 +0200 Subject: [PATCH 1106/6109] also detect fedora Signed-off-by: Nico Schottelius --- conf/explorer/os | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/conf/explorer/os b/conf/explorer/os index f7481193..b636d980 100755 --- a/conf/explorer/os +++ b/conf/explorer/os @@ -43,6 +43,12 @@ if [ -f /etc/gentoo-release ]; then exit 0 fi +# Fedora is also Redhat, thus return before redhat! +if grep -q ^Fedora /etc/redhat-release 2>/dev/null; then + echo fedora + exit 0 +fi + if [ -f /etc/redhat-release ]; then echo redhat exit 0 From bcfba18e6f15a13bbb7533d9106ad7e65aa0e24d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 01:22:09 +0200 Subject: [PATCH 1107/6109] more upcoming changes Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index 1b9ede30..c54a5358 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,6 +1,7 @@ 1.6.0: * Removed --preseed support from __package_apt * New type __debconf_set_selections which allows to preseed debian packages + * Explorer/os: Support Fedora 1.5.0: 2011-04-01 * Add basic cache functionality From afc16667f40945b42a493d6610e49495fc13e330 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 01:25:57 +0200 Subject: [PATCH 1108/6109] more production machines Signed-off-by: Nico Schottelius --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 1fd28ffd..18352d5a 100644 --- a/README +++ b/README @@ -230,7 +230,7 @@ Yes, I'm actually eating my own dogfood and currently managing * [xfce](http://www.xfce.org/) (lightweight desktop environment) * [slim](http://slim.berlios.de/) (graphical login manager for X11) -with cdist on a total of **9** production machines of the +with cdist on a total of **20** production machines of the [Systems Group](http://www.systems.ethz.ch) at the [ETH Zurich](http://www.ethz.ch) as well at home. From c617dc0e8fc9e1e1949c40b2eb167957da969991 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 01:49:52 +0200 Subject: [PATCH 1109/6109] cleanup readme Signed-off-by: Nico Schottelius --- README | 65 +++++++++++++++++++--------------------------------------- 1 file changed, 21 insertions(+), 44 deletions(-) diff --git a/README b/README index 18352d5a..bb370b35 100644 --- a/README +++ b/README @@ -24,57 +24,34 @@ other configuration management systems like [cfengine](http://www.cfengine.org/), [bcfg2](http://trac.mcs.anl.gov/projects/bcfg2), [chef](http://wiki.opscode.com/display/chef/) -and [puppet](http://www.puppetlabs.com/), but -it ticks differently: +and [puppet](http://www.puppetlabs.com/), but it ticks differently. +Here are some features that makes it unique: - * cdist sticks completly to the KISS (keep it simple and stupid) paradigma - * cdist's core is very small (< 1k lines of code) - * There is only one type to extend cdist called ***type***. - * One main development target: ***It must be incredible easy to add new types.*** - * cdist is UNIX - * It reuses existing tools like cat, find, mv, ... - * cdist's documentation is bundled as manpages - * cdist is written in POSIX shell - * No special requirements like high level interpreters needed on server or target +[[!table data=""" +Simplicity | There is only one type to extend cdist called ***type*** +Design | Type and core cleanly seperated +Design | cdist sticks completly to the KISS (keep it simple and stupid) paradigma +Design | Meaningful error messages - do not lose time debugging error messages +Design | Consistency in behaviour, naming and documentation +Design | No surprise factor: Only do what is obviously clear, no magic +Design | Define target state, do not focus on methods or scripts +Small core | cdist's core is very small - less code, less bugs +Fast development | Focus on straightforwardness of type creation is a main development objective +Requirements, Scalability | No central server needed, cdist operates in push mode and can be run from any computer +Requirements, Scalability, Upgrade | cdist only needs to be updated on the master, not on the target hosts +Requirements | cdist requires only SSH and a shell on the target +Requirements | +UNIX | Reuse of existing tools like cat, find, mv, ... +UNIX, familar environment, documentation | Is available as manpages and HTML +UNIX, simplicity, familar environment | cdist is written in POSIX shell +UNIX, simplicity, familar environment | cdist is configured in POSIX shell +"""]] ### Documentation The cdist documentation is included as manpages in the distribution. You can [browse the documentation for the latest version online](man) as well. -### Architecture - - * Push mode (server pushes configuration) - * User defines configuration in shell scripts (called ***manifests***) - * Generates internal configuration (cconfig style) - * Uses ***types*** to generate code be executed on the target - * And finally executes the code on the target / applies the configuration - -### Features - - * Elegant code and clean design - * Type and core cleanly seperated - * Small codebase in core - * Good documentation (man pages) - * Consistency in behaviour, naming and documentation - * Meaningful error messages - * Either standard error messages from tools or added description for clearification - * The no surprise factor - * No magic guessing of what the user wants - * Simple and well-known DSL - * Posix shell - * Easy integration into bare metal installations - * requires only ssh + sh - * Easy upgrade - * ***There is no need to update cdist on target hosts!*** - * cdist only needs to be updated on the master server(s) - * Very easy to extend - * Can be done via types, which can be stacked on top of others - * Reuse of existing functionality - * sh, ssh, find, rm, mv, ... - * Very easy to debug - * Just add set -x in the scripts - ### OS support cdist was tested or is know to run on at least From 77766d29a21da7b7ba0e4a1e00fe1cd42578698f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 01:50:45 +0200 Subject: [PATCH 1110/6109] +header Signed-off-by: Nico Schottelius --- README | 1 + 1 file changed, 1 insertion(+) diff --git a/README b/README index bb370b35..26cd1ef2 100644 --- a/README +++ b/README @@ -28,6 +28,7 @@ and [puppet](http://www.puppetlabs.com/), but it ticks differently. Here are some features that makes it unique: [[!table data=""" +Keywords | Description Simplicity | There is only one type to extend cdist called ***type*** Design | Type and core cleanly seperated Design | cdist sticks completly to the KISS (keep it simple and stupid) paradigma From e19c079f24113f46cd006e37e47730ccf014c948 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 02:00:20 +0200 Subject: [PATCH 1111/6109] add template for new type __package_yum Signed-off-by: Nico Schottelius --- conf/type/__package_yum/explorer/pkg_version | 30 +++++++++++ conf/type/__package_yum/gencode-remote | 52 +++++++++++++++++++ conf/type/__package_yum/man.text | 53 ++++++++++++++++++++ conf/type/__package_yum/parameter/optional | 1 + conf/type/__package_yum/parameter/required | 1 + 5 files changed, 137 insertions(+) create mode 100755 conf/type/__package_yum/explorer/pkg_version create mode 100755 conf/type/__package_yum/gencode-remote create mode 100644 conf/type/__package_yum/man.text create mode 100644 conf/type/__package_yum/parameter/optional create mode 100644 conf/type/__package_yum/parameter/required diff --git a/conf/type/__package_yum/explorer/pkg_version b/conf/type/__package_yum/explorer/pkg_version new file mode 100755 index 00000000..4f612423 --- /dev/null +++ b/conf/type/__package_yum/explorer/pkg_version @@ -0,0 +1,30 @@ +#!/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 . +# +# +# Retrieve the status of a package - parsed dpkg output +# + +if [ -f "$__object/parameter/name" ]; then + name="$(cat "$__object/parameter/name")" +else + name="$__object_id" +fi + +pacman -Q "$name" 2>/dev/null | awk '{ print $2 }' diff --git a/conf/type/__package_yum/gencode-remote b/conf/type/__package_yum/gencode-remote new file mode 100755 index 00000000..536b7708 --- /dev/null +++ b/conf/type/__package_yum/gencode-remote @@ -0,0 +1,52 @@ +#!/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 . +# +# +# Manage packages with Pacman (mostly archlinux) +# + +# Debug +# exec >&2 +# set -x + +pacopts="--noconfirm --noprogressbar" + +if [ -f "$__object/parameter/name" ]; then + name="$__object/parameter/name" +else + name="$__object_id" +fi + +state="$(cat "$__object/parameter/state")" +pkg_version="$(cat "$__object/explorer/pkg_version")" + +case "$state" in + installed) + + # Empty? Not installed. + if [ -z "$pkg_version" ]; then + echo pacman "$pacopts" -S \"$name\" + fi + ;; + uninstalled) + if [ "$pkg_version" ]; then + echo pacman "$pacopts" -R \"$name\" + fi + ;; +esac diff --git a/conf/type/__package_yum/man.text b/conf/type/__package_yum/man.text new file mode 100644 index 00000000..35a7e44c --- /dev/null +++ b/conf/type/__package_yum/man.text @@ -0,0 +1,53 @@ +cdist-type__package_pacman(7) +============================= +Nico Schottelius + + +NAME +---- +cdist-type__package_pacman - Manage packages with pacman + + +DESCRIPTION +----------- +Pacman is usually used on the Archlinux distribution to manage +packages. + + +REQUIRED PARAMETERS +------------------- +state:: + Either "installed" or "deinstalled". + + +OPTIONAL PARAMETERS +------------------- +name:: + If supplied, use the name and not the object id as the package name. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Ensure zsh in installed +__package_pacman zsh --state installed + +# If you don't want to follow pythonX packages, but always use python +__package_pacman python --state installed --name python2 + +# Remove obsolete package +__package_pacman puppet --state deinstalled +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) +- cdist-type__package(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/__package_yum/parameter/optional b/conf/type/__package_yum/parameter/optional new file mode 100644 index 00000000..f121bdbf --- /dev/null +++ b/conf/type/__package_yum/parameter/optional @@ -0,0 +1 @@ +name diff --git a/conf/type/__package_yum/parameter/required b/conf/type/__package_yum/parameter/required new file mode 100644 index 00000000..ff72b5c7 --- /dev/null +++ b/conf/type/__package_yum/parameter/required @@ -0,0 +1 @@ +state From d9e2493eb996e164a27826779477ce93a84cdda3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 02:13:44 +0200 Subject: [PATCH 1112/6109] add fedora support to __package Signed-off-by: Nico Schottelius --- conf/type/__package/manifest | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/type/__package/manifest b/conf/type/__package/manifest index d8b55814..f41cceac 100755 --- a/conf/type/__package/manifest +++ b/conf/type/__package/manifest @@ -33,6 +33,7 @@ else archlinux) type="pacman" ;; debian|ubuntu) type="apt" ;; gentoo) type="emerge" ;; + fedora) type="yum" ;; *) echo "Don't know how to manage packages on: $os" >&2 exit 1 From 981df12e9a341c38b279726c62832f1150a2e1f0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 02:15:26 +0200 Subject: [PATCH 1113/6109] document changes Signed-off-by: Nico Schottelius --- doc/changelog | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/changelog b/doc/changelog index c54a5358..fe22e838 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,7 +1,9 @@ 1.6.0: + * New Type __package_yum + * New type __debconf_set_selections + * Type __package gained Fedora support * Removed --preseed support from __package_apt - * New type __debconf_set_selections which allows to preseed debian packages - * Explorer/os: Support Fedora + * explorer/os: gained Fedora support 1.5.0: 2011-04-01 * Add basic cache functionality From bcc7d0e795360489b61568f6ff108f8799ea2488 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 02:19:30 +0200 Subject: [PATCH 1114/6109] cleanup of gencode-remote Signed-off-by: Nico Schottelius --- conf/type/__package_yum/gencode-remote | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/conf/type/__package_yum/gencode-remote b/conf/type/__package_yum/gencode-remote index 536b7708..e20e0001 100755 --- a/conf/type/__package_yum/gencode-remote +++ b/conf/type/__package_yum/gencode-remote @@ -18,15 +18,9 @@ # along with cdist. If not, see . # # -# Manage packages with Pacman (mostly archlinux) +# Manage packages with yum (mostly Fedora) # -# Debug -# exec >&2 -# set -x - -pacopts="--noconfirm --noprogressbar" - if [ -f "$__object/parameter/name" ]; then name="$__object/parameter/name" else @@ -34,19 +28,17 @@ else fi state="$(cat "$__object/parameter/state")" -pkg_version="$(cat "$__object/explorer/pkg_version")" +opts="--assumeyes --quiet" case "$state" in installed) - - # Empty? Not installed. - if [ -z "$pkg_version" ]; then - echo pacman "$pacopts" -S \"$name\" + if grep -q "is not installed\$" "$__object/explorer/pkg_version"; then + echo yum $opts install \"$name\" fi ;; uninstalled) - if [ "$pkg_version" ]; then - echo pacman "$pacopts" -R \"$name\" + if ! grep -q "is not installed\$" "$__object/explorer/pkg_version"; then + echo yum $opts remove \"$name\" fi ;; esac From a778dee9fcdbc4d97f15b6a1832e3e1fe97b4ed1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 02:19:47 +0200 Subject: [PATCH 1115/6109] use rpm -q to get status Signed-off-by: Nico Schottelius --- conf/type/__package_yum/explorer/pkg_version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__package_yum/explorer/pkg_version b/conf/type/__package_yum/explorer/pkg_version index 4f612423..66f76f12 100755 --- a/conf/type/__package_yum/explorer/pkg_version +++ b/conf/type/__package_yum/explorer/pkg_version @@ -27,4 +27,4 @@ else name="$__object_id" fi -pacman -Q "$name" 2>/dev/null | awk '{ print $2 }' +rpm -q "$name" 2>/dev/null || true From 740d279753e09c9178cdcc43f4302a86a1d331ba Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 02:20:19 +0200 Subject: [PATCH 1116/6109] add fedora to readme Signed-off-by: Nico Schottelius --- README | 1 + 1 file changed, 1 insertion(+) diff --git a/README b/README index 26cd1ef2..e8f6e0bf 100644 --- a/README +++ b/README @@ -59,6 +59,7 @@ cdist was tested or is know to run on at least * [Archlinux](http://www.archlinux.org/) * [Debian](http://www.debian.org/) + * [Fedora](http://fedoraproject.org/) * [Gentoo](http://www.gentoo.org/) * [Mac OS X](http://www.apple.com/macosx/) * [OpenBSD](http://www.openbsd.org) From c532a2ccd3d19ebd36466be9231c68be7a68bbb7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 02:22:08 +0200 Subject: [PATCH 1117/6109] remove one Error of Error: Error: /home/users/nico/oeffentlich/rechner/projekte/cdist-used/conf/type/__nico_desktop/manifest exited non-zero. 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 fac1b5c6..026d8419 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -158,7 +158,7 @@ __cdist_debug_echo() __cdist_exec_fail_on_error() { sh -e "$@" - [ "$?" -eq 0 ] || __cdist_exit_err "Error: $1 exited non-zero." + [ "$?" -eq 0 ] || __cdist_exit_err "$1 exited non-zero." } __cdist_exit_err() From 13f4140b3df9e6204451d444bdb6f504fd81771b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 02:26:42 +0200 Subject: [PATCH 1118/6109] update manpage for __package_yum Signed-off-by: Nico Schottelius --- conf/type/__package_yum/man.text | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/conf/type/__package_yum/man.text b/conf/type/__package_yum/man.text index 35a7e44c..262068c6 100644 --- a/conf/type/__package_yum/man.text +++ b/conf/type/__package_yum/man.text @@ -1,17 +1,16 @@ -cdist-type__package_pacman(7) -============================= +cdist-type__package_yum(7) +========================== Nico Schottelius NAME ---- -cdist-type__package_pacman - Manage packages with pacman +cdist-type__package_yum - Manage packages with yum DESCRIPTION ----------- -Pacman is usually used on the Archlinux distribution to manage -packages. +Yum is usually used on the Fedora distribution to manage packages. REQUIRED PARAMETERS @@ -31,13 +30,13 @@ EXAMPLES -------------------------------------------------------------------------------- # Ensure zsh in installed -__package_pacman zsh --state installed +__package_yum zsh --state installed # If you don't want to follow pythonX packages, but always use python -__package_pacman python --state installed --name python2 +__package_yum python --state installed --name python2 # Remove obsolete package -__package_pacman puppet --state deinstalled +__package_yum puppet --state deinstalled -------------------------------------------------------------------------------- From 44b11b99198ecdef188fb6819a9ff3a3de7b9d8b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 02:34:35 +0200 Subject: [PATCH 1119/6109] yum is funny Signed-off-by: Nico Schottelius --- doc/dev/logs/2011-04-02.yum | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 doc/dev/logs/2011-04-02.yum diff --git a/doc/dev/logs/2011-04-02.yum b/doc/dev/logs/2011-04-02.yum new file mode 100644 index 00000000..dd3687c8 --- /dev/null +++ b/doc/dev/logs/2011-04-02.yum @@ -0,0 +1,9 @@ +Fun with yum: + +[root@brett ~]# yum --assumeyes --quiet install "vim" +Package 2:vim-enhanced-7.3.056-1.fc14.x86_64 already installed and latest version +[root@brett ~]# rpm -q vim +package vim is not installed +[root@brett ~]# + +(Me || yum) == dumb? From aedbc263d7325381a8bed03e24c31dbcf810e7d0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 02:49:57 +0200 Subject: [PATCH 1120/6109] need to use --whatprovides This ensure we also check for other packages which are used instead of the requested one, which does not work with rpm -q: [root@brett ~]# rpm -q vim package vim is not installed [root@brett ~]# yum --assumeyes --quiet install "vim" Package 2:vim-enhanced-7.3.056-1.fc14.x86_64 already installed and latest version [root@brett ~]# rpm -q --whatprovides vim vim-enhanced-7.3.056-1.fc14.x86_64 Signed-off-by: Nico Schottelius --- conf/type/__package_yum/explorer/pkg_version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__package_yum/explorer/pkg_version b/conf/type/__package_yum/explorer/pkg_version index 66f76f12..0e078f68 100755 --- a/conf/type/__package_yum/explorer/pkg_version +++ b/conf/type/__package_yum/explorer/pkg_version @@ -27,4 +27,4 @@ else name="$__object_id" fi -rpm -q "$name" 2>/dev/null || true +rpm -q --whatprovides "$name" 2>/dev/null || true From 0b7024a2cc3449e2610fdd63dd57731ad1ebded5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 02:53:07 +0200 Subject: [PATCH 1121/6109] adjust grep string Signed-off-by: Nico Schottelius --- conf/type/__package_yum/gencode-remote | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/conf/type/__package_yum/gencode-remote b/conf/type/__package_yum/gencode-remote index e20e0001..7d0d60b8 100755 --- a/conf/type/__package_yum/gencode-remote +++ b/conf/type/__package_yum/gencode-remote @@ -29,15 +29,20 @@ fi state="$(cat "$__object/parameter/state")" +cat "$__object/explorer/pkg_version" + opts="--assumeyes --quiet" + +not_installed="^no package provides" + case "$state" in installed) - if grep -q "is not installed\$" "$__object/explorer/pkg_version"; then + if grep -q "$not_installed" "$__object/explorer/pkg_version"; then echo yum $opts install \"$name\" fi ;; uninstalled) - if ! grep -q "is not installed\$" "$__object/explorer/pkg_version"; then + if ! grep -q "$not_installed" "$__object/explorer/pkg_version"; then echo yum $opts remove \"$name\" fi ;; From 4ab1fdceff36c983f07960d2a151560d668ecb60 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 02:57:02 +0200 Subject: [PATCH 1122/6109] remove evil debug Signed-off-by: Nico Schottelius --- conf/type/__package_yum/gencode-remote | 2 -- 1 file changed, 2 deletions(-) diff --git a/conf/type/__package_yum/gencode-remote b/conf/type/__package_yum/gencode-remote index 7d0d60b8..033298b1 100755 --- a/conf/type/__package_yum/gencode-remote +++ b/conf/type/__package_yum/gencode-remote @@ -29,8 +29,6 @@ fi state="$(cat "$__object/parameter/state")" -cat "$__object/explorer/pkg_version" - opts="--assumeyes --quiet" not_installed="^no package provides" From 5f0ecb0831157bf0b5112afc6c4344adfc05cc3a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 03:12:31 +0200 Subject: [PATCH 1123/6109] yum confuses me, document it, so others are saved Signed-off-by: Nico Schottelius --- conf/type/__package_yum/man.text | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conf/type/__package_yum/man.text b/conf/type/__package_yum/man.text index 262068c6..b2f57606 100644 --- a/conf/type/__package_yum/man.text +++ b/conf/type/__package_yum/man.text @@ -11,6 +11,8 @@ cdist-type__package_yum - Manage packages with yum DESCRIPTION ----------- Yum is usually used on the Fedora distribution to manage packages. +If you specify an unknown package, yum will display the +slightly confusing error message "Error: Nothing to do". REQUIRED PARAMETERS From 762fa52638c2bd6c080396121377ab3eec005ac4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 03:30:35 +0200 Subject: [PATCH 1124/6109] fixup cdist-reference: match only on .7 now, otherwise .html and .text is shown in manpage Signed-off-by: Nico Schottelius --- doc/man/cdist-reference.text.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/cdist-reference.text.sh b/doc/man/cdist-reference.text.sh index 6358db9c..936e0bba 100755 --- a/doc/man/cdist-reference.text.sh +++ b/doc/man/cdist-reference.text.sh @@ -187,7 +187,7 @@ SEE ALSO -------- - cdist(7) eof -for type in man7/cdist-type__*; do +for type in man7/cdist-type__*.7; do name_1="${type#man7/}" name_2="${name_1%.7}" From 21aacd44b44c70e319c2c4991f9ee998666dfa92 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 03:36:41 +0200 Subject: [PATCH 1125/6109] remove double information from reference Signed-off-by: Nico Schottelius --- doc/man/cdist-reference.text.sh | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/doc/man/cdist-reference.text.sh b/doc/man/cdist-reference.text.sh index 936e0bba..8fb24362 100755 --- a/doc/man/cdist-reference.text.sh +++ b/doc/man/cdist-reference.text.sh @@ -135,19 +135,8 @@ tmp_dir:: TYPES ----- -The following types are available: - -eof -for type in man7/cdist-type__*; do - name_1="${type#man7/cdist-type}" - name_2="${name_1%.7}" - - name="$name_2" - echo "- $name" -done - -cat << eof - +The available types are listed in the SEE ALSO section +and are referenced as cdist-type__TYPENAME. VARIABLES --------- From 18e433dd859644a8d69c07ff2a22e14c2091d963 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 14:24:20 +0200 Subject: [PATCH 1126/6109] import corrected __group from nico/nico Signed-off-by: Nico Schottelius --- conf/type/__group/gencode-remote | 45 ++++++++++++++++---------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/conf/type/__group/gencode-remote b/conf/type/__group/gencode-remote index 527a6079..ac7e0ebb 100755 --- a/conf/type/__group/gencode-remote +++ b/conf/type/__group/gencode-remote @@ -1,6 +1,7 @@ #!/bin/sh # # 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -23,16 +24,6 @@ name="$__object_id" -command= -if grep -q "^$name" "$__object/explorer/group"; then - # group exists - command="groupmod" -else - # group does not exist - command="groupadd" -fi - - get_current_value() { local key="$1" local index @@ -46,21 +37,29 @@ get_current_value() { cut -d':' -f $index "$__object/explorer/group" } - set -- "$@" cd "$__object/parameter" -for property in $(ls .); do - current_value=$(get_current_value "$property") - new_value="$(cat "$property")" - if [ "$new_value" != "$current_value" ]; then - # Shedule changed properties for update - set -- "$@" "--$property" \"$new_value\" + +if grep -q "^$name" "$__object/explorer/group"; then + # group exists, only change changed values + for property in $(ls .); do + current_value=$(get_current_value "$property") + new_value="$(cat "$property")" + if [ "$new_value" != "$current_value" ]; then + # Shedule changed properties for update + set -- "$@" "--$property" \"$new_value\" + fi + done + + if [ $# -gt 0 ]; then + # Update changed properties + echo groupmod $@ $name fi -done +else + for property in $(ls .); do + new_value="$(cat "$property")" + set -- "$@" "--$property" \"$new_value\" + done - -if [ $# -gt 0 ]; then - # Update changed properties - echo $command $@ $name + echo groupadd "$@" "$name" fi - From 69a17d0b0e6d9f12cbf743ce739aaef3caf93d65 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 14:25:00 +0200 Subject: [PATCH 1127/6109] remove unecessary set -- "$@" Signed-off-by: Nico Schottelius --- conf/type/__group/gencode-remote | 2 -- 1 file changed, 2 deletions(-) diff --git a/conf/type/__group/gencode-remote b/conf/type/__group/gencode-remote index ac7e0ebb..35df5424 100755 --- a/conf/type/__group/gencode-remote +++ b/conf/type/__group/gencode-remote @@ -37,9 +37,7 @@ get_current_value() { cut -d':' -f $index "$__object/explorer/group" } -set -- "$@" cd "$__object/parameter" - if grep -q "^$name" "$__object/explorer/group"; then # group exists, only change changed values for property in $(ls .); do From 252b511da7c4157b8950364cebc0ad6747965463 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 14:31:50 +0200 Subject: [PATCH 1128/6109] done++ Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index fe22e838..a1f218e8 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,6 +1,7 @@ 1.6.0: * New Type __package_yum * New type __debconf_set_selections + * Fix Type __group in case of __group NAME syntax * Type __package gained Fedora support * Removed --preseed support from __package_apt * explorer/os: gained Fedora support From 1310a1e42b3f0af84e7e5b8bb3299bd928ea60a8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 2 Apr 2011 14:40:31 +0200 Subject: [PATCH 1129/6109] ++todo Signed-off-by: Nico Schottelius --- doc/dev/todo/TAKEME | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index 7a8c4583..ad6561a6 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -26,13 +26,14 @@ CORE TYPES ------ -Types to be written/extended: - - __ssh-keys (host/user) - - Think about __service - necessary? - - __file_edit - - regexp replace (can probably cover all?) - -> aka sed. - - __cron +- __ssh-keys (host/user) +- __file_edit + - regexp replace (can probably cover all?) + -> aka sed. +- __cron +- __user: + add option to include --create-home + fix __user NAME case (same issue as __group) DOCUMENTATION -------------- From de879bf5215db28d82631fc3ec495233aad84c8f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 4 Apr 2011 09:45:25 +0200 Subject: [PATCH 1130/6109] emphasise SSH Signed-off-by: Nico Schottelius --- README | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README b/README index e8f6e0bf..aba67707 100644 --- a/README +++ b/README @@ -31,7 +31,7 @@ Here are some features that makes it unique: Keywords | Description Simplicity | There is only one type to extend cdist called ***type*** Design | Type and core cleanly seperated -Design | cdist sticks completly to the KISS (keep it simple and stupid) paradigma +Design | Sticks completly to the KISS (keep it simple and stupid) paradigma Design | Meaningful error messages - do not lose time debugging error messages Design | Consistency in behaviour, naming and documentation Design | No surprise factor: Only do what is obviously clear, no magic @@ -40,8 +40,8 @@ Small core | cdist's core is very small - less code, less bugs Fast development | Focus on straightforwardness of type creation is a main development objective Requirements, Scalability | No central server needed, cdist operates in push mode and can be run from any computer Requirements, Scalability, Upgrade | cdist only needs to be updated on the master, not on the target hosts -Requirements | cdist requires only SSH and a shell on the target -Requirements | +Requirements, Security | Uses well-know [SSH](http://www.openssh.com/) as transport protocol +Requirements, Simplicity | Requires only shell and SSH server on the target UNIX | Reuse of existing tools like cat, find, mv, ... UNIX, familar environment, documentation | Is available as manpages and HTML UNIX, simplicity, familar environment | cdist is written in POSIX shell From 674e1f58f8ff8924efe5d322d062451a1fa4b1e2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 4 Apr 2011 09:45:52 +0200 Subject: [PATCH 1131/6109] todo for 1.6 Signed-off-by: Nico Schottelius --- doc/dev/todo/1.6 | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/dev/todo/1.6 diff --git a/doc/dev/todo/1.6 b/doc/dev/todo/1.6 new file mode 100644 index 00000000..1be7274f --- /dev/null +++ b/doc/dev/todo/1.6 @@ -0,0 +1 @@ +- adjust documentation / stages From 4b76d8a7e087fe280cc11d8d91b99359b6fbac89 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 4 Apr 2011 10:45:41 +0200 Subject: [PATCH 1132/6109] __user: remove =~, cleanup and beautify, replace cut with awk Signed-off-by: Nico Schottelius --- conf/type/__user/gencode-remote | 96 +++++++++++++++------------------ 1 file changed, 43 insertions(+), 53 deletions(-) diff --git a/conf/type/__user/gencode-remote b/conf/type/__user/gencode-remote index c53d8c40..c7dbac41 100755 --- a/conf/type/__user/gencode-remote +++ b/conf/type/__user/gencode-remote @@ -23,60 +23,50 @@ name="$__object_id" -command= -if grep -q "^$name" "$__object/explorer/passwd"; then - # user exists - command="usermod" -else - # user does not exist - command="useradd" -fi - - -get_current_value() { - local key="$1" - local new_value="$2" - - local explorer="$__object/explorer/passwd" - local index - case "$key" in - password) - explorer="$__object/explorer/shadow" - index=2 - ;; - uid) index=3;; - gid) - if [[ $new_value =~ ^[0-9]+$ ]]; then - # numeric gid - index=4 - else - # group name - explorer="$__object/explorer/group" - index=1 - fi - ;; - comment) index=5;; - home) index=6;; - shell) index=7;; - esac - cut -d':' -f $index "$explorer" -} - - -set -- "$@" cd "$__object/parameter" -for property in $(ls .); do - new_value="$(cat "$property")" - current_value=$(get_current_value "$property" "$new_value") - if [ "$new_value" != "$current_value" ]; then - # Shedule changed properties for update - set -- "$@" "--$property" \"$new_value\" +if grep -q "^${name}:" "$__object/explorer/passwd"; then + for property in $(ls .); do + new_value="$(cat "$property")" + + file="$__object/explorer/passwd" + + case "$key" in + password) + field=3 + file="$__object/explorer/shadow" + ;; + gid) + if $(echo "$new_value" | grep -q '^[0-9][0-9]*$'); then + field=4 + else + # group name + file="$__object/explorer/group" + field=1 + fi + ;; + uid) field=3 ;; + comment) field=5 ;; + home) field=6 ;; + shell) field=7 ;; + esac + + current_value="$(awk -F: '{ print $ENVIRON["field"] }' < "$file")" + + if [ "$new_value" != "$current_value" ]; then + # Shedule changed properties for update + set -- "$@" "--$property" \"$new_value\" + fi + done + + if [ $# -gt 0 ]; then + # Update changed properties + echo usermod "$@" "$name" fi -done +else + for property in $(ls .); do + new_value="$(cat "$property")" + set -- "$@" "--$property" \"$new_value\" + done - -if [ $# -gt 0 ]; then - # Update changed properties - echo $command $@ $name + echo useradd "$@" "$name" fi - From db425d39254c35c8fa8ba85678dafced87ef64ba Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 4 Apr 2011 10:59:04 +0200 Subject: [PATCH 1133/6109] use property, not key anymore Signed-off-by: Nico Schottelius --- conf/type/__user/gencode-remote | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/conf/type/__user/gencode-remote b/conf/type/__user/gencode-remote index c7dbac41..8f4222c3 100755 --- a/conf/type/__user/gencode-remote +++ b/conf/type/__user/gencode-remote @@ -1,6 +1,7 @@ #!/bin/sh # # 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -30,7 +31,7 @@ if grep -q "^${name}:" "$__object/explorer/passwd"; then file="$__object/explorer/passwd" - case "$key" in + case "$property" in password) field=3 file="$__object/explorer/shadow" @@ -50,18 +51,15 @@ if grep -q "^${name}:" "$__object/explorer/passwd"; then shell) field=7 ;; esac + export field current_value="$(awk -F: '{ print $ENVIRON["field"] }' < "$file")" if [ "$new_value" != "$current_value" ]; then - # Shedule changed properties for update set -- "$@" "--$property" \"$new_value\" fi done - if [ $# -gt 0 ]; then - # Update changed properties - echo usermod "$@" "$name" - fi + [ $# -gt 0 ] && echo usermod "$@" "$name" else for property in $(ls .); do new_value="$(cat "$property")" From d49e481a87d920fab6dc157e663cdf6d324c61fd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 4 Apr 2011 11:00:15 +0200 Subject: [PATCH 1134/6109] match on name: not name, may be invalid Signed-off-by: Nico Schottelius --- conf/type/__group/gencode-remote | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__group/gencode-remote b/conf/type/__group/gencode-remote index 35df5424..a8a8397d 100755 --- a/conf/type/__group/gencode-remote +++ b/conf/type/__group/gencode-remote @@ -38,7 +38,7 @@ get_current_value() { } cd "$__object/parameter" -if grep -q "^$name" "$__object/explorer/group"; then +if grep -q "^${name}:" "$__object/explorer/group"; then # group exists, only change changed values for property in $(ls .); do current_value=$(get_current_value "$property") From e464c5aaa223f3cfe80f20c3d42a1eb2b928adad Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 4 Apr 2011 11:04:00 +0200 Subject: [PATCH 1135/6109] simplify Signed-off-by: Nico Schottelius --- conf/type/__group/gencode-remote | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/conf/type/__group/gencode-remote b/conf/type/__group/gencode-remote index a8a8397d..4cb05762 100755 --- a/conf/type/__group/gencode-remote +++ b/conf/type/__group/gencode-remote @@ -24,35 +24,26 @@ name="$__object_id" -get_current_value() { - local key="$1" - local index - case "$key" in - password) - cut -d':' -f 2 "$__object/explorer/gshadow" - break - ;; - gid) index=3;; - esac - cut -d':' -f $index "$__object/explorer/group" -} - cd "$__object/parameter" if grep -q "^${name}:" "$__object/explorer/group"; then - # group exists, only change changed values for property in $(ls .); do - current_value=$(get_current_value "$property") new_value="$(cat "$property")" + + case "$key" in + password) + current_value="$(awk -F: '{ print $2 }' < "$__object/explorer/gshadow")" + ;; + gid) + current_value="$(awk -F: '{ print $3 }' < "$__object/explorer/group")" + ;; + esac + if [ "$new_value" != "$current_value" ]; then - # Shedule changed properties for update set -- "$@" "--$property" \"$new_value\" fi done - if [ $# -gt 0 ]; then - # Update changed properties - echo groupmod $@ $name - fi + [ $# -gt 0 ] && echo groupmod $@ $name else for property in $(ls .); do new_value="$(cat "$property")" From 324fc13927b06ab201042e0e19912dd2e025dcd6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 4 Apr 2011 11:07:15 +0200 Subject: [PATCH 1136/6109] +changes Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index a1f218e8..f0641509 100644 --- a/doc/changelog +++ b/doc/changelog @@ -5,6 +5,7 @@ * Type __package gained Fedora support * Removed --preseed support from __package_apt * explorer/os: gained Fedora support + * Simplified types __user and __group 1.5.0: 2011-04-01 * Add basic cache functionality From a60e2838e324fe92e0bac7c12f46dc81d6509eff Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 4 Apr 2011 11:54:42 +0200 Subject: [PATCH 1137/6109] update .gitignore to match new man page locations Signed-off-by: Steven Armstrong --- .gitignore | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 68f829dc..778fc944 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,12 @@ # Ignore generated manpages doc/man/.marker -doc/man/man*/ +doc/man/man*/*.1 +doc/man/man*/*.7 +doc/man/man*/*.html +doc/man/man*/*.xml +# Ignore type manpages +doc/man/man*/*__*.text # Ignore cache for version control cache/ From fc1000994677ff1aeeea30a6fa5c5cee03003e0a Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Mon, 4 Apr 2011 11:59:30 +0200 Subject: [PATCH 1138/6109] update and merge ignore files Signed-off-by: Steven Armstrong --- .gitignore | 1 + doc/man/.gitignore | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 doc/man/.gitignore diff --git a/.gitignore b/.gitignore index 778fc944..15be6dc2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ doc/man/man*/*.1 doc/man/man*/*.7 doc/man/man*/*.html doc/man/man*/*.xml +doc/man/man*/cdist-reference.text # Ignore type manpages doc/man/man*/*__*.text diff --git a/doc/man/.gitignore b/doc/man/.gitignore deleted file mode 100644 index 8ed9d1e1..00000000 --- a/doc/man/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -cdist.7 -*.html -cdist-design.7 -cdist-reference.text From 74e3447c40cb0497f13ec22f2faf38f80a5be7fe Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 4 Apr 2011 12:04:10 +0200 Subject: [PATCH 1139/6109] add example multi branch .git/config Signed-off-by: Nico Schottelius --- doc/man/man7/cdist-best-practice.text | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/doc/man/man7/cdist-best-practice.text b/doc/man/man7/cdist-best-practice.text index aa499790..5ec01d5f 100644 --- a/doc/man/man7/cdist-best-practice.text +++ b/doc/man/man7/cdist-best-practice.text @@ -102,6 +102,39 @@ git checkout private git merge common -------------------------------------------------------------------------------- +The following **.git/config** is taken from a a real world scenario: +-------------------------------------------------------------------------------- +# Track upstream, merge from time to time +[remote "upstream"] + url = git://git.schottelius.org/cdist + fetch = +refs/heads/*:refs/remotes/upstream/* + +# Same as upstream, but works when being offline +[remote "local"] + fetch = +refs/heads/*:refs/remotes/local/* + url = /home/users/nico/p/cdist + +# Remote containing various ETH internal branches +[remote "eth"] + url = sans.ethz.ch:/home/services/sans/git/cdist-eth + fetch = +refs/heads/*:refs/remotes/eth/* + +# Public remote that contains my private changes to cdist upstream +[remote "nico"] + url = git.schottelius.org:/home/services/git/cdist-nico + fetch = +refs/heads/*:refs/remotes/nico/* + +# The "nico" branch will be synced with the remote nico, branch master +[branch "nico"] + remote = nico + merge = refs/heads/master + +# ETH stable contains rock solid configurations used in various places +[branch "eth-stable"] + remote = eth + merge = refs/heads/stable +-------------------------------------------------------------------------------- + Have a look at git-remote(1) to adjust the remote configuration, which allows you to push certain branches to certain remotes. From a28ac9bedca9581b1c28d8af44f66bf8280094a8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 4 Apr 2011 12:15:13 +0200 Subject: [PATCH 1140/6109] ++todo 1.6 Signed-off-by: Nico Schottelius --- doc/dev/todo/1.6 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/dev/todo/1.6 b/doc/dev/todo/1.6 index 1be7274f..12a83e93 100644 --- a/doc/dev/todo/1.6 +++ b/doc/dev/todo/1.6 @@ -1 +1,3 @@ -- adjust documentation / stages +Documentation: + - update stages + - go through all manpages and ensure __ and co are correct From 09bf63ffca43d10320f20fd41dfb0943275ccf9f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 4 Apr 2011 12:19:02 +0200 Subject: [PATCH 1141/6109] [DOC] remove some formatting issues in cdist-reference Signed-off-by: Nico Schottelius --- doc/man/cdist-reference.text.sh | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/doc/man/cdist-reference.text.sh b/doc/man/cdist-reference.text.sh index 8fb24362..a5d1698a 100755 --- a/doc/man/cdist-reference.text.sh +++ b/doc/man/cdist-reference.text.sh @@ -45,9 +45,11 @@ cdist-reference - Variable, path and type reference for cdist DESCRIPTION ----------- -Various scripts which are not in the core need information on how -to find information. This manpage summarises the available environment -variables, types and paths and clearifies with part may access which variables. +This reference summarises + +- environment variables +- paths +- types PATHS @@ -62,7 +64,6 @@ conf/manifest/init:: It is an executable (+x bit set) shell script that can use values from the explorers to decide which configuration to create for the specified target host. - It should be primary used to define mapping from configurations to hosts. conf/manifest/*:: @@ -103,15 +104,12 @@ conf/type//parameters/optional:: conf/type//explorer:: Location of the type specific explorers. - This directory is referenced by the variable __type_explorer (see below). - See cdist-explorer(7). out/:: This directory contains output of cdist and is usually located in a temporary directory and thus will be removed after the run. - This directory is referenced by the variable __global (see below). out/explorer:: @@ -122,7 +120,6 @@ out/object:: out/object/:: Contains all object specific information. - This directory is referenced by the variable __object (see below). out/object//explorers:: @@ -138,8 +135,8 @@ TYPES The available types are listed in the SEE ALSO section and are referenced as cdist-type__TYPENAME. -VARIABLES ---------- +ENVIRONMENT VARIABLES +--------------------- __explorer:: Directory that contains all explorers. Available for: explorer From 785ec3f36ff7315012cf0ac037a5e01d8a2210cd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 4 Apr 2011 13:20:22 +0200 Subject: [PATCH 1142/6109] sort fields by alphabet Signed-off-by: Nico Schottelius --- conf/type/__user/gencode-remote | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/conf/type/__user/gencode-remote b/conf/type/__user/gencode-remote index 8f4222c3..7670b943 100755 --- a/conf/type/__user/gencode-remote +++ b/conf/type/__user/gencode-remote @@ -32,10 +32,6 @@ if grep -q "^${name}:" "$__object/explorer/passwd"; then file="$__object/explorer/passwd" case "$property" in - password) - field=3 - file="$__object/explorer/shadow" - ;; gid) if $(echo "$new_value" | grep -q '^[0-9][0-9]*$'); then field=4 @@ -45,10 +41,14 @@ if grep -q "^${name}:" "$__object/explorer/passwd"; then field=1 fi ;; - uid) field=3 ;; + password) + field=3 + file="$__object/explorer/shadow" + ;; comment) field=5 ;; home) field=6 ;; shell) field=7 ;; + uid) field=3 ;; esac export field From 654512c2096cedff06aa696e407f995034572397 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 4 Apr 2011 23:50:48 +0200 Subject: [PATCH 1143/6109] add template for __package_openbsd_pkg Signed-off-by: Nico Schottelius --- .../explorer/pkg_version | 30 +++++++++++ .../type/__package_openbsd_pkg/gencode-remote | 52 ++++++++++++++++++ conf/type/__package_openbsd_pkg/man.text | 53 +++++++++++++++++++ .../__package_openbsd_pkg/parameter/optional | 1 + .../__package_openbsd_pkg/parameter/required | 1 + 5 files changed, 137 insertions(+) create mode 100755 conf/type/__package_openbsd_pkg/explorer/pkg_version create mode 100755 conf/type/__package_openbsd_pkg/gencode-remote create mode 100644 conf/type/__package_openbsd_pkg/man.text create mode 100644 conf/type/__package_openbsd_pkg/parameter/optional create mode 100644 conf/type/__package_openbsd_pkg/parameter/required diff --git a/conf/type/__package_openbsd_pkg/explorer/pkg_version b/conf/type/__package_openbsd_pkg/explorer/pkg_version new file mode 100755 index 00000000..4f612423 --- /dev/null +++ b/conf/type/__package_openbsd_pkg/explorer/pkg_version @@ -0,0 +1,30 @@ +#!/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 . +# +# +# Retrieve the status of a package - parsed dpkg output +# + +if [ -f "$__object/parameter/name" ]; then + name="$(cat "$__object/parameter/name")" +else + name="$__object_id" +fi + +pacman -Q "$name" 2>/dev/null | awk '{ print $2 }' diff --git a/conf/type/__package_openbsd_pkg/gencode-remote b/conf/type/__package_openbsd_pkg/gencode-remote new file mode 100755 index 00000000..536b7708 --- /dev/null +++ b/conf/type/__package_openbsd_pkg/gencode-remote @@ -0,0 +1,52 @@ +#!/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 . +# +# +# Manage packages with Pacman (mostly archlinux) +# + +# Debug +# exec >&2 +# set -x + +pacopts="--noconfirm --noprogressbar" + +if [ -f "$__object/parameter/name" ]; then + name="$__object/parameter/name" +else + name="$__object_id" +fi + +state="$(cat "$__object/parameter/state")" +pkg_version="$(cat "$__object/explorer/pkg_version")" + +case "$state" in + installed) + + # Empty? Not installed. + if [ -z "$pkg_version" ]; then + echo pacman "$pacopts" -S \"$name\" + fi + ;; + uninstalled) + if [ "$pkg_version" ]; then + echo pacman "$pacopts" -R \"$name\" + fi + ;; +esac diff --git a/conf/type/__package_openbsd_pkg/man.text b/conf/type/__package_openbsd_pkg/man.text new file mode 100644 index 00000000..35a7e44c --- /dev/null +++ b/conf/type/__package_openbsd_pkg/man.text @@ -0,0 +1,53 @@ +cdist-type__package_pacman(7) +============================= +Nico Schottelius + + +NAME +---- +cdist-type__package_pacman - Manage packages with pacman + + +DESCRIPTION +----------- +Pacman is usually used on the Archlinux distribution to manage +packages. + + +REQUIRED PARAMETERS +------------------- +state:: + Either "installed" or "deinstalled". + + +OPTIONAL PARAMETERS +------------------- +name:: + If supplied, use the name and not the object id as the package name. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Ensure zsh in installed +__package_pacman zsh --state installed + +# If you don't want to follow pythonX packages, but always use python +__package_pacman python --state installed --name python2 + +# Remove obsolete package +__package_pacman puppet --state deinstalled +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) +- cdist-type__package(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/__package_openbsd_pkg/parameter/optional b/conf/type/__package_openbsd_pkg/parameter/optional new file mode 100644 index 00000000..f121bdbf --- /dev/null +++ b/conf/type/__package_openbsd_pkg/parameter/optional @@ -0,0 +1 @@ +name diff --git a/conf/type/__package_openbsd_pkg/parameter/required b/conf/type/__package_openbsd_pkg/parameter/required new file mode 100644 index 00000000..ff72b5c7 --- /dev/null +++ b/conf/type/__package_openbsd_pkg/parameter/required @@ -0,0 +1 @@ +state From 02da74e4374732ba4e8060ed446e5960ac70d811 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 4 Apr 2011 23:57:36 +0200 Subject: [PATCH 1144/6109] add explorer os_version supporting openbsd Signed-off-by: Nico Schottelius --- conf/explorer/os_version | 97 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100755 conf/explorer/os_version diff --git a/conf/explorer/os_version b/conf/explorer/os_version new file mode 100755 index 00000000..d4dd2bc9 --- /dev/null +++ b/conf/explorer/os_version @@ -0,0 +1,97 @@ +#!/bin/sh +# +# 2010-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 . +# +# +# All os variables are lower case +# +# + +case "$($__explorer/os)" in + openbsd) + uname -r + ;; +esac + +exit 0 + +# Ubuntu is also Debian, thus return if Ubuntu was found +if grep -q ^DISTRIB_ID=Ubuntu /etc/lsb-release 2>/dev/null; then + echo ubuntu + exit 0 +fi + +if [ -f /etc/arch-release ]; then + echo archlinux + exit 0 +fi + +if [ -f /etc/debian_version ]; then + echo debian + exit 0 +fi + +if [ -f /etc/gentoo-release ]; then + echo gentoo + exit 0 +fi + +# Fedora is also Redhat, thus return before redhat! +if grep -q ^Fedora /etc/redhat-release 2>/dev/null; then + echo fedora + exit 0 +fi + +if [ -f /etc/redhat-release ]; then + echo redhat + exit 0 +fi + +if [ -f /etc/SuSE-release ]; then + echo suse + exit 0 +fi + +uname_s="$(uname -s)" + +# Assume there is no tr on the client -> do lower case ourselves +case "$uname_s" in + Darwin) + echo macosx + exit 0 + ;; + NetBSD) + echo netbsd + exit 0 + ;; + FreeBSD) + echo freebsd + exit 0 + ;; + OpenBSD) + echo openbsd + exit 0 + ;; + SunOS) + echo solaris + exit 0 + ;; +esac + +echo "Unknown OS" >&2 +exit 1 From b474960774607c03e96b967374478a1bb8c79e6e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 00:03:23 +0200 Subject: [PATCH 1145/6109] explorer os_version supports macosx Signed-off-by: Nico Schottelius --- conf/explorer/os_version | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/conf/explorer/os_version b/conf/explorer/os_version index d4dd2bc9..02e2e2cd 100755 --- a/conf/explorer/os_version +++ b/conf/explorer/os_version @@ -23,7 +23,11 @@ # case "$($__explorer/os)" in - openbsd) + archlinux) + # empty, but well... + cat /etc/arch-release + ;; + macosx|openbsd) uname -r ;; esac @@ -36,11 +40,6 @@ if grep -q ^DISTRIB_ID=Ubuntu /etc/lsb-release 2>/dev/null; then exit 0 fi -if [ -f /etc/arch-release ]; then - echo archlinux - exit 0 -fi - if [ -f /etc/debian_version ]; then echo debian exit 0 @@ -71,10 +70,6 @@ uname_s="$(uname -s)" # Assume there is no tr on the client -> do lower case ourselves case "$uname_s" in - Darwin) - echo macosx - exit 0 - ;; NetBSD) echo netbsd exit 0 From edfedc5c064d38157f2abe5306297866e7e74b91 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 00:10:26 +0200 Subject: [PATCH 1146/6109] in theory finish os_version Signed-off-by: Nico Schottelius --- conf/explorer/os_version | 73 +++++++++------------------------------- 1 file changed, 16 insertions(+), 57 deletions(-) diff --git a/conf/explorer/os_version b/conf/explorer/os_version index 02e2e2cd..5f7120c0 100755 --- a/conf/explorer/os_version +++ b/conf/explorer/os_version @@ -27,66 +27,25 @@ case "$($__explorer/os)" in # empty, but well... cat /etc/arch-release ;; - macosx|openbsd) + debian) + cat /etc/debian_version + ;; + fedora) + cat /etc/fedora-release + ;; + gentoo) + cat /etc/gentoo-release + ;; + macosx|*bsd|solaris) uname -r ;; -esac - -exit 0 - -# Ubuntu is also Debian, thus return if Ubuntu was found -if grep -q ^DISTRIB_ID=Ubuntu /etc/lsb-release 2>/dev/null; then - echo ubuntu - exit 0 -fi - -if [ -f /etc/debian_version ]; then - echo debian - exit 0 -fi - -if [ -f /etc/gentoo-release ]; then - echo gentoo - exit 0 -fi - -# Fedora is also Redhat, thus return before redhat! -if grep -q ^Fedora /etc/redhat-release 2>/dev/null; then - echo fedora - exit 0 -fi - -if [ -f /etc/redhat-release ]; then - echo redhat - exit 0 -fi - -if [ -f /etc/SuSE-release ]; then - echo suse - exit 0 -fi - -uname_s="$(uname -s)" - -# Assume there is no tr on the client -> do lower case ourselves -case "$uname_s" in - NetBSD) - echo netbsd - exit 0 + redhat) + cat /etc/redhat-release ;; - FreeBSD) - echo freebsd - exit 0 + suse) + cat /etc/SuSE-release ;; - OpenBSD) - echo openbsd - exit 0 - ;; - SunOS) - echo solaris - exit 0 + ubuntu) + lsb_release -sr ;; esac - -echo "Unknown OS" >&2 -exit 1 From 1a9901989133203d9552b027d66383660efb8148 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 00:11:19 +0200 Subject: [PATCH 1147/6109] more stuff todo Signed-off-by: Nico Schottelius --- doc/dev/todo/TAKEME | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index ad6561a6..3adf4561 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -24,6 +24,7 @@ CORE - probably remove or improve cdist-type-template + TYPES ------ - __ssh-keys (host/user) @@ -40,6 +41,7 @@ DOCUMENTATION - asciidoc interprets __, which we use for variables names -> seek through docs and replace with \_\_! - check all all internal variables are prefixed with __cdist +- reference explorers in cdist-reference! Cache: - add example how to use From 5710d9a60690656e5d820ef24acce7f104c842a1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 14:57:22 +0200 Subject: [PATCH 1148/6109] delay __package_openbsd_pkg / wait for input of justastudent Signed-off-by: Nico Schottelius --- .../explorer/pkg_version | 30 ----------- .../type/__package_openbsd_pkg/gencode-remote | 52 ------------------ conf/type/__package_openbsd_pkg/man.text | 53 ------------------- .../__package_openbsd_pkg/parameter/optional | 1 - .../__package_openbsd_pkg/parameter/required | 1 - 5 files changed, 137 deletions(-) delete mode 100755 conf/type/__package_openbsd_pkg/explorer/pkg_version delete mode 100755 conf/type/__package_openbsd_pkg/gencode-remote delete mode 100644 conf/type/__package_openbsd_pkg/man.text delete mode 100644 conf/type/__package_openbsd_pkg/parameter/optional delete mode 100644 conf/type/__package_openbsd_pkg/parameter/required diff --git a/conf/type/__package_openbsd_pkg/explorer/pkg_version b/conf/type/__package_openbsd_pkg/explorer/pkg_version deleted file mode 100755 index 4f612423..00000000 --- a/conf/type/__package_openbsd_pkg/explorer/pkg_version +++ /dev/null @@ -1,30 +0,0 @@ -#!/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 . -# -# -# Retrieve the status of a package - parsed dpkg output -# - -if [ -f "$__object/parameter/name" ]; then - name="$(cat "$__object/parameter/name")" -else - name="$__object_id" -fi - -pacman -Q "$name" 2>/dev/null | awk '{ print $2 }' diff --git a/conf/type/__package_openbsd_pkg/gencode-remote b/conf/type/__package_openbsd_pkg/gencode-remote deleted file mode 100755 index 536b7708..00000000 --- a/conf/type/__package_openbsd_pkg/gencode-remote +++ /dev/null @@ -1,52 +0,0 @@ -#!/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 . -# -# -# Manage packages with Pacman (mostly archlinux) -# - -# Debug -# exec >&2 -# set -x - -pacopts="--noconfirm --noprogressbar" - -if [ -f "$__object/parameter/name" ]; then - name="$__object/parameter/name" -else - name="$__object_id" -fi - -state="$(cat "$__object/parameter/state")" -pkg_version="$(cat "$__object/explorer/pkg_version")" - -case "$state" in - installed) - - # Empty? Not installed. - if [ -z "$pkg_version" ]; then - echo pacman "$pacopts" -S \"$name\" - fi - ;; - uninstalled) - if [ "$pkg_version" ]; then - echo pacman "$pacopts" -R \"$name\" - fi - ;; -esac diff --git a/conf/type/__package_openbsd_pkg/man.text b/conf/type/__package_openbsd_pkg/man.text deleted file mode 100644 index 35a7e44c..00000000 --- a/conf/type/__package_openbsd_pkg/man.text +++ /dev/null @@ -1,53 +0,0 @@ -cdist-type__package_pacman(7) -============================= -Nico Schottelius - - -NAME ----- -cdist-type__package_pacman - Manage packages with pacman - - -DESCRIPTION ------------ -Pacman is usually used on the Archlinux distribution to manage -packages. - - -REQUIRED PARAMETERS -------------------- -state:: - Either "installed" or "deinstalled". - - -OPTIONAL PARAMETERS -------------------- -name:: - If supplied, use the name and not the object id as the package name. - - -EXAMPLES --------- - --------------------------------------------------------------------------------- -# Ensure zsh in installed -__package_pacman zsh --state installed - -# If you don't want to follow pythonX packages, but always use python -__package_pacman python --state installed --name python2 - -# Remove obsolete package -__package_pacman puppet --state deinstalled --------------------------------------------------------------------------------- - - -SEE ALSO --------- -- cdist-type(7) -- cdist-type__package(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/__package_openbsd_pkg/parameter/optional b/conf/type/__package_openbsd_pkg/parameter/optional deleted file mode 100644 index f121bdbf..00000000 --- a/conf/type/__package_openbsd_pkg/parameter/optional +++ /dev/null @@ -1 +0,0 @@ -name diff --git a/conf/type/__package_openbsd_pkg/parameter/required b/conf/type/__package_openbsd_pkg/parameter/required deleted file mode 100644 index ff72b5c7..00000000 --- a/conf/type/__package_openbsd_pkg/parameter/required +++ /dev/null @@ -1 +0,0 @@ -state From 33e792540e38168b6f730ead3840809406a3a5bc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 14:57:50 +0200 Subject: [PATCH 1149/6109] more stuff for 1.6.0 Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index f0641509..cec4a11a 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,6 +1,7 @@ 1.6.0: * New Type __package_yum * New type __debconf_set_selections + * New explorer os_version * Fix Type __group in case of __group NAME syntax * Type __package gained Fedora support * Removed --preseed support from __package_apt From 1fc90b2d8c5d5f09f14a951d0c21ad3adfcc4cfe Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 14:58:40 +0200 Subject: [PATCH 1150/6109] +obsd pkg tests Signed-off-by: Nico Schottelius --- doc/dev/logs/2011-04-04.openbsd | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 doc/dev/logs/2011-04-04.openbsd diff --git a/doc/dev/logs/2011-04-04.openbsd b/doc/dev/logs/2011-04-04.openbsd new file mode 100644 index 00000000..df1732c2 --- /dev/null +++ b/doc/dev/logs/2011-04-04.openbsd @@ -0,0 +1,24 @@ + +Some openbsd experiements: + +# pkg_add foo +Can't find foo +# echo $? +0 +# +# pkg_info foo +# echo $? +0 + +# pkg_add -s vim +Ambiguous: vim could be vim-7.2.444-gtk2 vim-7.2.444-no_x11 +# pkg_add -s vim--no_x11 +# echo $? +0 +# pkg_add -s vimfooooooooo +Can't find vimfooooooooo +# pkg_add -s vim--foooooooo +Can't find vim--foooooooo +# echo $? +0 + From 231d6a49868f7d7d63a1c6959b52a6e7980ed3a8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 15:19:33 +0200 Subject: [PATCH 1151/6109] more ideas for stuff todo Signed-off-by: Nico Schottelius --- doc/dev/todo/TAKEME | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index 3adf4561..ebf506d4 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -23,6 +23,9 @@ CORE [20:22] kr:bin% - probably remove or improve cdist-type-template +- add $__tmp? + - for use in manifest, code, etc.? + - for creating temporary files, etc. TYPES From 4ebcdc3ef1d1126ab7f7b0d1d64f9ce45b297b2f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 16:25:13 +0200 Subject: [PATCH 1152/6109] find __package* -type f -exec sed -i 's/deinstalled/removed/g' {} \; Signed-off-by: Nico Schottelius --- conf/type/__package_apt/man.text | 4 ++-- conf/type/__package_pacman/man.text | 4 ++-- conf/type/__package_yum/man.text | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/type/__package_apt/man.text b/conf/type/__package_apt/man.text index 0780124d..905bfb5f 100644 --- a/conf/type/__package_apt/man.text +++ b/conf/type/__package_apt/man.text @@ -17,7 +17,7 @@ manage packages. REQUIRED PARAMETERS ------------------- state:: - Either "installed" or "deinstalled". + Either "installed" or "removed". OPTIONAL PARAMETERS @@ -37,7 +37,7 @@ __package_apt zsh --state installed __package_apt webserver --state installed --name nginx # Remove obsolete package -__package_apt puppet --state deinstalled +__package_apt puppet --state removed -------------------------------------------------------------------------------- diff --git a/conf/type/__package_pacman/man.text b/conf/type/__package_pacman/man.text index 35a7e44c..28766581 100644 --- a/conf/type/__package_pacman/man.text +++ b/conf/type/__package_pacman/man.text @@ -17,7 +17,7 @@ packages. REQUIRED PARAMETERS ------------------- state:: - Either "installed" or "deinstalled". + Either "installed" or "removed". OPTIONAL PARAMETERS @@ -37,7 +37,7 @@ __package_pacman zsh --state installed __package_pacman python --state installed --name python2 # Remove obsolete package -__package_pacman puppet --state deinstalled +__package_pacman puppet --state removed -------------------------------------------------------------------------------- diff --git a/conf/type/__package_yum/man.text b/conf/type/__package_yum/man.text index b2f57606..c9cad340 100644 --- a/conf/type/__package_yum/man.text +++ b/conf/type/__package_yum/man.text @@ -18,7 +18,7 @@ slightly confusing error message "Error: Nothing to do". REQUIRED PARAMETERS ------------------- state:: - Either "installed" or "deinstalled". + Either "installed" or "removed". OPTIONAL PARAMETERS @@ -38,7 +38,7 @@ __package_yum zsh --state installed __package_yum python --state installed --name python2 # Remove obsolete package -__package_yum puppet --state deinstalled +__package_yum puppet --state removed -------------------------------------------------------------------------------- From ac976c9f703ad319ff246ae0e2778a3f668ed2db Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 16:25:27 +0200 Subject: [PATCH 1153/6109] find __package* -type f -exec sed -i 's/uninstalled/removed/g' {} \; Signed-off-by: Nico Schottelius --- conf/type/__package/man.text | 2 +- conf/type/__package_apt/gencode-remote | 2 +- conf/type/__package_pacman/gencode-remote | 2 +- conf/type/__package_yum/gencode-remote | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/type/__package/man.text b/conf/type/__package/man.text index eeeceba0..46af7b3d 100644 --- a/conf/type/__package/man.text +++ b/conf/type/__package/man.text @@ -17,7 +17,7 @@ It dispatches the actual work to the package system dependant types. REQUIRED PARAMETERS ------------------- state:: - The state the package should be in, either "installed" or "uninstalled" + The state the package should be in, either "installed" or "removed" OPTIONAL PARAMETERS diff --git a/conf/type/__package_apt/gencode-remote b/conf/type/__package_apt/gencode-remote index e38653e9..aac9beb1 100755 --- a/conf/type/__package_apt/gencode-remote +++ b/conf/type/__package_apt/gencode-remote @@ -46,7 +46,7 @@ case "$state" in echo $aptget install \"$name\" fi ;; - uninstalled) + removed) # Remove only if existent if [ -n "$is_installed" ]; then echo $aptget remove \"$name\" diff --git a/conf/type/__package_pacman/gencode-remote b/conf/type/__package_pacman/gencode-remote index 536b7708..b31d097a 100755 --- a/conf/type/__package_pacman/gencode-remote +++ b/conf/type/__package_pacman/gencode-remote @@ -44,7 +44,7 @@ case "$state" in echo pacman "$pacopts" -S \"$name\" fi ;; - uninstalled) + removed) if [ "$pkg_version" ]; then echo pacman "$pacopts" -R \"$name\" fi diff --git a/conf/type/__package_yum/gencode-remote b/conf/type/__package_yum/gencode-remote index 033298b1..215a1ae5 100755 --- a/conf/type/__package_yum/gencode-remote +++ b/conf/type/__package_yum/gencode-remote @@ -39,7 +39,7 @@ case "$state" in echo yum $opts install \"$name\" fi ;; - uninstalled) + removed) if ! grep -q "$not_installed" "$__object/explorer/pkg_version"; then echo yum $opts remove \"$name\" fi From 1687d82c9d88874bda757da031ce32b5379e1a31 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 16:26:56 +0200 Subject: [PATCH 1154/6109] ++changes in 1.6.0 Signed-off-by: Nico Schottelius --- doc/changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/changelog b/doc/changelog index cec4a11a..9672814f 100644 --- a/doc/changelog +++ b/doc/changelog @@ -3,6 +3,8 @@ * New type __debconf_set_selections * New explorer os_version * Fix Type __group in case of __group NAME syntax + * Fix __package* types: consistently name --state removed instead of + uninstalled or deinstalled * Type __package gained Fedora support * Removed --preseed support from __package_apt * explorer/os: gained Fedora support From 249977cca66bcff51778cf336ff377c076074016 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 16:49:09 +0200 Subject: [PATCH 1155/6109] document upcoming changes for 1.6 Signed-off-by: Nico Schottelius --- README | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/README b/README index aba67707..52471068 100644 --- a/README +++ b/README @@ -106,14 +106,15 @@ how to use cdist. There are at least the following branches available: * master: the development branch - * 1.5: Focus on object orientation instead of global stage orientation + * 1.6: New types, cleaned up \_\_package* types, internal cleanup Old versions: + * 1.5: Focus on object orientation instead of global stage orientation * 1.4: Support for redefiniton of objects (if equal) * 1.3: Support for local and remote code execution (current stable) * 1.2: Dependencies supported - * 1.1: __file to __file, __directory, __link migration + * 1.1: \_\_file to \_\_file, \_\_directory, \_\_link migration * 1.0: First official release Other branches may be available for features or bugfixes, but they @@ -123,7 +124,7 @@ may vanish at any point. To select a specific branch use git checkout -b origin/ # Stay on a specific version - version=1.5 + version=1.6 git checkout -b $version origin/$version ### Mirrors @@ -145,6 +146,14 @@ If you stay on a version branche (i.e. 1.0, 1.1., ...), nothing should break. The master branch on the other hand is the development branch and may not be working, break your setup or eat the tree in your garden. +### Upgrading from 1.5 to 1.6 + +* If you used **\_\_package_apt --preseed**, you need to use the new + type **\_\_debconf_set_selections** instead. +* The **\_\_package** types accepted either --state deinstalled or + --state uninstaaled. Starting with 1.6, it was made consistently + to --state removed. + ### Upgrading from 1.3 to 1.5 No incompatiblities. From 519212e39684bc3d18e8ba6446496584365d02ca Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 16:53:56 +0200 Subject: [PATCH 1156/6109] error out if state given is unknown Signed-off-by: Nico Schottelius --- conf/type/__package_apt/gencode-remote | 4 ++++ conf/type/__package_pacman/gencode-remote | 4 ++++ conf/type/__package_yum/gencode-remote | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/conf/type/__package_apt/gencode-remote b/conf/type/__package_apt/gencode-remote index aac9beb1..df8fd823 100755 --- a/conf/type/__package_apt/gencode-remote +++ b/conf/type/__package_apt/gencode-remote @@ -52,4 +52,8 @@ case "$state" in echo $aptget remove \"$name\" fi ;; + *) + echo "Unknown state: $state" >&2 + exit 1 + ;; esac diff --git a/conf/type/__package_pacman/gencode-remote b/conf/type/__package_pacman/gencode-remote index b31d097a..347b037d 100755 --- a/conf/type/__package_pacman/gencode-remote +++ b/conf/type/__package_pacman/gencode-remote @@ -49,4 +49,8 @@ case "$state" in echo pacman "$pacopts" -R \"$name\" fi ;; + *) + echo "Unknown state: $state" >&2 + exit 1 + ;; esac diff --git a/conf/type/__package_yum/gencode-remote b/conf/type/__package_yum/gencode-remote index 215a1ae5..8bd81ca0 100755 --- a/conf/type/__package_yum/gencode-remote +++ b/conf/type/__package_yum/gencode-remote @@ -44,4 +44,8 @@ case "$state" in echo yum $opts remove \"$name\" fi ;; + *) + echo "Unknown state: $state" >&2 + exit 1 + ;; esac From c5925ff33153803ec50d718decf1dd4d6fced462 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 17:43:10 +0200 Subject: [PATCH 1157/6109] prepare version change 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 026d8419..2e5c63b1 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -19,7 +19,7 @@ # # -__cdist_version="1.5.0" +__cdist_version="1.6.0pre" # Fail if something bogus is going on set -u From 4fc181273a0d56faaeef18fb762cdbd08cb061c1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 17:58:09 +0200 Subject: [PATCH 1158/6109] ++todo Signed-off-by: Nico Schottelius --- doc/dev/todo/TAKEME | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index ebf506d4..abae0dcb 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -27,6 +27,7 @@ CORE - for use in manifest, code, etc.? - for creating temporary files, etc. +- How to cleanly implement "restart service if config file changed" TYPES ------ From 8ec728fd4bb24d7de7dd115cc513384c1b743942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Br=C3=B6nnimann?= Date: Tue, 5 Apr 2011 19:28:18 +0200 Subject: [PATCH 1159/6109] Type pkg_openbsd --- .../explorer/pkg_version | 31 +++++++++ .../type/__package_pkg_openbsd/gencode-remote | 64 +++++++++++++++++++ conf/type/__package_pkg_openbsd/man.text | 58 +++++++++++++++++ .../__package_pkg_openbsd/parameter/optional | 2 + .../__package_pkg_openbsd/parameter/required | 1 + 5 files changed, 156 insertions(+) create mode 100755 conf/type/__package_pkg_openbsd/explorer/pkg_version create mode 100755 conf/type/__package_pkg_openbsd/gencode-remote create mode 100644 conf/type/__package_pkg_openbsd/man.text create mode 100644 conf/type/__package_pkg_openbsd/parameter/optional create mode 100644 conf/type/__package_pkg_openbsd/parameter/required diff --git a/conf/type/__package_pkg_openbsd/explorer/pkg_version b/conf/type/__package_pkg_openbsd/explorer/pkg_version new file mode 100755 index 00000000..bc23a85d --- /dev/null +++ b/conf/type/__package_pkg_openbsd/explorer/pkg_version @@ -0,0 +1,31 @@ +#!/bin/sh +# +# 2011 Andi Brönnimann (andi-cdist at v-net.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 . +# +# +# Retrieve the status of a package - parsed dpkg output +# + +if [ -f "$__object/parameter/name" ]; then + name="$(cat "$__object/parameter/name")" +else + name="$__object_id" +fi + +#TODO: Is there a better way? +pkg_info | grep "$name" | sed 's .*\(-[0-9.][0-9.]*\).* \1 ' | sed 's/-//' diff --git a/conf/type/__package_pkg_openbsd/gencode-remote b/conf/type/__package_pkg_openbsd/gencode-remote new file mode 100755 index 00000000..a5756c8d --- /dev/null +++ b/conf/type/__package_pkg_openbsd/gencode-remote @@ -0,0 +1,64 @@ +#!/bin/sh +# +# 2011 Andi Brönnimann (andi-cdist at v-net.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 . +# +# +# Manage packages with Pacman (mostly archlinux) +# + +# Debug +# exec >&2 +# set -x + +os_version="$(cat "$__global/explorer/os_version")" +platform="$(cat "$__global/explorer/platform")" + + +if [ -f "$__object/parameter/flavor" ]; then + flavor="$(cat "$__object/parameter/flavor")" +fi + +# do not show progress bar +pkgopts="-x" + +if [ -f "$__object/parameter/name" ]; then + name="$__object/parameter/name" +else + name="$__object_id" +fi + +state="$(cat "$__object/parameter/state")" +pkg_version="$(cat "$__object/explorer/pkg_version")" + +# TODO: Shouldn't be hardcoded +echo export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/$os_version/packages/$platform/ + +case "$state" in + installed) + + # Empty? Not installed. + if [ -z "$pkg_version" ]; then + echo pkg_add "$pkgopts" \"$name--$flavor\" + fi + ;; + uninstalled) + if [ "$pkg_version" ]; then + echo pkg_delete "$pkgopts" \"$name--$flavor\" + fi + ;; +esac diff --git a/conf/type/__package_pkg_openbsd/man.text b/conf/type/__package_pkg_openbsd/man.text new file mode 100644 index 00000000..613c9045 --- /dev/null +++ b/conf/type/__package_pkg_openbsd/man.text @@ -0,0 +1,58 @@ +cdist-type__package_pkg(7) +============================= +Andreas Brönnimann + + +NAME +---- +cdist-type__package_pkg_openbsd - Manage OpenBSD packages + + +DESCRIPTION +----------- +This type is usually used on OpenBSD to manage packages. + + +REQUIRED PARAMETERS +------------------- +state:: + Either "installed" or "uninstalled". + + +OPTIONAL PARAMETERS +------------------- +name:: + If supplied, use the name and not the object id as the package name. + +flavor:: + If supplied, use to avoid ambigous + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Ensure zsh is installed +__package_pkg_openbsd zsh --state installed + +# Ensure vim is installed, use flavor no_x11 +__package_pkg_openbsd vim --state installed --flavor no_x11 + +# If you don't want to follow pythonX packages, but always use python +__package_pkg_openbsd python --state installed --name python2 + +# Remove obsolete package +__package_pkg_openbsd puppet --state uninstalled +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) +- cdist-type__package(7) + + +COPYING +------- +Copyright \(C) 2011 Andi Brönnimann. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/conf/type/__package_pkg_openbsd/parameter/optional b/conf/type/__package_pkg_openbsd/parameter/optional new file mode 100644 index 00000000..29b123ef --- /dev/null +++ b/conf/type/__package_pkg_openbsd/parameter/optional @@ -0,0 +1,2 @@ +name +flavor diff --git a/conf/type/__package_pkg_openbsd/parameter/required b/conf/type/__package_pkg_openbsd/parameter/required new file mode 100644 index 00000000..ff72b5c7 --- /dev/null +++ b/conf/type/__package_pkg_openbsd/parameter/required @@ -0,0 +1 @@ +state From aebf05001afd4a192bb49d228c7bae21b8c2540c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Br=C3=B6nnimann?= Date: Tue, 5 Apr 2011 19:40:54 +0200 Subject: [PATCH 1160/6109] Add platform explorer --- conf/explorer/platform | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 conf/explorer/platform diff --git a/conf/explorer/platform b/conf/explorer/platform new file mode 100755 index 00000000..a28f6d08 --- /dev/null +++ b/conf/explorer/platform @@ -0,0 +1,34 @@ +#!/bin/sh +# +# 2010-2011 Andi Brönnimann (andi-cdist at v-net.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 . +# +# +# All os variables are lower case +# +# + +os="$(cat "$__global/explorer/os")" + +case "$os" in + archlinux) + echo $(uname -m) + ;; + openbsd) + echo $(uname -m) + ;; +esac From 52fb8d5661d8a1004fcfa2cb45af31f5354bec04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Br=C3=B6nnimann?= Date: Tue, 5 Apr 2011 19:50:45 +0200 Subject: [PATCH 1161/6109] Change platform to hardware_type --- conf/explorer/{platform => hardware_type} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename conf/explorer/{platform => hardware_type} (100%) diff --git a/conf/explorer/platform b/conf/explorer/hardware_type similarity index 100% rename from conf/explorer/platform rename to conf/explorer/hardware_type From 864d25bd8cb2488be8f6e7964bfe9d7077bdb98e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 20:26:00 +0200 Subject: [PATCH 1162/6109] reorder todos Signed-off-by: Nico Schottelius --- doc/dev/todo/TAKEME | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index abae0dcb..7e9d2d5d 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -29,6 +29,14 @@ CORE - How to cleanly implement "restart service if config file changed" +- Cache + - add example how to use + - export variable $__cache + -> for current host + -> add function to cdist-config, import from cdist-cache + +- check all all internal variables are prefixed with __cdist + TYPES ------ - __ssh-keys (host/user) @@ -36,19 +44,12 @@ TYPES - regexp replace (can probably cover all?) -> aka sed. - __cron -- __user: +- __user add option to include --create-home - fix __user NAME case (same issue as __group) DOCUMENTATION -------------- - asciidoc interprets __, which we use for variables names -> seek through docs and replace with \_\_! -- check all all internal variables are prefixed with __cdist - reference explorers in cdist-reference! -Cache: - - add example how to use - - export variable $__cache - -> for current host - -> add function to cdist-config, import from cdist-cache From c5675bc35240ba2711bc9e2cc00851ecdc068c90 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 20:38:22 +0200 Subject: [PATCH 1163/6109] add hint on asciidoc errors and how to fix Signed-off-by: Nico Schottelius --- doc/man/man7/cdist-hacker.text | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/man/man7/cdist-hacker.text b/doc/man/man7/cdist-hacker.text index d55f1c2f..03a348ed 100644 --- a/doc/man/man7/cdist-hacker.text +++ b/doc/man/man7/cdist-hacker.text @@ -59,7 +59,8 @@ HOW TO SUBMIT A NEW TYPE Submitting a type works as described above, with the additional requirement that a corresponding manpage named man.text in asciidoc format with the manpage-name "cdist-type__NAME" is included in the type directory -AND asciidoc is able to compile it. +AND asciidoc is able to compile it (i.e. do NOT have to many "=" in the second +line). SEE ALSO From 4701c14045b20681b05a41fb9266ad406e43822f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 20:55:35 +0200 Subject: [PATCH 1164/6109] new todo Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index e7f2c72f..1f01ff44 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,2 +1,3 @@ -remove --preseed from package_apt and add debconf_set_selection or similar - -> much cleaner! +Cleanup documentation: + type reference -> add types + manpages + add explorer reference From d8eccddad089c3e07728c706f68805a5e21dcc95 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 5 Apr 2011 21:08:09 +0200 Subject: [PATCH 1165/6109] list types in type section Signed-off-by: Nico Schottelius --- doc/man/cdist-reference.text.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/man/cdist-reference.text.sh b/doc/man/cdist-reference.text.sh index a5d1698a..be9c3bbf 100755 --- a/doc/man/cdist-reference.text.sh +++ b/doc/man/cdist-reference.text.sh @@ -132,8 +132,17 @@ tmp_dir:: TYPES ----- -The available types are listed in the SEE ALSO section -and are referenced as cdist-type__TYPENAME. +The following types are available: +eof + +for type in man7/cdist-type__*.text; do + name_1="${type#man7/}"; man="${name_1%.text}(7)" + name_2="${name_1%.7}"; + name="$name_2" + echo "- $name" "($man)" +done + +cat << eof ENVIRONMENT VARIABLES --------------------- @@ -172,16 +181,7 @@ __type_explorers:: SEE ALSO -------- - cdist(7) -eof -for type in man7/cdist-type__*.7; do - name_1="${type#man7/}" - name_2="${name_1%.7}" - name="$name_2" - echo "- ${name}(7)" -done - -cat < Date: Tue, 5 Apr 2011 22:46:51 +0200 Subject: [PATCH 1166/6109] import man pages changes Signed-off-by: Steven Armstrong --- doc/man/man1/cdist-object-all.text | 31 ++++++++++++++++++++++++++++++ doc/man/man7/cdist-stages.text | 22 ++++++++++----------- 2 files changed, 41 insertions(+), 12 deletions(-) create mode 100644 doc/man/man1/cdist-object-all.text diff --git a/doc/man/man1/cdist-object-all.text b/doc/man/man1/cdist-object-all.text new file mode 100644 index 00000000..06d45268 --- /dev/null +++ b/doc/man/man1/cdist-object-all.text @@ -0,0 +1,31 @@ +cdist-object-all(1) +=================== +Steven Armstrong + + +NAME +---- +cdist-object-all - Run the given command on all objects + + +SYNOPSIS +-------- +cdist-object-all HOSTNAME COMMAND + + +DESCRIPTION +----------- +Iterates over all defined objects and executes the given command on each +of them. + + +SEE ALSO +-------- +- cdist(7) +- cdist-type(1) + + +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). diff --git a/doc/man/man7/cdist-stages.text b/doc/man/man7/cdist-stages.text index e2eef3da..b95b58d2 100644 --- a/doc/man/man7/cdist-stages.text +++ b/doc/man/man7/cdist-stages.text @@ -11,8 +11,8 @@ DESCRIPTION ----------- Starting the execution of deployment with cdist-deploy-to(1), cdist passes through different stages, each can be triggered and debugged on its own. -Reading the source of the cdist-deploy-to and cdist-object-run-all executables -shows the scripts responsible for each stage. +Reading the source of the cdist-deploy-to executable shows the scripts +responsible for each stage. STAGE 0: INTERNAL PREPERATION @@ -56,7 +56,7 @@ STAGE 3: OBJECT INFORMATION RETRIEVAL ------------------------------------- Every object is checked whether its type has explorers and if so, these are transfered to the target host and executed. The results are transfered back -and can be used in the following stages to decide what changes need to made +and can be used in the following stages to decide what changes need to be made on the target to implement the desired state. Related documentation: @@ -68,10 +68,9 @@ Related documentation: STAGE 4: RUN THE OBJECT MANIFEST -------------------------------- -Every object is checked whether its type has a manifest file. If the type has -a manifest file and it is executable, it will be executed. The manifest script -may generate and change the created objects. In other words, one type can reuse -other types. +Every object is checked whether its type has a executable manifest. The +manifest script may generate and change the created objects. In other words, +one type can reuse other types. For instance the object __apache/www.test.ch is of type __apache, which may contain a manifest script, which creates new objects of type __file. @@ -88,11 +87,10 @@ Related documentation: STAGE 5: CODE GENERATION ------------------------ -In this stage for every created objects its type is checked whether it has a -gencode script. If the type has a gencode script and it is executable it will -be executed. This executable should create code to be executed on the target -on stdout. If the gencode executable fails, it must print diagnostic messages -on stderr and exit non-zero. +In this stage for every created objects its type is checked for executable +gencode whether scripts. The gencode scripts generate the code to be executed +on the target on stdout. If the gencode executables fail, they must print +diagnostic messages on stderr and exit non-zero. Related documentation: - cdist-object-gencode-run(1) From 3e46d593ae480599342f4a2aa906a921900c9df7 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 5 Apr 2011 22:48:24 +0200 Subject: [PATCH 1167/6109] remove obsolete man page Signed-off-by: Steven Armstrong --- doc/man/man1/cdist-object-run-all.text | 33 -------------------------- 1 file changed, 33 deletions(-) delete mode 100644 doc/man/man1/cdist-object-run-all.text diff --git a/doc/man/man1/cdist-object-run-all.text b/doc/man/man1/cdist-object-run-all.text deleted file mode 100644 index 9e36b3d4..00000000 --- a/doc/man/man1/cdist-object-run-all.text +++ /dev/null @@ -1,33 +0,0 @@ -cdist-object-run-all(1) -======================= -Nico Schottelius - - -NAME ----- -cdist-object-run-all - Run all created objects on the target host - - -SYNOPSIS --------- -cdist-object-run-all HOSTNAME - - -DESCRIPTION ------------ -Transfers type explorers to the target then runs cdist-object-run(1) -for each created object. - - -SEE ALSO --------- -- cdist(7) -- cdist-type-explorer-push(1) -- cdist-object-run(1) -- cdist-type(1) - - -COPYING -------- -Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is -granted under the terms of the GNU General Public License version 3 (GPLv3). From 13ce077e8e5395a137a9935161b548aded6223c5 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 5 Apr 2011 22:50:38 +0200 Subject: [PATCH 1168/6109] docfix Signed-off-by: Steven Armstrong --- doc/man/man7/cdist-stages.text | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/man/man7/cdist-stages.text b/doc/man/man7/cdist-stages.text index b95b58d2..294dffc7 100644 --- a/doc/man/man7/cdist-stages.text +++ b/doc/man/man7/cdist-stages.text @@ -87,10 +87,10 @@ Related documentation: STAGE 5: CODE GENERATION ------------------------ -In this stage for every created objects its type is checked for executable -gencode whether scripts. The gencode scripts generate the code to be executed -on the target on stdout. If the gencode executables fail, they must print -diagnostic messages on stderr and exit non-zero. +In this stage for every created object its type is checked for executable +gencode scripts. The gencode scripts generate the code to be executed on the +target on stdout. If the gencode executables fail, they must print diagnostic +messages on stderr and exit non-zero. Related documentation: - cdist-object-gencode-run(1) From 71765210bb8ac5bf9605abf0e9d9dac564cf831b Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 5 Apr 2011 22:55:46 +0200 Subject: [PATCH 1169/6109] rename cdist-object-process to cdist-object-prepare Signed-off-by: Steven Armstrong --- bin/cdist-config | 6 +++--- bin/cdist-deploy-to | 2 +- bin/{cdist-object-process => cdist-object-prepare} | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) rename bin/{cdist-object-process => cdist-object-prepare} (85%) diff --git a/bin/cdist-config b/bin/cdist-config index 2e5c63b1..e1e82f28 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -55,7 +55,7 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" : ${__cdist_name_manifest:=manifest} : ${__cdist_name_object:=object} : ${__cdist_name_object_finished:=done} -: ${__cdist_name_object_processed:=processed} +: ${__cdist_name_object_prepared:=prepared} : ${__cdist_name_object_id:=object_id} : ${__cdist_name_object_source:=source} : ${__cdist_name_objects_created:=.objects_created} @@ -210,9 +210,9 @@ __cdist_object_code() echo "$(__cdist_object_dir "$1")/${__cdist_name_code}" } -__cdist_object_processed() +__cdist_object_prepared() { - echo "$(__cdist_object_dir "$1")/${__cdist_name_object_processed}" + echo "$(__cdist_object_dir "$1")/${__cdist_name_object_prepared}" } __cdist_object_finished() diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index 02fd34fa..dab5d9a5 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -49,7 +49,7 @@ cdist-dir push "$__cdist_target_host" \ "${__cdist_abs_mydir}" "${__cdist_remote_bin_dir}" cdist-explorer-run-global "$__cdist_target_host" cdist-manifest-run-init "$__cdist_target_host" -cdist-object-all "$__cdist_target_host" cdist-object-process +cdist-object-all "$__cdist_target_host" cdist-object-prepare cdist-object-all "$__cdist_target_host" cdist-object-run cdist-cache "$__cdist_target_host" diff --git a/bin/cdist-object-process b/bin/cdist-object-prepare similarity index 85% rename from bin/cdist-object-process rename to bin/cdist-object-prepare index 777d2c88..8c92ff73 100755 --- a/bin/cdist-object-process +++ b/bin/cdist-object-prepare @@ -36,13 +36,13 @@ __cdist_object_dir="$(__cdist_object_dir "$__cdist_object")" # Export to non-core for use in manifest and gencode scripts export $__cdist_name_var_self=$__cdist_object -__cdist_object_processed="$(__cdist_object_processed "$__cdist_object")" -if [ ! -f "$__cdist_object_processed" ]; then +__cdist_object_prepared="$(__cdist_object_prepared "$__cdist_object")" +if [ ! -f "$__cdist_object_prepared" ]; then echo - echo "Processing object $__cdist_object" + echo "Preparing object $__cdist_object" cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object" cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object" - # Mark this object as processed - touch "$__cdist_object_processed" + # Mark this object as prepared + touch "$__cdist_object_prepared" fi From b226b30dbad977bac321a0b23741584cedd6d1d2 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 5 Apr 2011 23:02:34 +0200 Subject: [PATCH 1170/6109] add man page for cdist-object-prepare Signed-off-by: Steven Armstrong --- doc/man/man1/cdist-object-prepare.text | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 doc/man/man1/cdist-object-prepare.text diff --git a/doc/man/man1/cdist-object-prepare.text b/doc/man/man1/cdist-object-prepare.text new file mode 100644 index 00000000..c91a7b2e --- /dev/null +++ b/doc/man/man1/cdist-object-prepare.text @@ -0,0 +1,35 @@ +cdist-object-prepare(1) +======================= +Steven Armstrong + + +NAME +---- +cdist-object-prepare - Prepare an object + + +SYNOPSIS +-------- +cdist-object-prepare HOSTNAME OBJECT + + +DESCRIPTION +----------- +Prepare the given object by running it through stage 3 (object information +retrieval) and stage 4 (run the object manifest). +See related man pages for details. + + +SEE ALSO +-------- +- cdist(7) +- cdist-stages(7) +- cdist-object-explorer-run(1) +- cdist-object-manifest-run(1) +- cdist-type(1) + + +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). From 40d4b4d1be7a49fed88323bf71644e8062a594df Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 5 Apr 2011 23:10:58 +0200 Subject: [PATCH 1171/6109] update man page for cdist-object-run Signed-off-by: Steven Armstrong --- doc/man/man1/cdist-object-run.text | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/man/man1/cdist-object-run.text b/doc/man/man1/cdist-object-run.text index fca6db91..fc85a05f 100644 --- a/doc/man/man1/cdist-object-run.text +++ b/doc/man/man1/cdist-object-run.text @@ -1,6 +1,6 @@ cdist-object-run(1) =================== -Nico Schottelius +Steven Armstrong NAME @@ -15,15 +15,15 @@ cdist-object-run HOSTNAME OBJECT DESCRIPTION ----------- -Runs the given object on the given target host. -The different subtasks are dispatched to specialized exectuables. +Applies the given object on the target host by running it through stage 5 +(code generation) and stage 6 (code execution). See related man pages for details. SEE ALSO -------- - cdist(7) -- cdist-object-explorer-run(1) +- cdist-stages(7) - cdist-object-gencode-run(1) - cdist-object-push(1) - cdist-object-code-run(1) @@ -32,5 +32,5 @@ SEE ALSO COPYING ------- -Copyright \(C) 2011 Nico Schottelius, Steven Armstrong. Free use of this software is +Copyright \(C) 2011 Steven Armstrong. Free use of this software is granted under the terms of the GNU General Public License version 3 (GPLv3). From aeb7d34a8e81d829fd8af9c66707a8ebacefdaef Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 5 Apr 2011 23:11:31 +0200 Subject: [PATCH 1172/6109] -todo Signed-off-by: Steven Armstrong --- doc/dev/todo/TAKEME | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index 7e9d2d5d..0fcced96 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -16,7 +16,6 @@ CORE - cdist-object-gencode: remove code if output empty? - also take care of that in cdist-code-run! -- cdist-object-process -> cdist-object-prepare - Remove cdist-object-push, covers only one line and is used only once: [20:22] kr:bin% grep cdist-object-push * cdist-object-run: cdist-object-push "$__cdist_target_host" "$__cdist_object" From ab741197ba7f22634090d6fec7b679e7aeaeca1b Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 5 Apr 2011 23:17:37 +0200 Subject: [PATCH 1173/6109] docfix: /etc/cdist is no more Signed-off-by: Steven Armstrong --- doc/man/man1/cdist-deploy-to.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/man1/cdist-deploy-to.text b/doc/man/man1/cdist-deploy-to.text index acbb915a..93417a77 100644 --- a/doc/man/man1/cdist-deploy-to.text +++ b/doc/man/man1/cdist-deploy-to.text @@ -23,7 +23,7 @@ called stages. It is intented to run either from the command line or from cron. ENVIRONMENT ----------- If the environment variable **__cdist_conf_dir** is not set, the -configuration is read from /etc/cdist. The local output directory can +configuration is read from /conf. The local output directory can be changed by the variable **__cdist_local_base_dir**. All environment variables are handled by cdist-config. From ff2581a25fe1ce9197ddbc97e811ef6c058c3262 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 5 Apr 2011 23:21:26 +0200 Subject: [PATCH 1174/6109] /cdist-object-run-all/cdist-object-run/ Signed-off-by: Steven Armstrong --- doc/man/man1/cdist-object-code-run.text | 2 +- doc/man/man1/cdist-object-gencode-run.text | 2 +- doc/man/man1/cdist-object-push.text | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/man/man1/cdist-object-code-run.text b/doc/man/man1/cdist-object-code-run.text index a055fc97..f8bae6a4 100644 --- a/doc/man/man1/cdist-object-code-run.text +++ b/doc/man/man1/cdist-object-code-run.text @@ -21,7 +21,7 @@ Execute the local and remote code for the given object. SEE ALSO -------- - cdist(7) -- cdist-object-run-all(1) +- cdist-object-run(1) - cdist-code-run(1) - cdist-run-remote(1) diff --git a/doc/man/man1/cdist-object-gencode-run.text b/doc/man/man1/cdist-object-gencode-run.text index be2d3448..7705815c 100644 --- a/doc/man/man1/cdist-object-gencode-run.text +++ b/doc/man/man1/cdist-object-gencode-run.text @@ -22,7 +22,7 @@ SEE ALSO -------- - cdist(7) - cdist-code-run(1) -- cdist-object-run-all(1) +- cdist-object-run(1) - cdist-object-gencode(1) diff --git a/doc/man/man1/cdist-object-push.text b/doc/man/man1/cdist-object-push.text index 5bff71cf..4c960eaa 100644 --- a/doc/man/man1/cdist-object-push.text +++ b/doc/man/man1/cdist-object-push.text @@ -21,7 +21,7 @@ Transfers the given object to the target host. SEE ALSO -------- - cdist(7) -- cdist-object-run-all(1) +- cdist-object-run(1) - cdist-type(1) From 836c2ae7b8ef412888fc596b6ee38cd32fbb2bf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Br=C3=B6nnimann?= Date: Tue, 5 Apr 2011 23:23:24 +0200 Subject: [PATCH 1175/6109] Add error output to __package_pkg_openbsd --- conf/explorer/hardware_type | 7 ++-- .../type/__package_pkg_openbsd/gencode-remote | 35 +++++++++++++++---- conf/type/__package_pkg_openbsd/man.text | 6 ++-- 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/conf/explorer/hardware_type b/conf/explorer/hardware_type index a28f6d08..5966b11e 100755 --- a/conf/explorer/hardware_type +++ b/conf/explorer/hardware_type @@ -22,13 +22,10 @@ # # -os="$(cat "$__global/explorer/os")" +os="$($__explorer/os)" case "$os" in - archlinux) - echo $(uname -m) - ;; - openbsd) + archlinux|*bsd) echo $(uname -m) ;; esac diff --git a/conf/type/__package_pkg_openbsd/gencode-remote b/conf/type/__package_pkg_openbsd/gencode-remote index a5756c8d..0ad85458 100755 --- a/conf/type/__package_pkg_openbsd/gencode-remote +++ b/conf/type/__package_pkg_openbsd/gencode-remote @@ -18,7 +18,7 @@ # along with cdist. If not, see . # # -# Manage packages with Pacman (mostly archlinux) +# Manage packages with pkg on OpenBSD # # Debug @@ -26,7 +26,7 @@ # set -x os_version="$(cat "$__global/explorer/os_version")" -platform="$(cat "$__global/explorer/platform")" +hardware_type="$(cat "$__global/explorer/hardware_type")" if [ -f "$__object/parameter/flavor" ]; then @@ -46,19 +46,40 @@ state="$(cat "$__object/parameter/state")" pkg_version="$(cat "$__object/explorer/pkg_version")" # TODO: Shouldn't be hardcoded -echo export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/$os_version/packages/$platform/ +echo export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/$os_version/packages/$hardware_type/ case "$state" in installed) - # Empty? Not installed. if [ -z "$pkg_version" ]; then - echo pkg_add "$pkgopts" \"$name--$flavor\" + # use this because pkg_add doesn't properly handle errors + cat << eof + status=\$(pkg_add "$pkgopts" "$name--$flavor") + + # no error + if [ -n "\$status" ]; then + echo "Error: \$status" + exit 1 + fi +eof fi ;; - uninstalled) + removed) if [ "$pkg_version" ]; then - echo pkg_delete "$pkgopts" \"$name--$flavor\" + # use this because pkg_add doesn't properly handle errors + cat << eof + status=\$(pkg_delete "$pkgopts" "$name--$flavor") + + # no error + if [ -n "\$status" ]; then + echo "Error: \$status" + exit 1 + fi +eof fi ;; + *) + echo "Unknown state: $state" >&2 + exit 1 + ;; esac diff --git a/conf/type/__package_pkg_openbsd/man.text b/conf/type/__package_pkg_openbsd/man.text index 613c9045..32501ba8 100644 --- a/conf/type/__package_pkg_openbsd/man.text +++ b/conf/type/__package_pkg_openbsd/man.text @@ -1,6 +1,6 @@ cdist-type__package_pkg(7) ============================= -Andreas Brönnimann +Andi Brönnimann NAME @@ -16,7 +16,7 @@ This type is usually used on OpenBSD to manage packages. REQUIRED PARAMETERS ------------------- state:: - Either "installed" or "uninstalled". + Either "installed" or "removed". OPTIONAL PARAMETERS @@ -42,7 +42,7 @@ __package_pkg_openbsd vim --state installed --flavor no_x11 __package_pkg_openbsd python --state installed --name python2 # Remove obsolete package -__package_pkg_openbsd puppet --state uninstalled +__package_pkg_openbsd puppet --state removed -------------------------------------------------------------------------------- From dcd96c04d40b3aed414c94fae0c327d26135fbeb Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 5 Apr 2011 23:27:51 +0200 Subject: [PATCH 1176/6109] explicitly delete generated cdist-reference.text man page Signed-off-by: Steven Armstrong --- build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sh b/build.sh index 2df76539..e033c007 100755 --- a/build.sh +++ b/build.sh @@ -99,6 +99,7 @@ case "$1" in ;; clean) + rm -f ${MAN7DSTDIR}/cdist-reference.text find "${MANDIR}" -mindepth 2 -type l \ -o -name "*.1" \ -o -name "*.7" \ From d3a376545f291d72323659930a8ee3bac4e0bf27 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 09:32:11 +0200 Subject: [PATCH 1177/6109] generate new type listing Signed-off-by: Nico Schottelius --- doc/man/cdist-reference.text.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/man/cdist-reference.text.sh b/doc/man/cdist-reference.text.sh index be9c3bbf..67e16989 100755 --- a/doc/man/cdist-reference.text.sh +++ b/doc/man/cdist-reference.text.sh @@ -21,6 +21,8 @@ # Generate manpage that lists available types # +FIXME: __ breaks again in asciidoc! + __cdist_pwd="$(pwd -P)" __cdist_mydir="${0%/*}"; __cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" @@ -133,12 +135,15 @@ tmp_dir:: TYPES ----- The following types are available: + eof for type in man7/cdist-type__*.text; do - name_1="${type#man7/}"; man="${name_1%.text}(7)" - name_2="${name_1%.7}"; - name="$name_2" + no_dir="${type#man7/}"; + no_type="${no_dir#cdist-type}"; + name="${no_type%.text}"; + man="${no_dir%.text}(7)" + echo "- $name" "($man)" done From 7496639e1fbba99fe98a38916eaffb7541c8346b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 13:56:16 +0200 Subject: [PATCH 1178/6109] add template for cdist-mass-deploy Signed-off-by: Nico Schottelius --- bin/cdist-mass-deploy | 56 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 bin/cdist-mass-deploy diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy new file mode 100755 index 00000000..dab5d9a5 --- /dev/null +++ b/bin/cdist-mass-deploy @@ -0,0 +1,56 @@ +#!/bin/sh +# +# 2010-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 . +# +# +# Deploy configuration to a host +# + +. cdist-config +[ $# -eq 1 ] || __cdist_usage "" +set -eu + +__cdist_target_host="$1" + +# Make target host available for non-core +export $__cdist_name_var_target_host="$__cdist_target_host" +export $__cdist_name_var_target_user="$__cdist_remote_user" + +# Export variables for core, which others do not reset +export __cdist_local_base_dir + +echo "cdist $__cdist_version: Configuring $__cdist_target_host" + +################################################################################ +# See cdist-stages(7) +# + +# Prepare local and remote directories +__cdist_init_deploy "$__cdist_target_host" + +# Transfer cdist executables +echo "Transferring cdist binaries to $__cdist_target_host ..." +cdist-dir push "$__cdist_target_host" \ + "${__cdist_abs_mydir}" "${__cdist_remote_bin_dir}" +cdist-explorer-run-global "$__cdist_target_host" +cdist-manifest-run-init "$__cdist_target_host" +cdist-object-all "$__cdist_target_host" cdist-object-prepare +cdist-object-all "$__cdist_target_host" cdist-object-run +cdist-cache "$__cdist_target_host" + +echo "cdist $__cdist_version: Successfully finished run on $__cdist_target_host" From e84ab9e14c4d86209c3bc63ec7ad177eca83f5ed Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 13:58:00 +0200 Subject: [PATCH 1179/6109] in theory finish cdist-mass-deploy Signed-off-by: Nico Schottelius --- bin/cdist-mass-deploy | 39 +++++++-------------------------------- 1 file changed, 7 insertions(+), 32 deletions(-) diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy index dab5d9a5..3adb166c 100755 --- a/bin/cdist-mass-deploy +++ b/bin/cdist-mass-deploy @@ -1,6 +1,6 @@ #!/bin/sh # -# 2010-2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -18,39 +18,14 @@ # along with cdist. If not, see . # # -# Deploy configuration to a host +# Deploy configuration to many hosts # . cdist-config -[ $# -eq 1 ] || __cdist_usage "" +[ $# -lt 1 ] || __cdist_usage " [target host ...]" set -eu -__cdist_target_host="$1" - -# Make target host available for non-core -export $__cdist_name_var_target_host="$__cdist_target_host" -export $__cdist_name_var_target_user="$__cdist_remote_user" - -# Export variables for core, which others do not reset -export __cdist_local_base_dir - -echo "cdist $__cdist_version: Configuring $__cdist_target_host" - -################################################################################ -# See cdist-stages(7) -# - -# Prepare local and remote directories -__cdist_init_deploy "$__cdist_target_host" - -# Transfer cdist executables -echo "Transferring cdist binaries to $__cdist_target_host ..." -cdist-dir push "$__cdist_target_host" \ - "${__cdist_abs_mydir}" "${__cdist_remote_bin_dir}" -cdist-explorer-run-global "$__cdist_target_host" -cdist-manifest-run-init "$__cdist_target_host" -cdist-object-all "$__cdist_target_host" cdist-object-prepare -cdist-object-all "$__cdist_target_host" cdist-object-run -cdist-cache "$__cdist_target_host" - -echo "cdist $__cdist_version: Successfully finished run on $__cdist_target_host" +while [ $# -ge 1 ]; do + cdist-deploy-to "$1" + shift +done From 32c261293488196dc8f5c28c3fcc0d9bad46452e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 13:59:34 +0200 Subject: [PATCH 1180/6109] ge vs lt Signed-off-by: Nico Schottelius --- bin/cdist-mass-deploy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy index 3adb166c..84e4376d 100755 --- a/bin/cdist-mass-deploy +++ b/bin/cdist-mass-deploy @@ -22,7 +22,7 @@ # . cdist-config -[ $# -lt 1 ] || __cdist_usage " [target host ...]" +[ $# -ge 1 ] || __cdist_usage " [target host ...]" set -eu while [ $# -ge 1 ]; do From 86a6b10ae9dcb2386154e2ba1feb19529f4e2c6b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 14:00:41 +0200 Subject: [PATCH 1181/6109] more stuff for the next wonderful release Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index 9672814f..0ba6b2f0 100644 --- a/doc/changelog +++ b/doc/changelog @@ -9,6 +9,7 @@ * Removed --preseed support from __package_apt * explorer/os: gained Fedora support * Simplified types __user and __group + * New helper binary: cdist-mass-deploy 1.5.0: 2011-04-01 * Add basic cache functionality From b9ef12b48d20c284e3cbf986f7ba4ec824a7ee81 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 14:05:47 +0200 Subject: [PATCH 1182/6109] enhance cdist-mass-deploy and add parallel execution Signed-off-by: Nico Schottelius --- bin/cdist-mass-deploy | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy index 84e4376d..f5790c03 100755 --- a/bin/cdist-mass-deploy +++ b/bin/cdist-mass-deploy @@ -22,10 +22,25 @@ # . cdist-config -[ $# -ge 1 ] || __cdist_usage " [target host ...]" +[ $# -ge 1 ] || __cdist_usage "[-p] [target host ...]" set -eu +if [ "$1" = "-p" ]; then + parallel=yes +else + parallel="" +fi + while [ $# -ge 1 ]; do - cdist-deploy-to "$1" + if [ "$parallel" ]; then + cdist-deploy-to "$1" & + else + cdist-deploy-to "$1" + fi shift done + +if [ "$parallel" ]; then + echo "Waiting for cdist-deploy-to jobs to finish..." + wait +fi From 5aa32fa42d042e82dc9a69f26ac8fba18ba27f2b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 14:16:33 +0200 Subject: [PATCH 1183/6109] beautify parallel mode Signed-off-by: Nico Schottelius --- bin/cdist-mass-deploy | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy index f5790c03..f3e526cc 100755 --- a/bin/cdist-mass-deploy +++ b/bin/cdist-mass-deploy @@ -25,21 +25,22 @@ [ $# -ge 1 ] || __cdist_usage "[-p] [target host ...]" set -eu +parallel="" if [ "$1" = "-p" ]; then parallel=yes -else - parallel="" + shift fi while [ $# -ge 1 ]; do - if [ "$parallel" ]; then - cdist-deploy-to "$1" & - else - cdist-deploy-to "$1" - fi + # always assume we run parallel + cdist-deploy-to "$1" | awk -v host=$1 '{ print "[" host "]" $0 }"' & shift + + # if not, wait for it _now_ + [ "$parallel" ] || fg done +# else wait after all are started if [ "$parallel" ]; then echo "Waiting for cdist-deploy-to jobs to finish..." wait From 75509dc8a53396dc3af2fb839e0c0163e1b98f9a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 14:18:14 +0200 Subject: [PATCH 1184/6109] PLUS whitespace (not only, but also for Steven) Signed-off-by: Nico Schottelius --- bin/cdist-mass-deploy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy index f3e526cc..1bd6939e 100755 --- a/bin/cdist-mass-deploy +++ b/bin/cdist-mass-deploy @@ -33,7 +33,7 @@ fi while [ $# -ge 1 ]; do # always assume we run parallel - cdist-deploy-to "$1" | awk -v host=$1 '{ print "[" host "]" $0 }"' & + cdist-deploy-to "$1" | awk -v host=$1 '{ print "[" host "] " $0 }' & shift # if not, wait for it _now_ From 1973ac0787d70f4b164a0f3349a2965c2621ecca Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 14:22:44 +0200 Subject: [PATCH 1185/6109] use wait instead of fg Signed-off-by: Nico Schottelius --- bin/cdist-mass-deploy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy index 1bd6939e..2753bcab 100755 --- a/bin/cdist-mass-deploy +++ b/bin/cdist-mass-deploy @@ -37,7 +37,7 @@ while [ $# -ge 1 ]; do shift # if not, wait for it _now_ - [ "$parallel" ] || fg + [ "$parallel" ] || wait done # else wait after all are started From 7e1b7614b1b07acacc578a430f5040daf5e8bc5a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 14:44:19 +0200 Subject: [PATCH 1186/6109] finish manpage for cdist-mass-deploy Signed-off-by: Nico Schottelius --- doc/man/man1/cdist-mass-deploy.text | 41 +++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 doc/man/man1/cdist-mass-deploy.text diff --git a/doc/man/man1/cdist-mass-deploy.text b/doc/man/man1/cdist-mass-deploy.text new file mode 100644 index 00000000..ac495b21 --- /dev/null +++ b/doc/man/man1/cdist-mass-deploy.text @@ -0,0 +1,41 @@ +cdist-mass-deploy(1) +==================== +Nico Schottelius + + +NAME +---- +cdist-mass-deploy - Deploy configuration to many hosts + + +SYNOPSIS +-------- +cdist-mass-deploy [-p] HOSTNAME [HOSTNAME ...] + + +DESCRIPTION +----------- +cdist-mass-deploy is essentially a wrapper around cdist-deploy-to to +be able to deploy to many hosts on one command line. + + +EXAMPLES +-------- +Deploy in parallel to all hosts specfied in the dsh group configuration ikr, +which is prefixed by "root@": + +-------------------------------------------------------------------------------- +cdist-mass-deploy -p $(cat ~/.dsh/group/ikr | sed 's/^root@//') +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist(7) +- cdist-deploy-to(1) + + +COPYING +------- +Copyright \(C) 2010-2011 Nico Schottelius. Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). From 9c1d6061616af161fc9343a0c59be80201840cac Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 14:47:39 +0200 Subject: [PATCH 1187/6109] -fixme, __ issue needs to be fixed globally Signed-off-by: Nico Schottelius --- doc/man/cdist-reference.text.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/man/cdist-reference.text.sh b/doc/man/cdist-reference.text.sh index 67e16989..51ae2a55 100755 --- a/doc/man/cdist-reference.text.sh +++ b/doc/man/cdist-reference.text.sh @@ -21,8 +21,6 @@ # Generate manpage that lists available types # -FIXME: __ breaks again in asciidoc! - __cdist_pwd="$(pwd -P)" __cdist_mydir="${0%/*}"; __cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)" From 4aa0d803109f52054d97e5e65dd1c1a4d79b1dfa Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 19:36:57 +0200 Subject: [PATCH 1188/6109] prepare files for 1.6.0 release Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 +- doc/changelog | 2 +- doc/dev/todo/1.6 | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 doc/dev/todo/1.6 diff --git a/bin/cdist-config b/bin/cdist-config index e1e82f28..96de4664 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -19,7 +19,7 @@ # # -__cdist_version="1.6.0pre" +__cdist_version="1.6.0" # Fail if something bogus is going on set -u diff --git a/doc/changelog b/doc/changelog index 0ba6b2f0..9dda1806 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,4 +1,4 @@ -1.6.0: +1.6.0: 2011-04-06 * New Type __package_yum * New type __debconf_set_selections * New explorer os_version diff --git a/doc/dev/todo/1.6 b/doc/dev/todo/1.6 deleted file mode 100644 index 12a83e93..00000000 --- a/doc/dev/todo/1.6 +++ /dev/null @@ -1,3 +0,0 @@ -Documentation: - - update stages - - go through all manpages and ensure __ and co are correct From 4165b4fe15605d0fddac6f998b9d8d11e4dd1c75 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 19:40:42 +0200 Subject: [PATCH 1189/6109] rephrase introduction Signed-off-by: Nico Schottelius --- README | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README b/README index 52471068..54f792a7 100644 --- a/README +++ b/README @@ -15,17 +15,16 @@ "P' "" "" -[[!toc levels=2]] +[[!toc levels=2]] ## Introduction -cdist configures your system and is similar to -other configuration management systems like +cdist is an alternative to other configuration management systems like [cfengine](http://www.cfengine.org/), [bcfg2](http://trac.mcs.anl.gov/projects/bcfg2), [chef](http://wiki.opscode.com/display/chef/) -and [puppet](http://www.puppetlabs.com/), but it ticks differently. -Here are some features that makes it unique: +and [puppet](http://www.puppetlabs.com/). +But cdist ticks differently, here is the feature set that makes it unique: [[!table data=""" Keywords | Description From 723046fdd2756bd7a3ed4905b71b3bca40f654d9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:00:36 +0200 Subject: [PATCH 1190/6109] introduce and use __cdist_echo Signed-off-by: Nico Schottelius --- bin/cdist-config | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 96de4664..efb8c3c0 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -148,22 +148,37 @@ __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") ################################################################################ # Internal functions # -__cdist_debug_echo() +__cdist_echo() { - if [ "$__cdist_debug" ]; then - echo "Debug: $@" - fi + __cdist_echo_type="$1"; shift + + case "$__cdist_echo_type" in + debug) + if [ "$__cdist_debug" ]; then + echo "Debug: $@" + fi + ;; + info) + echo "$@" + ;; + error) + echo "Error: $@" >&2 + ;; + esac } __cdist_exec_fail_on_error() { sh -e "$@" - [ "$?" -eq 0 ] || __cdist_exit_err "$1 exited non-zero." + if [ "$?" -ne 0 ]; then + __cdist_echo error "$1 exited non-zero." + __cdist_exit_err "$1 exited non-zero." + fi } __cdist_exit_err() { - echo "Error: $@" >&2 + __cdist_echo error "$@" exit 1 } From aad8070d266b4efa68310c9151b6ba8bab1e0b55 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:00:53 +0200 Subject: [PATCH 1191/6109] todo/nico++ Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 1f01ff44..5df1cb61 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,3 +1,5 @@ +Introduce better logging + Cleanup documentation: type reference -> add types + manpages add explorer reference From 90f5d4716445cdfc6adc18d210344508dfb494ee Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:04:34 +0200 Subject: [PATCH 1192/6109] add warning level Signed-off-by: Nico Schottelius --- bin/cdist-config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/cdist-config b/bin/cdist-config index efb8c3c0..8195a304 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -161,6 +161,9 @@ __cdist_echo() info) echo "$@" ;; + warning) + echo "Warning: $@" + ;; error) echo "Error: $@" >&2 ;; From 08d18ec1ec029307e988a63137eefe38675226a3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:05:58 +0200 Subject: [PATCH 1193/6109] show broken code Signed-off-by: Nico Schottelius --- bin/cdist-config | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 8195a304..b5e1fe10 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -174,8 +174,9 @@ __cdist_exec_fail_on_error() { sh -e "$@" if [ "$?" -ne 0 ]; then - __cdist_echo error "$1 exited non-zero." - __cdist_exit_err "$1 exited non-zero." + __cdist_echo error "$1 exited non-zero, showing code:" + cat "$1" + __cdist_exit_err "Aborting due to non-zero exit code." fi } From 813b4e1f2be440b960c90c28e7bf62c7c8cc4ca7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:11:39 +0200 Subject: [PATCH 1194/6109] use __cdist_exec_fail_on_error in bin/cdist-code-run Signed-off-by: Nico Schottelius --- bin/cdist-code-run | 2 +- bin/cdist-config | 12 ++++++++---- bin/cdist-object-code-run | 6 ++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/bin/cdist-code-run b/bin/cdist-code-run index 54cb312f..cf7e8e8d 100755 --- a/bin/cdist-code-run +++ b/bin/cdist-code-run @@ -40,7 +40,7 @@ if [ -e "$code" ]; then if [ -f "$code" ]; then if [ -x "$code" ]; then echo "Executing code-${__cdist_gencode_type} for $__cdist_object ..." - "$code" + __cdist_exec_fail_on_error "$code" else __cdist_exit_err "$code exists, but is not executable." fi diff --git a/bin/cdist-config b/bin/cdist-config index b5e1fe10..8678d205 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -152,20 +152,24 @@ __cdist_echo() { __cdist_echo_type="$1"; shift + if [ "$__cdist_object_self" ]; then + __cdist_echo_prefix="$__cdist_object_self" + fi + case "$__cdist_echo_type" in debug) if [ "$__cdist_debug" ]; then - echo "Debug: $@" + echo $__cdist_echo_prefix "Debug: $@" fi ;; info) - echo "$@" + echo $__cdist_echo_prefix "$@" ;; warning) - echo "Warning: $@" + echo $__cdist_echo_prefix "Warning: $@" ;; error) - echo "Error: $@" >&2 + echo $__cdist_echo_prefix "Error: $@" >&2 ;; esac } diff --git a/bin/cdist-object-code-run b/bin/cdist-object-code-run index 97cb58ac..fa63aaba 100755 --- a/bin/cdist-object-code-run +++ b/bin/cdist-object-code-run @@ -31,10 +31,8 @@ __cdist_object="$1"; shift # Code local export __cdist_out_object_dir="$__cdist_out_object_dir" -cdist-code-run "$__cdist_object" "${__cdist_name_gencode_local}" \ - || __cdist_exit_err "Local code failed for $__cdist_object" +cdist-code-run "$__cdist_object" "${__cdist_name_gencode_local}" # Code remote cdist-run-remote "$__cdist_target_host" \ - "cdist-code-run" "$__cdist_object" "${__cdist_name_gencode_remote}" \ - || __cdist_exit_err "Remote code failed for $__cdist_object" + "cdist-code-run" "$__cdist_object" "${__cdist_name_gencode_remote}" From d31833a78ebe1f23062b4729edaeb02fcb5ce62a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:16:16 +0200 Subject: [PATCH 1195/6109] begin use of __cdist_echo Signed-off-by: Nico Schottelius --- bin/cdist-code-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-code-run b/bin/cdist-code-run index cf7e8e8d..3259fb1b 100755 --- a/bin/cdist-code-run +++ b/bin/cdist-code-run @@ -34,7 +34,7 @@ fi code="$(__cdist_object_code "$__cdist_object")-${__cdist_gencode_type}" -echo "Checking code-${__cdist_gencode_type} for $__cdist_object ..." +__cdist_echo info "Checking code-${__cdist_gencode_type}" if [ -e "$code" ]; then if [ -f "$code" ]; then From e28923558920bbe9bb8461c1710c00a1318c8131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Br=C3=B6nnimann?= Date: Wed, 6 Apr 2011 20:16:36 +0200 Subject: [PATCH 1196/6109] Fix typo --- conf/type/__package_pkg_openbsd/man.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__package_pkg_openbsd/man.text b/conf/type/__package_pkg_openbsd/man.text index 32501ba8..c0fae241 100644 --- a/conf/type/__package_pkg_openbsd/man.text +++ b/conf/type/__package_pkg_openbsd/man.text @@ -25,7 +25,7 @@ name:: If supplied, use the name and not the object id as the package name. flavor:: - If supplied, use to avoid ambigous + If supplied, use to avoid ambiguity. EXAMPLES From 3c7a226e0f256f0e825feb1d85b326ffbaf21c3f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:17:00 +0200 Subject: [PATCH 1197/6109] stuff for 1.6.1 Signed-off-by: Nico Schottelius --- doc/changelog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/changelog b/doc/changelog index 9dda1806..0ca26837 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,3 +1,6 @@ +1.6.1: + * Logging restructured + 1.6.0: 2011-04-06 * New Type __package_yum * New type __debconf_set_selections From a23c926df75749b18dca1f90e199600f1cd79bfd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:17:28 +0200 Subject: [PATCH 1198/6109] add reference to cdist-mass-deploy in cdist-deploy-to manpage Signed-off-by: Nico Schottelius --- doc/man/man1/cdist-deploy-to.text | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/man/man1/cdist-deploy-to.text b/doc/man/man1/cdist-deploy-to.text index 93417a77..f42a0509 100644 --- a/doc/man/man1/cdist-deploy-to.text +++ b/doc/man/man1/cdist-deploy-to.text @@ -32,6 +32,7 @@ SEE ALSO -------- - cdist(7) - cdist-config(1) +- cdist-mass-deploy(1) - cdist-reference(7) - cdist-stages(7) From e4390da300a87ce4a97ed18985145b2b4adaf41b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:18:31 +0200 Subject: [PATCH 1199/6109] requiring set +e in __cdist_exec_fail_on_error to catch error ourselves Signed-off-by: Nico Schottelius --- bin/cdist-config | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/cdist-config b/bin/cdist-config index 8678d205..82d94753 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -176,6 +176,7 @@ __cdist_echo() __cdist_exec_fail_on_error() { + set +e sh -e "$@" if [ "$?" -ne 0 ]; then __cdist_echo error "$1 exited non-zero, showing code:" From e5d8843eddd5b961c5d9ef9c4da06a1908e0d393 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:21:36 +0200 Subject: [PATCH 1200/6109] [DOC] add hint on FIXME tag Signed-off-by: Nico Schottelius --- doc/man/man7/cdist-hacker.text | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/man/man7/cdist-hacker.text b/doc/man/man7/cdist-hacker.text index 03a348ed..27f92a4a 100644 --- a/doc/man/man7/cdist-hacker.text +++ b/doc/man/man7/cdist-hacker.text @@ -27,6 +27,11 @@ read the scripts bin/cdist-deploy-to calls. The magnificent HACKERS_README may be of great help as well. +CODING CONVENTIONS (EVERYWHERE) +------------------------------- +If something should be better done or needs to fixed, add the word FIXME +nearby, so grepping for FIXME gives all positions that need to be fixed. + CODING CONVENTIONS (CORE) ------------------------- - All variables exported by cdist are prefixed with a double underscore (__) From a4933344311c47dea957396a1da4800c8011ad51 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:24:01 +0200 Subject: [PATCH 1201/6109] [DOC] fixup manpage for type __package_pkg_openbsd Signed-off-by: Nico Schottelius --- conf/type/__package_pkg_openbsd/man.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__package_pkg_openbsd/man.text b/conf/type/__package_pkg_openbsd/man.text index c0fae241..98aeaccf 100644 --- a/conf/type/__package_pkg_openbsd/man.text +++ b/conf/type/__package_pkg_openbsd/man.text @@ -1,5 +1,5 @@ cdist-type__package_pkg(7) -============================= +========================== Andi Brönnimann From a76a9970a6c45e948ec4edb27bdb35acfb4e625f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:24:18 +0200 Subject: [PATCH 1202/6109] more stuff for 1.6.1 Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index 0ca26837..eb3f2184 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,5 +1,6 @@ 1.6.1: * Logging restructured + * New Type __package_pkg_openbsd 1.6.0: 2011-04-06 * New Type __package_yum From e3f27f1794e5b1cbae87055ce751c470a4be57d3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:31:19 +0200 Subject: [PATCH 1203/6109] allow empty $__cdist_object_self Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/cdist-config b/bin/cdist-config index 82d94753..a19fdc01 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -152,9 +152,11 @@ __cdist_echo() { __cdist_echo_type="$1"; shift + set +u if [ "$__cdist_object_self" ]; then __cdist_echo_prefix="$__cdist_object_self" fi + set -u case "$__cdist_echo_type" in debug) From 290915ee647c8451066b1abba6cdb572be7b9827 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:34:07 +0200 Subject: [PATCH 1204/6109] __cdist_echo++ Signed-off-by: Nico Schottelius --- bin/cdist-cache | 2 +- bin/cdist-deploy-to | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/cdist-cache b/bin/cdist-cache index f9480162..5ba51442 100755 --- a/bin/cdist-cache +++ b/bin/cdist-cache @@ -32,6 +32,6 @@ __cdist_ddir="$(__cdist_host_cache_dir "$__cdist_target_host")" # Create base to move into mkdir -p "$(__cdist_cache_dir)" -echo "Saving cache to $__cdist_ddir ..." +__cdist_echo info "Saving cache to $__cdist_ddir ..." rm -rf "$__cdist_ddir" mv "$__cdist_local_base_dir" "$__cdist_ddir" diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index dab5d9a5..ddb36fca 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -34,7 +34,7 @@ export $__cdist_name_var_target_user="$__cdist_remote_user" # Export variables for core, which others do not reset export __cdist_local_base_dir -echo "cdist $__cdist_version: Configuring $__cdist_target_host" +__cdist_echo info "cdist $__cdist_version: Configuring $__cdist_target_host ..." ################################################################################ # See cdist-stages(7) @@ -44,7 +44,7 @@ echo "cdist $__cdist_version: Configuring $__cdist_target_host" __cdist_init_deploy "$__cdist_target_host" # Transfer cdist executables -echo "Transferring cdist binaries to $__cdist_target_host ..." +__cdist_echo info "Transferring cdist binaries to the target host ..." cdist-dir push "$__cdist_target_host" \ "${__cdist_abs_mydir}" "${__cdist_remote_bin_dir}" cdist-explorer-run-global "$__cdist_target_host" @@ -53,4 +53,4 @@ cdist-object-all "$__cdist_target_host" cdist-object-prepare cdist-object-all "$__cdist_target_host" cdist-object-run cdist-cache "$__cdist_target_host" -echo "cdist $__cdist_version: Successfully finished run on $__cdist_target_host" +__cdist_echo info "cdist $__cdist_version: Successfully finished run" From 9d5d0b8cdd9b0572bcda496079e6e6ff0a7b2fca Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:34:46 +0200 Subject: [PATCH 1205/6109] always setup __cdist_echo_prefix Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/cdist-config b/bin/cdist-config index a19fdc01..755a3e60 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -155,6 +155,8 @@ __cdist_echo() set +u if [ "$__cdist_object_self" ]; then __cdist_echo_prefix="$__cdist_object_self" + else + __cdist_echo_prefix="" fi set -u From f08a9eaaa93f0624785382906000461de252bff1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:35:27 +0200 Subject: [PATCH 1206/6109] +: after object_self 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 755a3e60..ba45e927 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -154,7 +154,7 @@ __cdist_echo() set +u if [ "$__cdist_object_self" ]; then - __cdist_echo_prefix="$__cdist_object_self" + __cdist_echo_prefix="${__cdist_object_self}:" else __cdist_echo_prefix="" fi From d000de2be904d4c947a693584da9e70c62dcf073 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:36:21 +0200 Subject: [PATCH 1207/6109] code, not gencode Signed-off-by: Nico Schottelius --- bin/cdist-code-run | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/cdist-code-run b/bin/cdist-code-run index 3259fb1b..2aeefddd 100755 --- a/bin/cdist-code-run +++ b/bin/cdist-code-run @@ -26,20 +26,20 @@ set -ue __cdist_object="$1"; shift -__cdist_gencode_type="$1"; shift +__cdist_code_type="$1"; shift if [ ! -d "$(__cdist_object_dir "$__cdist_object")" ]; then __cdist_exit_err "Object $__cdist_object is missing." fi -code="$(__cdist_object_code "$__cdist_object")-${__cdist_gencode_type}" +code="$(__cdist_object_code "$__cdist_object")-${__cdist_code_type}" -__cdist_echo info "Checking code-${__cdist_gencode_type}" +__cdist_echo info "Checking code-${__cdist_code_type}" if [ -e "$code" ]; then if [ -f "$code" ]; then if [ -x "$code" ]; then - echo "Executing code-${__cdist_gencode_type} for $__cdist_object ..." + echo "Executing code-${__cdist_code_type} for $__cdist_object ..." __cdist_exec_fail_on_error "$code" else __cdist_exit_err "$code exists, but is not executable." From d75f2d4d29cfa2f7e84aff29dee896fbbc1e3703 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:38:31 +0200 Subject: [PATCH 1208/6109] ++__cdist_echo Signed-off-by: Nico Schottelius --- bin/cdist-code-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-code-run b/bin/cdist-code-run index 2aeefddd..8a121a08 100755 --- a/bin/cdist-code-run +++ b/bin/cdist-code-run @@ -39,7 +39,7 @@ __cdist_echo info "Checking code-${__cdist_code_type}" if [ -e "$code" ]; then if [ -f "$code" ]; then if [ -x "$code" ]; then - echo "Executing code-${__cdist_code_type} for $__cdist_object ..." + __cdist_echo info "Executing code-${__cdist_code_type}" __cdist_exec_fail_on_error "$code" else __cdist_exit_err "$code exists, but is not executable." From 9610dbf10f53f247485dcb52fbb59ef6cee5c85f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:40:18 +0200 Subject: [PATCH 1209/6109] __debconf_set_selections: cat the file referenced, not the parameter! Signed-off-by: Nico Schottelius --- conf/type/__debconf_set_selections/gencode-remote | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__debconf_set_selections/gencode-remote b/conf/type/__debconf_set_selections/gencode-remote index 156fc9f3..62be6a12 100755 --- a/conf/type/__debconf_set_selections/gencode-remote +++ b/conf/type/__debconf_set_selections/gencode-remote @@ -22,5 +22,5 @@ # echo "debconf-set-selections << __file-eof" -cat "$__object/parameter/file" +cat "$(cat "$__object/parameter/file")" echo "__file-eof" From af0afcb55fdd395e7f9982065a40c5ed6b0c8c82 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:41:25 +0200 Subject: [PATCH 1210/6109] 1.6.1 contains __debconf_set_selections bugfix Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index eb3f2184..7b4052c2 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,6 +1,7 @@ 1.6.1: * Logging restructured * New Type __package_pkg_openbsd + * Bugfix: Type __debconf_set_selections used wrong contens for selection 1.6.0: 2011-04-06 * New Type __package_yum From cc67dfbfa1c32ddcbc4c45a7685d5b76c1db0cae Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:44:20 +0200 Subject: [PATCH 1211/6109] improved logging Signed-off-by: Nico Schottelius --- doc/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog b/doc/changelog index 7b4052c2..edc797b9 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,5 +1,5 @@ 1.6.1: - * Logging restructured + * Improved logging: Show code responsible for abort * New Type __package_pkg_openbsd * Bugfix: Type __debconf_set_selections used wrong contens for selection From 88a6ee385b87f31e1ce550742e87827296ceb106 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:46:21 +0200 Subject: [PATCH 1212/6109] always use uname -m, until it breaks Signed-off-by: Nico Schottelius --- conf/explorer/hardware_type | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/conf/explorer/hardware_type b/conf/explorer/hardware_type index 5966b11e..25fc76a9 100755 --- a/conf/explorer/hardware_type +++ b/conf/explorer/hardware_type @@ -22,10 +22,4 @@ # # -os="$($__explorer/os)" - -case "$os" in - archlinux|*bsd) - echo $(uname -m) - ;; -esac +uname -m From d0434ea56b70e4c62886fdd3c002990499c3275b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:46:40 +0200 Subject: [PATCH 1213/6109] 1.6.1++ Signed-off-by: Nico Schottelius --- bin/cdist-explorer-run-global | 2 +- doc/changelog | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cdist-explorer-run-global b/bin/cdist-explorer-run-global index 7a06a982..4b901964 100755 --- a/bin/cdist-explorer-run-global +++ b/bin/cdist-explorer-run-global @@ -27,7 +27,7 @@ set -ue __cdist_target_host="$1"; shift -echo "Running global explorers ..." +__cdist_info "Running global explorers ..." # copy the explorers cdist-dir push "$__cdist_target_host" \ diff --git a/doc/changelog b/doc/changelog index edc797b9..5f47e19f 100644 --- a/doc/changelog +++ b/doc/changelog @@ -2,6 +2,7 @@ * Improved logging: Show code responsible for abort * New Type __package_pkg_openbsd * Bugfix: Type __debconf_set_selections used wrong contens for selection + * New explorer: hardware_type 1.6.0: 2011-04-06 * New Type __package_yum From cb5fc962b3d11f69c82583e110df516baad44f3b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:50:09 +0200 Subject: [PATCH 1214/6109] use __cdist prefix Signed-off-by: Nico Schottelius --- bin/cdist-object-explorer-run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-object-explorer-run b/bin/cdist-object-explorer-run index 4d8e2321..49480bfd 100755 --- a/bin/cdist-object-explorer-run +++ b/bin/cdist-object-explorer-run @@ -29,7 +29,7 @@ set -eu __cdist_target_host="$1"; shift __cdist_object="$1"; shift -__object_id="$(__cdist_object_id_from_object "$__cdist_object")" +__cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")" __cdist_type="$(__cdist_type_from_object "$__cdist_object")" # Check if type of object has >= 1 explorer @@ -53,7 +53,7 @@ if [ "$__cdist_has_explorer" ]; then # Execute explorers cdist-run-remote "$__cdist_target_host" \ "$__cdist_name_var_object=\"$(__cdist_remote_object_dir "$__cdist_object")\"" \ - "$__cdist_name_var_object_id=\"$__object_id\"" \ + "$__cdist_name_var_object_id=\"$__cdist_object_id\" \ "$__cdist_name_var_self=\"$__cdist_object\"" \ cdist-remote-explorer-run \ "$__cdist_name_var_type_explorer" \ From ec513eae49ad3a13c6758ee8664fc6dd9ee84b33 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:51:17 +0200 Subject: [PATCH 1215/6109] ++__cdist_echo Signed-off-by: Nico Schottelius --- bin/cdist-manifest-run-init | 2 +- bin/cdist-mass-deploy | 2 +- bin/cdist-object-explorer-run | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/cdist-manifest-run-init b/bin/cdist-manifest-run-init index 9f10c12c..da7af6ba 100755 --- a/bin/cdist-manifest-run-init +++ b/bin/cdist-manifest-run-init @@ -30,5 +30,5 @@ __cdist_target_host="$1"; shift eval export $__cdist_name_var_manifest=\"\$__cdist_manifest_dir\" -echo "Running initial manifest for $__cdist_target_host ..." +__cdist_echo info "Running initial manifest for $__cdist_target_host ..." cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest_init" diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy index 2753bcab..fae9e633 100755 --- a/bin/cdist-mass-deploy +++ b/bin/cdist-mass-deploy @@ -42,6 +42,6 @@ done # else wait after all are started if [ "$parallel" ]; then - echo "Waiting for cdist-deploy-to jobs to finish..." + __cdist_echo info "Waiting for cdist-deploy-to jobs to finish..." wait fi diff --git a/bin/cdist-object-explorer-run b/bin/cdist-object-explorer-run index 49480bfd..1e0fc36f 100755 --- a/bin/cdist-object-explorer-run +++ b/bin/cdist-object-explorer-run @@ -31,6 +31,7 @@ __cdist_object="$1"; shift __cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")" __cdist_type="$(__cdist_type_from_object "$__cdist_object")" +__cdist_object_self="$__cdist_type/$__cdist_object_id" # Check if type of object has >= 1 explorer __cdist_has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" From 8924a9583d4390c997ece244641ef1581d4e113e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:52:14 +0200 Subject: [PATCH 1216/6109] ++__cdist_echo Signed-off-by: Nico Schottelius --- bin/cdist-config | 4 ++++ bin/cdist-object-explorer-run | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/cdist-config b/bin/cdist-config index ba45e927..4bf08511 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -175,6 +175,10 @@ __cdist_echo() error) echo $__cdist_echo_prefix "Error: $@" >&2 ;; + *) + echo "CORE BUG, who created the broken commit?" >&2 + exit 23 + ;; esac } diff --git a/bin/cdist-object-explorer-run b/bin/cdist-object-explorer-run index 1e0fc36f..7a5068e4 100755 --- a/bin/cdist-object-explorer-run +++ b/bin/cdist-object-explorer-run @@ -40,7 +40,7 @@ if [ "$__cdist_has_explorer" ]; then if ! __cdist_type_explorer_pushed "$__cdist_type"; then src_dir="$(__cdist_type_explorer_dir "$__cdist_type")" dst_dir="$(__cdist_remote_type_explorer_dir "$__cdist_type")" - echo "Transfering explorers for $__cdist_type ..." + __cdist_echo info "Transfering explorers for $__cdist_type ..." cdist-dir push "$__cdist_target_host" "$src_dir" "$dst_dir" __cdist_type_explorer_pushed_add "$__cdist_type" fi From 1f4e8fe5648e8688d465304b2114800a4bc4b4eb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:54:34 +0200 Subject: [PATCH 1217/6109] do not create code if there is no gencode Signed-off-by: Nico Schottelius --- bin/cdist-object-gencode | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-object-gencode b/bin/cdist-object-gencode index 1ba1116b..465d6f1e 100755 --- a/bin/cdist-object-gencode +++ b/bin/cdist-object-gencode @@ -44,14 +44,14 @@ export __global="$__cdist_out_dir" cd "$__cdist_local_base_dir" -cat << eof +if [ -x "$gencode" ]; then + cat << eof # # The following code is imported from output of $gencode # eof -if [ -x "$gencode" ]; then __cdist_exec_fail_on_error "$gencode" else if [ -f "$gencode" ]; then From 2162d444b3fd211a26af3c282544c41168402681 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:55:53 +0200 Subject: [PATCH 1218/6109] better logging in __cdist_exec_fail_on_error Signed-off-by: Nico Schottelius --- bin/cdist-config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cdist-config b/bin/cdist-config index 4bf08511..789f41a8 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -187,7 +187,8 @@ __cdist_exec_fail_on_error() set +e sh -e "$@" if [ "$?" -ne 0 ]; then - __cdist_echo error "$1 exited non-zero, showing code:" + __cdist_echo error "$1 exited non-zero" + __cdist_echo info "Faulty code:" cat "$1" __cdist_exit_err "Aborting due to non-zero exit code." fi From caed694dee937a5302caf5416fb79bd9b22fd3d8 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:58:34 +0200 Subject: [PATCH 1219/6109] ++__cdist_echo + FIXME Signed-off-by: Nico Schottelius --- bin/cdist-object-explorer-run | 2 +- bin/cdist-object-gencode-run | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/cdist-object-explorer-run b/bin/cdist-object-explorer-run index 7a5068e4..b782de55 100755 --- a/bin/cdist-object-explorer-run +++ b/bin/cdist-object-explorer-run @@ -45,7 +45,7 @@ if [ "$__cdist_has_explorer" ]; then __cdist_type_explorer_pushed_add "$__cdist_type" fi - echo "Running explorers for $__cdist_object ..." + __cdist_echo info "Running explorers for $__cdist_object ..." # Copy object parameters cdist-dir push "$__cdist_target_host" \ "$(__cdist_object_parameter_dir "$__cdist_object")" \ diff --git a/bin/cdist-object-gencode-run b/bin/cdist-object-gencode-run index 4d21fec9..a24d78bc 100755 --- a/bin/cdist-object-gencode-run +++ b/bin/cdist-object-gencode-run @@ -32,11 +32,14 @@ __cdist_object="$1"; shift __cdist_code_local="$(__cdist_object_code "$__cdist_object")-${__cdist_name_gencode_local}" __cdist_code_remote="$(__cdist_object_code "$__cdist_object")-${__cdist_name_gencode_remote}" -echo "Generating local code for $__cdist_object ..." +# FIXME: check that no file is created if there is no gencode +# probably move output code to cdist-object-gencode + +__cdist_echo info "Generating local code for $__cdist_object ..." cdist-object-gencode "$__cdist_target_host" "$__cdist_object" \ "${__cdist_name_gencode_local}" > "${__cdist_code_local}" -echo "Generating remote code for $__cdist_object ..." +__cdist_echo info "Generating remote code for $__cdist_object ..." cdist-object-gencode "$__cdist_target_host" "$__cdist_object" \ "${__cdist_name_gencode_remote}" > "${__cdist_code_remote}" From a08bd18f4ec8b51fa7aea2df9385335a992ae2cc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 20:59:57 +0200 Subject: [PATCH 1220/6109] make first real use of new __cdist_echo with __cdist_object_self setup Signed-off-by: Nico Schottelius --- bin/cdist-object-gencode-run | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/bin/cdist-object-gencode-run b/bin/cdist-object-gencode-run index a24d78bc..375b7cc1 100755 --- a/bin/cdist-object-gencode-run +++ b/bin/cdist-object-gencode-run @@ -27,20 +27,19 @@ set -eu __cdist_target_host="$1"; shift -__cdist_object="$1"; shift +__cdist_object_self="$1"; shift -__cdist_code_local="$(__cdist_object_code "$__cdist_object")-${__cdist_name_gencode_local}" -__cdist_code_remote="$(__cdist_object_code "$__cdist_object")-${__cdist_name_gencode_remote}" +__cdist_code_local="$(__cdist_object_code "$__cdist_object_self")-${__cdist_name_gencode_local}" +__cdist_code_remote="$(__cdist_object_code "$__cdist_object_self")-${__cdist_name_gencode_remote}" # FIXME: check that no file is created if there is no gencode # probably move output code to cdist-object-gencode - -__cdist_echo info "Generating local code for $__cdist_object ..." -cdist-object-gencode "$__cdist_target_host" "$__cdist_object" \ +__cdist_echo info "Generating local code ..." +cdist-object-gencode "$__cdist_target_host" "$__cdist_object_self" \ "${__cdist_name_gencode_local}" > "${__cdist_code_local}" -__cdist_echo info "Generating remote code for $__cdist_object ..." -cdist-object-gencode "$__cdist_target_host" "$__cdist_object" \ +__cdist_echo info "Generating remote code ..." +cdist-object-gencode "$__cdist_target_host" "$__cdist_object_self" \ "${__cdist_name_gencode_remote}" > "${__cdist_code_remote}" chmod u+x "${__cdist_code_local}" "${__cdist_code_remote}" From dfd0eefb917018d5653c2641ddf762d292505ecd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:01:27 +0200 Subject: [PATCH 1221/6109] include version in html directory on web Signed-off-by: Nico Schottelius --- build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sh b/build.sh index e033c007..d94b7a5d 100755 --- a/build.sh +++ b/build.sh @@ -88,6 +88,7 @@ case "$1" in cp README ${WEBDIR}/${WEBPAGE} rm -rf ${WEBDIR}/${WEBBASE}/man && mkdir ${WEBDIR}/${WEBBASE}/man cp ${MAN1DSTDIR}/*.html ${MAN7DSTDIR}/*.html ${WEBDIR}/${WEBBASE}/man + git describe > ${WEBDIR}/${WEBBASE}/man/VERSION cd ${WEBDIR} && git add ${WEBBASE}/man cd ${WEBDIR} && git commit -m "cdist update" ${WEBBASE} ${WEBPAGE} cd ${WEBDIR} && make pub From df58c4e5f5a3d6e28899d9fc98bd5f1e71167268 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:03:37 +0200 Subject: [PATCH 1222/6109] echo, not info Signed-off-by: Nico Schottelius --- bin/cdist-explorer-run-global | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-explorer-run-global b/bin/cdist-explorer-run-global index 4b901964..17bc3d79 100755 --- a/bin/cdist-explorer-run-global +++ b/bin/cdist-explorer-run-global @@ -27,7 +27,7 @@ set -ue __cdist_target_host="$1"; shift -__cdist_info "Running global explorers ..." +__cdist_echo info "Running global explorers ..." # copy the explorers cdist-dir push "$__cdist_target_host" \ From 96c4024a51eaff1e16474fe636076fe90a91b0d5 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:07:39 +0200 Subject: [PATCH 1223/6109] bugfix + real use of __cdist_echo Signed-off-by: Nico Schottelius --- bin/cdist-object-explorer-run | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bin/cdist-object-explorer-run b/bin/cdist-object-explorer-run index b782de55..ac39755b 100755 --- a/bin/cdist-object-explorer-run +++ b/bin/cdist-object-explorer-run @@ -27,11 +27,10 @@ set -eu __cdist_target_host="$1"; shift -__cdist_object="$1"; shift +__cdist_object_self="$1"; shift __cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")" __cdist_type="$(__cdist_type_from_object "$__cdist_object")" -__cdist_object_self="$__cdist_type/$__cdist_object_id" # Check if type of object has >= 1 explorer __cdist_has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" @@ -45,7 +44,7 @@ if [ "$__cdist_has_explorer" ]; then __cdist_type_explorer_pushed_add "$__cdist_type" fi - __cdist_echo info "Running explorers for $__cdist_object ..." + __cdist_echo info "Running explorers ..." # Copy object parameters cdist-dir push "$__cdist_target_host" \ "$(__cdist_object_parameter_dir "$__cdist_object")" \ @@ -53,9 +52,9 @@ if [ "$__cdist_has_explorer" ]; then # Execute explorers cdist-run-remote "$__cdist_target_host" \ - "$__cdist_name_var_object=\"$(__cdist_remote_object_dir "$__cdist_object")\"" \ - "$__cdist_name_var_object_id=\"$__cdist_object_id\" \ - "$__cdist_name_var_self=\"$__cdist_object\"" \ + "$__cdist_name_var_object=\"$(__cdist_remote_object_dir "$__cdist_object_self")\"" \ + "$__cdist_name_var_object_id=\"$__cdist_object_id\"" \ + "$__cdist_name_var_self=\"$__cdist_object_self\"" \ cdist-remote-explorer-run \ "$__cdist_name_var_type_explorer" \ "$(__cdist_remote_type_explorer_dir "$__cdist_type")" \ From 0580406ff2d35fa4b7ca150f8c25004466adcad2 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:08:40 +0200 Subject: [PATCH 1224/6109] there is no __cdist_object in this context Signed-off-by: Nico Schottelius --- bin/cdist-object-explorer-run | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/cdist-object-explorer-run b/bin/cdist-object-explorer-run index ac39755b..ed001e83 100755 --- a/bin/cdist-object-explorer-run +++ b/bin/cdist-object-explorer-run @@ -29,8 +29,8 @@ set -eu __cdist_target_host="$1"; shift __cdist_object_self="$1"; shift -__cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")" -__cdist_type="$(__cdist_type_from_object "$__cdist_object")" +__cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object_self")" +__cdist_type="$(__cdist_type_from_object "$__cdist_object_self")" # Check if type of object has >= 1 explorer __cdist_has_explorer="$(__cdist_type_has_explorer "$__cdist_type")" @@ -47,8 +47,8 @@ if [ "$__cdist_has_explorer" ]; then __cdist_echo info "Running explorers ..." # Copy object parameters cdist-dir push "$__cdist_target_host" \ - "$(__cdist_object_parameter_dir "$__cdist_object")" \ - "$(__cdist_remote_object_parameter_dir "$__cdist_object")" + "$(__cdist_object_parameter_dir "$__cdist_object_self")" \ + "$(__cdist_remote_object_parameter_dir "$__cdist_object_self")" # Execute explorers cdist-run-remote "$__cdist_target_host" \ @@ -58,10 +58,10 @@ if [ "$__cdist_has_explorer" ]; then cdist-remote-explorer-run \ "$__cdist_name_var_type_explorer" \ "$(__cdist_remote_type_explorer_dir "$__cdist_type")" \ - "$(__cdist_remote_object_type_explorer_dir "$__cdist_object")" + "$(__cdist_remote_object_type_explorer_dir "$__cdist_object_self")" # Copy back results cdist-dir pull "$__cdist_target_host" \ - "$(__cdist_remote_object_type_explorer_dir "$__cdist_object")" \ - "$(__cdist_object_type_explorer_dir "$__cdist_object")" + "$(__cdist_remote_object_type_explorer_dir "$__cdist_object_self")" \ + "$(__cdist_object_type_explorer_dir "$__cdist_object_self")" fi From afdecb883686619cca5b39829a91745aa253b4e0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:10:34 +0200 Subject: [PATCH 1225/6109] ++__cdist_echo Signed-off-by: Nico Schottelius --- bin/cdist-object-manifest-run | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bin/cdist-object-manifest-run b/bin/cdist-object-manifest-run index ce44cbbc..56aec782 100755 --- a/bin/cdist-object-manifest-run +++ b/bin/cdist-object-manifest-run @@ -27,14 +27,15 @@ set -eu __cdist_target_host="$1"; shift -__cdist_object="$1"; shift +__cdist_object_self="$1"; shift -__cdist_cur_object_dir="$(__cdist_object_dir "$__cdist_object")" -__cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")" +# FIXME: rename to __cdist_object_dir (everywhere!) +__cdist_cur_object_dir="$(__cdist_object_dir "$__cdist_object_self")" +__cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object_self")" -echo "Checking manifest for $__cdist_object ..." +__cdist_echo info "Checking manifest ..." -__cdist_type="$(__cdist_type_from_object "$__cdist_object")" +__cdist_type="$(__cdist_type_from_object "$__cdist_object_self")" __cdist_manifest="$(__cdist_type_manifest "$__cdist_type")" if [ -f "$__cdist_manifest" ]; then @@ -42,7 +43,7 @@ if [ -f "$__cdist_manifest" ]; then # Make __cdist_manifest available for cdist-type-emulator export __cdist_manifest - echo "Executing manifest ${__cdist_manifest} ..." + __cdist_echo "Executing manifest ${__cdist_manifest} ..." export $__cdist_name_var_object="$__cdist_cur_object_dir" export $__cdist_name_var_object_id="$__cdist_object_id" export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" From 4a7c6c2738a7427c01ba607a50333ab7e2b794f3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:12:00 +0200 Subject: [PATCH 1226/6109] ++__cdist_echo Signed-off-by: Nico Schottelius --- bin/cdist-object-prepare | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/bin/cdist-object-prepare b/bin/cdist-object-prepare index 8c92ff73..d21d8a63 100755 --- a/bin/cdist-object-prepare +++ b/bin/cdist-object-prepare @@ -29,19 +29,18 @@ set -eu __cdist_target_host="$1"; shift -__cdist_object="$1"; shift -__cdist_object_dir="$(__cdist_object_dir "$__cdist_object")" -[ -d "$__cdist_object_dir" ] || __cdist_exit_err "Object undefined: $__cdist_object" +__cdist_object_self="$1"; shift +__cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" +[ -d "$__cdist_object_dir" ] || __cdist_exit_err "Object undefined" # Export to non-core for use in manifest and gencode scripts -export $__cdist_name_var_self=$__cdist_object +export $__cdist_name_var_self=$__cdist_object_self -__cdist_object_prepared="$(__cdist_object_prepared "$__cdist_object")" +__cdist_object_prepared="$(__cdist_object_prepared "$__cdist_object_self")" if [ ! -f "$__cdist_object_prepared" ]; then - echo - echo "Preparing object $__cdist_object" - cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object" - cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object" + __cdist_echo info "Preparing object" + cdist-object-explorer-run "$__cdist_target_host" "$__cdist_object_self" + cdist-object-manifest-run "$__cdist_target_host" "$__cdist_object_self" # Mark this object as prepared touch "$__cdist_object_prepared" From 35d4760c13c2532110417f7e318f3bd31f78847f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:15:11 +0200 Subject: [PATCH 1227/6109] ++__cdist_echo ++todo Signed-off-by: Nico Schottelius --- bin/cdist-object-push | 8 ++++---- bin/cdist-object-run | 16 +++++++--------- doc/dev/todo/TAKEME | 2 ++ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/bin/cdist-object-push b/bin/cdist-object-push index f7d46be4..9fda2cea 100755 --- a/bin/cdist-object-push +++ b/bin/cdist-object-push @@ -27,9 +27,9 @@ set -eu __cdist_target_host="$1"; shift -__cdist_object="$1"; shift +__cdist_object_self="$1"; shift -echo "Transferring object $__cdist_object to $__cdist_target_host ..." +__cdist_echo info "Transferring object $__cdist_target_host ..." cdist-dir push "$__cdist_target_host" \ - "$(__cdist_object_dir "$__cdist_object")" \ - "$(__cdist_remote_object_dir "$__cdist_object")" + "$(__cdist_object_dir "$__cdist_object_self")" \ + "$(__cdist_remote_object_dir "$__cdist_object_self")" diff --git a/bin/cdist-object-run b/bin/cdist-object-run index 667bf386..c5f738ca 100755 --- a/bin/cdist-object-run +++ b/bin/cdist-object-run @@ -32,17 +32,17 @@ set -eu __cdist_target_host="$1"; shift -__cdist_object="$1"; shift -__cdist_object_dir="$(__cdist_object_dir "$__cdist_object")" -[ -d "$__cdist_object_dir" ] || __cdist_exit_err "Requested object is not defined: $__cdist_object" +__cdist_object_self="$1"; shift +__cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" +[ -d "$__cdist_object_dir" ] || __cdist_exit_err "Object undefined" # Export to non-core for use in manifest and gencode scripts -export $__cdist_name_var_self=$__cdist_object +export $__cdist_name_var_self=$__cdist_object_self -__cdist_object_finished="$(__cdist_object_finished "$__cdist_object")" +__cdist_object_finished="$(__cdist_object_finished "$__cdist_object_self")" if [ ! -f "$__cdist_object_finished" ]; then # Resolve dependencies, if any - __cdist_object_require="$(__cdist_object_require "$__cdist_object")" + __cdist_object_require="$(__cdist_object_require "$__cdist_object_self")" if [ -f "$__cdist_object_require" ]; then echo # NEED TO CREATE ARRAY, SSH DESTROYS WHILE READ LOOP @@ -52,13 +52,11 @@ if [ ! -f "$__cdist_object_finished" ]; then while [ $# -gt 0 ]; do __cdist_requirement="$1"; shift - echo "Resolving dependency $__cdist_requirement for $__cdist_object ..." + echo "Resolving dependency $__cdist_requirement" cdist-object-run "$__cdist_target_host" "$__cdist_requirement" done fi - echo - echo "Running object $__cdist_object" cdist-object-gencode-run "$__cdist_target_host" "$__cdist_object" cdist-object-push "$__cdist_target_host" "$__cdist_object" cdist-object-code-run "$__cdist_target_host" "$__cdist_object" diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index 0fcced96..d456ae35 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -5,6 +5,8 @@ Feel free to pick one! CORE ---- +- Inconsistent error messages if object is not existing! + -> always use "Object undefined" - Add echo function / beautify output __cdist_echo [level] [messages...] level := syslog alike: From 838d43d74c70a301d76a47e271efd1cab2181049 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:17:11 +0200 Subject: [PATCH 1228/6109] do not fail if code is missing, but inform Signed-off-by: Nico Schottelius --- bin/cdist-code-run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-code-run b/bin/cdist-code-run index 8a121a08..6389a060 100755 --- a/bin/cdist-code-run +++ b/bin/cdist-code-run @@ -29,7 +29,7 @@ __cdist_object="$1"; shift __cdist_code_type="$1"; shift if [ ! -d "$(__cdist_object_dir "$__cdist_object")" ]; then - __cdist_exit_err "Object $__cdist_object is missing." + __cdist_exit_err "Object undefined" fi code="$(__cdist_object_code "$__cdist_object")-${__cdist_code_type}" @@ -48,5 +48,5 @@ if [ -e "$code" ]; then __cdist_exit_err "$code exists, but is not a file." fi else - __cdist_exit_err "Missing code for ${__cdist_object}." + __cdist_echo info "No code-${__cdist_code_type}" fi From fb0dafba5c6131ade0f841b22163c86f5d672b6d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:18:15 +0200 Subject: [PATCH 1229/6109] make faulty code a warning 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 789f41a8..273569a6 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -169,7 +169,7 @@ __cdist_echo() info) echo $__cdist_echo_prefix "$@" ;; - warning) + warn) echo $__cdist_echo_prefix "Warning: $@" ;; error) @@ -188,7 +188,7 @@ __cdist_exec_fail_on_error() sh -e "$@" if [ "$?" -ne 0 ]; then __cdist_echo error "$1 exited non-zero" - __cdist_echo info "Faulty code:" + __cdist_echo warn "Faulty code:" cat "$1" __cdist_exit_err "Aborting due to non-zero exit code." fi From 05c8634f8b3dc20fce2a9cc878deb7abefd8d4a4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:19:21 +0200 Subject: [PATCH 1230/6109] correctly use __cdist_echo Signed-off-by: Nico Schottelius --- bin/cdist-object-manifest-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-object-manifest-run b/bin/cdist-object-manifest-run index 56aec782..bf50fc2c 100755 --- a/bin/cdist-object-manifest-run +++ b/bin/cdist-object-manifest-run @@ -43,7 +43,7 @@ if [ -f "$__cdist_manifest" ]; then # Make __cdist_manifest available for cdist-type-emulator export __cdist_manifest - __cdist_echo "Executing manifest ${__cdist_manifest} ..." + __cdist_echo info "Executing manifest ${__cdist_manifest} ..." export $__cdist_name_var_object="$__cdist_cur_object_dir" export $__cdist_name_var_object_id="$__cdist_object_id" export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" From bb96163315172a1195cb240e713b5dd8ecb4add6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:19:47 +0200 Subject: [PATCH 1231/6109] blame on the right file 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 273569a6..ca8525ea 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -176,7 +176,7 @@ __cdist_echo() echo $__cdist_echo_prefix "Error: $@" >&2 ;; *) - echo "CORE BUG, who created the broken commit?" >&2 + echo "CORE BUG, who created the broken commit in $0?" >&2 exit 23 ;; esac From 49e8efdaf5e62d04f0c7bcdf3f97f24abad3deb0 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:20:58 +0200 Subject: [PATCH 1232/6109] object self, not object Signed-off-by: Nico Schottelius --- bin/cdist-object-run | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cdist-object-run b/bin/cdist-object-run index c5f738ca..3eb301f3 100755 --- a/bin/cdist-object-run +++ b/bin/cdist-object-run @@ -57,9 +57,9 @@ if [ ! -f "$__cdist_object_finished" ]; then done fi - cdist-object-gencode-run "$__cdist_target_host" "$__cdist_object" - cdist-object-push "$__cdist_target_host" "$__cdist_object" - cdist-object-code-run "$__cdist_target_host" "$__cdist_object" + cdist-object-gencode-run "$__cdist_target_host" "$__cdist_object_self" + cdist-object-push "$__cdist_target_host" "$__cdist_object_self" + cdist-object-code-run "$__cdist_target_host" "$__cdist_object_self" # Mark this object as done touch "$__cdist_object_finished" From c0a83f9d854096ccbdd338e8bc35f6b643cfba0b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:22:44 +0200 Subject: [PATCH 1233/6109] ++__cdist_exit_err Signed-off-by: Nico Schottelius --- bin/cdist-object-run | 2 +- bin/cdist-remote-explorer-run | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/bin/cdist-object-run b/bin/cdist-object-run index 3eb301f3..5224637e 100755 --- a/bin/cdist-object-run +++ b/bin/cdist-object-run @@ -52,7 +52,7 @@ if [ ! -f "$__cdist_object_finished" ]; then while [ $# -gt 0 ]; do __cdist_requirement="$1"; shift - echo "Resolving dependency $__cdist_requirement" + __cdist_echo info "Resolving dependency $__cdist_requirement" cdist-object-run "$__cdist_target_host" "$__cdist_requirement" done fi diff --git a/bin/cdist-remote-explorer-run b/bin/cdist-remote-explorer-run index cef91e0d..d95913ba 100755 --- a/bin/cdist-remote-explorer-run +++ b/bin/cdist-remote-explorer-run @@ -55,16 +55,14 @@ for explorer in "$__cdist_explorer_dir/"*; do if [ -f "$explorer" ]; then if [ ! -x "$explorer" ]; then - echo "Explorer \"$explorer\" exists, but is not executable." >&2 - exit 1 + __cdist_exit_err "Explorer \"$explorer\" exists, but is not executable." fi # Execute explorers and save results in remote destination directory "$explorer" > "${__cdist_my_out_dir}/$explorer_name" else if [ -e "$explorer" ]; then - echo "Explorer \"$explorer\" exists, but is not a file." >&2 - exit 1 + __cdist_exit_err "Explorer \"$explorer\" exists, but is not a file." fi fi done From 74c1147ec3f89df6eb9619a3f8a6dec761e387da Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:26:10 +0200 Subject: [PATCH 1234/6109] nicotodo++ Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 5df1cb61..2e5a179b 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,5 +1,8 @@ + Introduce better logging +Fix bin/cdist-type-template + Cleanup documentation: type reference -> add types + manpages add explorer reference From b86d3ba26a3a47c2a10c8997585c8f1f3f46cc15 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:38:41 +0200 Subject: [PATCH 1235/6109] remove ugly OBJECT messages 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 2dcb47b3..8ff190ad 100755 --- a/bin/cdist-type-emulator +++ b/bin/cdist-type-emulator @@ -99,7 +99,7 @@ done set +u for requirement in $require; do echo $requirement >> "$(__cdist_object_require "$__cdist_object_self")" - echo Object $__cdist_object_self requires $requirement + __cdist_echo info "Recording requirement $requirement" done set -u From 315de6fe159853c17f65f4e52cb6a3d18335b311 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:41:40 +0200 Subject: [PATCH 1236/6109] log improvements Signed-off-by: Nico Schottelius --- bin/cdist-object-gencode | 10 +++++----- bin/cdist-object-run | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/bin/cdist-object-gencode b/bin/cdist-object-gencode index 465d6f1e..2c89ce7c 100755 --- a/bin/cdist-object-gencode +++ b/bin/cdist-object-gencode @@ -27,12 +27,12 @@ set -eu __cdist_target_host="$1"; shift -__cdist_object="$1"; shift +__cdist_object_self="$1"; shift __cdist_gencode_type="$1"; shift -__cdist_object_dir="$(__cdist_object_dir "$__cdist_object")" -__cdist_type="$(__cdist_type_from_object "$__cdist_object")" -__cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object")" +__cdist_object_dir="$(__cdist_object_dir "$__cdist_object_self")" +__cdist_type="$(__cdist_type_from_object "$__cdist_object_self")" +__cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object_self")" # Full path to where the executable of the type should exist, if the type has one gencode="$(__cdist_type_gencode "$__cdist_type")-${__cdist_gencode_type}" @@ -55,7 +55,7 @@ eof __cdist_exec_fail_on_error "$gencode" else if [ -f "$gencode" ]; then - echo "Warning: $gencode exists, but is not executable" >&2 + __cdist_exit_err "$gencode exists, but is not executable" fi # No gencode? also fine! Ensure we exit 0 diff --git a/bin/cdist-object-run b/bin/cdist-object-run index 5224637e..4f40e7c1 100755 --- a/bin/cdist-object-run +++ b/bin/cdist-object-run @@ -44,7 +44,6 @@ if [ ! -f "$__cdist_object_finished" ]; then # Resolve dependencies, if any __cdist_object_require="$(__cdist_object_require "$__cdist_object_self")" if [ -f "$__cdist_object_require" ]; then - echo # NEED TO CREATE ARRAY, SSH DESTROYS WHILE READ LOOP while read __cdist_requirement; do set -- "$@" "$__cdist_requirement" @@ -52,7 +51,7 @@ if [ ! -f "$__cdist_object_finished" ]; then while [ $# -gt 0 ]; do __cdist_requirement="$1"; shift - __cdist_echo info "Resolving dependency $__cdist_requirement" + __cdist_echo info "Resolving requirement $__cdist_requirement" cdist-object-run "$__cdist_target_host" "$__cdist_requirement" done fi From e7ad5987e425873c30752fe059f90d1dcad7cab3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:43:32 +0200 Subject: [PATCH 1237/6109] + self variable Signed-off-by: Nico Schottelius --- bin/cdist-code-run | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/cdist-code-run b/bin/cdist-code-run index 6389a060..17b7c4a1 100755 --- a/bin/cdist-code-run +++ b/bin/cdist-code-run @@ -25,14 +25,14 @@ [ $# -eq 2 ] || __cdist_usage " " set -ue -__cdist_object="$1"; shift +__cdist_object_self="$1"; shift __cdist_code_type="$1"; shift -if [ ! -d "$(__cdist_object_dir "$__cdist_object")" ]; then +if [ ! -d "$(__cdist_object_dir "$__cdist_object_self")" ]; then __cdist_exit_err "Object undefined" fi -code="$(__cdist_object_code "$__cdist_object")-${__cdist_code_type}" +code="$(__cdist_object_code "$__cdist_object_self")-${__cdist_code_type}" __cdist_echo info "Checking code-${__cdist_code_type}" From 31164be1d0c8c1b289c3525f8e36cd9a578e0b93 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:44:41 +0200 Subject: [PATCH 1238/6109] remove full path to manifest in logging (will be presented on error anyway) Signed-off-by: Nico Schottelius --- bin/cdist-object-manifest-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-object-manifest-run b/bin/cdist-object-manifest-run index bf50fc2c..3b1b5254 100755 --- a/bin/cdist-object-manifest-run +++ b/bin/cdist-object-manifest-run @@ -43,7 +43,7 @@ if [ -f "$__cdist_manifest" ]; then # Make __cdist_manifest available for cdist-type-emulator export __cdist_manifest - __cdist_echo info "Executing manifest ${__cdist_manifest} ..." + __cdist_echo info "Executing manifest ..." export $__cdist_name_var_object="$__cdist_cur_object_dir" export $__cdist_name_var_object_id="$__cdist_object_id" export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" From bc1c7f104eb30193df526e5761e3ee048ffb35e6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:50:49 +0200 Subject: [PATCH 1239/6109] core prefix Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 +- bin/cdist-object-push | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index ca8525ea..a36af881 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -156,7 +156,7 @@ __cdist_echo() if [ "$__cdist_object_self" ]; then __cdist_echo_prefix="${__cdist_object_self}:" else - __cdist_echo_prefix="" + __cdist_echo_prefix="core: " fi set -u diff --git a/bin/cdist-object-push b/bin/cdist-object-push index 9fda2cea..62b00cb2 100755 --- a/bin/cdist-object-push +++ b/bin/cdist-object-push @@ -29,7 +29,7 @@ set -eu __cdist_target_host="$1"; shift __cdist_object_self="$1"; shift -__cdist_echo info "Transferring object $__cdist_target_host ..." +__cdist_echo info "Transferring object" cdist-dir push "$__cdist_target_host" \ "$(__cdist_object_dir "$__cdist_object_self")" \ "$(__cdist_remote_object_dir "$__cdist_object_self")" From 0a3a434269bbc00bcdf21556dc9e92c9a520951f Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 21:51:43 +0200 Subject: [PATCH 1240/6109] remove ... dots ... make ... me ...feel ... weired Signed-off-by: Nico Schottelius --- bin/cdist-cache | 2 +- bin/cdist-config | 2 +- bin/cdist-deploy-to | 4 ++-- bin/cdist-explorer-run-global | 2 +- bin/cdist-manifest-run-init | 2 +- bin/cdist-mass-deploy | 4 ++-- bin/cdist-object-explorer-run | 4 ++-- bin/cdist-object-gencode-run | 4 ++-- bin/cdist-object-manifest-run | 4 ++-- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/bin/cdist-cache b/bin/cdist-cache index 5ba51442..bfb1a5b3 100755 --- a/bin/cdist-cache +++ b/bin/cdist-cache @@ -32,6 +32,6 @@ __cdist_ddir="$(__cdist_host_cache_dir "$__cdist_target_host")" # Create base to move into mkdir -p "$(__cdist_cache_dir)" -__cdist_echo info "Saving cache to $__cdist_ddir ..." +__cdist_echo info "Saving cache to $__cdist_ddir " rm -rf "$__cdist_ddir" mv "$__cdist_local_base_dir" "$__cdist_ddir" diff --git a/bin/cdist-config b/bin/cdist-config index a36af881..4346c0cb 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -207,7 +207,7 @@ __cdist_usage() __cdist_init_deploy() { - echo "Creating clean directory structure ..." + __cdist_echo info "Creating clean directory structure " # Ensure there is no old stuff, neither local nor remote rm -rf "$__cdist_local_base_dir" diff --git a/bin/cdist-deploy-to b/bin/cdist-deploy-to index ddb36fca..138248d6 100755 --- a/bin/cdist-deploy-to +++ b/bin/cdist-deploy-to @@ -34,7 +34,7 @@ export $__cdist_name_var_target_user="$__cdist_remote_user" # Export variables for core, which others do not reset export __cdist_local_base_dir -__cdist_echo info "cdist $__cdist_version: Configuring $__cdist_target_host ..." +__cdist_echo info "cdist $__cdist_version: Configuring $__cdist_target_host " ################################################################################ # See cdist-stages(7) @@ -44,7 +44,7 @@ __cdist_echo info "cdist $__cdist_version: Configuring $__cdist_target_host ..." __cdist_init_deploy "$__cdist_target_host" # Transfer cdist executables -__cdist_echo info "Transferring cdist binaries to the target host ..." +__cdist_echo info "Transferring cdist binaries to the target host " cdist-dir push "$__cdist_target_host" \ "${__cdist_abs_mydir}" "${__cdist_remote_bin_dir}" cdist-explorer-run-global "$__cdist_target_host" diff --git a/bin/cdist-explorer-run-global b/bin/cdist-explorer-run-global index 17bc3d79..b0c024f2 100755 --- a/bin/cdist-explorer-run-global +++ b/bin/cdist-explorer-run-global @@ -27,7 +27,7 @@ set -ue __cdist_target_host="$1"; shift -__cdist_echo info "Running global explorers ..." +__cdist_echo info "Running global explorers " # copy the explorers cdist-dir push "$__cdist_target_host" \ diff --git a/bin/cdist-manifest-run-init b/bin/cdist-manifest-run-init index da7af6ba..28acc623 100755 --- a/bin/cdist-manifest-run-init +++ b/bin/cdist-manifest-run-init @@ -30,5 +30,5 @@ __cdist_target_host="$1"; shift eval export $__cdist_name_var_manifest=\"\$__cdist_manifest_dir\" -__cdist_echo info "Running initial manifest for $__cdist_target_host ..." +__cdist_echo info "Running initial manifest for $__cdist_target_host " cdist-manifest-run "$__cdist_target_host" "$__cdist_manifest_init" diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy index fae9e633..8a555411 100755 --- a/bin/cdist-mass-deploy +++ b/bin/cdist-mass-deploy @@ -22,7 +22,7 @@ # . cdist-config -[ $# -ge 1 ] || __cdist_usage "[-p] [target host ...]" +[ $# -ge 1 ] || __cdist_usage "[-p] [target host ]" set -eu parallel="" @@ -42,6 +42,6 @@ done # else wait after all are started if [ "$parallel" ]; then - __cdist_echo info "Waiting for cdist-deploy-to jobs to finish..." + __cdist_echo info "Waiting for cdist-deploy-to jobs to finish" wait fi diff --git a/bin/cdist-object-explorer-run b/bin/cdist-object-explorer-run index ed001e83..79cd2865 100755 --- a/bin/cdist-object-explorer-run +++ b/bin/cdist-object-explorer-run @@ -39,12 +39,12 @@ if [ "$__cdist_has_explorer" ]; then if ! __cdist_type_explorer_pushed "$__cdist_type"; then src_dir="$(__cdist_type_explorer_dir "$__cdist_type")" dst_dir="$(__cdist_remote_type_explorer_dir "$__cdist_type")" - __cdist_echo info "Transfering explorers for $__cdist_type ..." + __cdist_echo info "Transfering explorers for $__cdist_type " cdist-dir push "$__cdist_target_host" "$src_dir" "$dst_dir" __cdist_type_explorer_pushed_add "$__cdist_type" fi - __cdist_echo info "Running explorers ..." + __cdist_echo info "Running explorers " # Copy object parameters cdist-dir push "$__cdist_target_host" \ "$(__cdist_object_parameter_dir "$__cdist_object_self")" \ diff --git a/bin/cdist-object-gencode-run b/bin/cdist-object-gencode-run index 375b7cc1..bada6aee 100755 --- a/bin/cdist-object-gencode-run +++ b/bin/cdist-object-gencode-run @@ -34,11 +34,11 @@ __cdist_code_remote="$(__cdist_object_code "$__cdist_object_self")-${__cdist_nam # FIXME: check that no file is created if there is no gencode # probably move output code to cdist-object-gencode -__cdist_echo info "Generating local code ..." +__cdist_echo info "Generating local code " cdist-object-gencode "$__cdist_target_host" "$__cdist_object_self" \ "${__cdist_name_gencode_local}" > "${__cdist_code_local}" -__cdist_echo info "Generating remote code ..." +__cdist_echo info "Generating remote code " cdist-object-gencode "$__cdist_target_host" "$__cdist_object_self" \ "${__cdist_name_gencode_remote}" > "${__cdist_code_remote}" diff --git a/bin/cdist-object-manifest-run b/bin/cdist-object-manifest-run index 3b1b5254..34d4f867 100755 --- a/bin/cdist-object-manifest-run +++ b/bin/cdist-object-manifest-run @@ -33,7 +33,7 @@ __cdist_object_self="$1"; shift __cdist_cur_object_dir="$(__cdist_object_dir "$__cdist_object_self")" __cdist_object_id="$(__cdist_object_id_from_object "$__cdist_object_self")" -__cdist_echo info "Checking manifest ..." +__cdist_echo info "Checking manifest " __cdist_type="$(__cdist_type_from_object "$__cdist_object_self")" __cdist_manifest="$(__cdist_type_manifest "$__cdist_type")" @@ -43,7 +43,7 @@ if [ -f "$__cdist_manifest" ]; then # Make __cdist_manifest available for cdist-type-emulator export __cdist_manifest - __cdist_echo info "Executing manifest ..." + __cdist_echo info "Executing manifest " export $__cdist_name_var_object="$__cdist_cur_object_dir" export $__cdist_name_var_object_id="$__cdist_object_id" export $__cdist_name_var_type="$(__cdist_type_dir "$__cdist_type")" From b0391ac0c9b8041c59d7aa8b2349bca1e0fbbb7d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 22:09:04 +0200 Subject: [PATCH 1241/6109] BUGFIX: do not fail, if cache/ is missing Signed-off-by: Nico Schottelius --- bin/cdist-cache | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/cdist-cache b/bin/cdist-cache index bfb1a5b3..ee27ffb4 100755 --- a/bin/cdist-cache +++ b/bin/cdist-cache @@ -27,10 +27,12 @@ set -u __cdist_target_host="$1"; shift -__cdist_ddir="$(__cdist_host_cache_dir "$__cdist_target_host")" # Create base to move into -mkdir -p "$(__cdist_cache_dir)" +mkdir -p "${__cdist_local_base_cache_dir}" + +# Now determine absolute path +__cdist_ddir="$(__cdist_host_cache_dir "$__cdist_target_host")" __cdist_echo info "Saving cache to $__cdist_ddir " rm -rf "$__cdist_ddir" From d39457b0a740bff5f2059b9344887d62939a1c01 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 22:13:30 +0200 Subject: [PATCH 1242/6109] document how to report bugs Signed-off-by: Nico Schottelius --- doc/man/man7/cdist-hacker.text | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/man/man7/cdist-hacker.text b/doc/man/man7/cdist-hacker.text index 27f92a4a..f9f08e31 100644 --- a/doc/man/man7/cdist-hacker.text +++ b/doc/man/man7/cdist-hacker.text @@ -19,6 +19,13 @@ twice before merging or implementing a feature: Less features with good usability are far better than the opposite. +REPORTING BUGS +-------------- +If you believe you've found a bug and verified that it is +in the latest version, drop a mail to the cdist mailing list, +subject prefixed with "[BUG] ". + + UNDERSTANDING CDIST INTERNALS ----------------------------- IF you are interested in how cdist internally works, you can open @@ -32,6 +39,7 @@ CODING CONVENTIONS (EVERYWHERE) If something should be better done or needs to fixed, add the word FIXME nearby, so grepping for FIXME gives all positions that need to be fixed. + CODING CONVENTIONS (CORE) ------------------------- - All variables exported by cdist are prefixed with a double underscore (__) From ad9cac5fb604b7cd910e66ea23a90a7b8412b209 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 22:22:52 +0200 Subject: [PATCH 1243/6109] 1.6.1 has another bugfix Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index 5f47e19f..4a9cb2a8 100644 --- a/doc/changelog +++ b/doc/changelog @@ -2,6 +2,7 @@ * Improved logging: Show code responsible for abort * New Type __package_pkg_openbsd * Bugfix: Type __debconf_set_selections used wrong contens for selection + * Bugfix: Don't fail, if cache directory is not existing * New explorer: hardware_type 1.6.0: 2011-04-06 From 3c37ac0b0f9746e3524c009027efd8377a1db609 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 22:24:11 +0200 Subject: [PATCH 1244/6109] do not fail if nothing todo (__user and __group) Signed-off-by: Nico Schottelius --- conf/type/__group/gencode-remote | 6 +++++- conf/type/__user/gencode-remote | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/conf/type/__group/gencode-remote b/conf/type/__group/gencode-remote index 4cb05762..5d43a054 100755 --- a/conf/type/__group/gencode-remote +++ b/conf/type/__group/gencode-remote @@ -43,7 +43,11 @@ if grep -q "^${name}:" "$__object/explorer/group"; then fi done - [ $# -gt 0 ] && echo groupmod $@ $name + if [ $# -gt 0 ]; then + echo groupmod "$@" "$name" + else + true + fi else for property in $(ls .); do new_value="$(cat "$property")" diff --git a/conf/type/__user/gencode-remote b/conf/type/__user/gencode-remote index 7670b943..31c93655 100755 --- a/conf/type/__user/gencode-remote +++ b/conf/type/__user/gencode-remote @@ -59,7 +59,11 @@ if grep -q "^${name}:" "$__object/explorer/passwd"; then fi done - [ $# -gt 0 ] && echo usermod "$@" "$name" + if [ $# -gt 0 ]; then + echo usermod "$@" "$name" + else + true + fi else for property in $(ls .); do new_value="$(cat "$property")" From 152efae913292e80a76c6af8b9a82990000291fb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 22:24:57 +0200 Subject: [PATCH 1245/6109] document bugfix of __user and __group Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index 4a9cb2a8..1a38a2bd 100644 --- a/doc/changelog +++ b/doc/changelog @@ -3,6 +3,7 @@ * New Type __package_pkg_openbsd * Bugfix: Type __debconf_set_selections used wrong contens for selection * Bugfix: Don't fail, if cache directory is not existing + * Bugfix: __user and __group exited non-zero if no change was necessary * New explorer: hardware_type 1.6.0: 2011-04-06 From 6648535c6d61755fe95c259da29862a63d97c9ee Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 22:39:00 +0200 Subject: [PATCH 1246/6109] --nicotodo Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 3 --- 1 file changed, 3 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index 2e5a179b..db1ba10a 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,6 +1,3 @@ - -Introduce better logging - Fix bin/cdist-type-template Cleanup documentation: From b29538a78486b9aac975427c48f110255e3ed1b6 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 6 Apr 2011 23:26:28 +0200 Subject: [PATCH 1247/6109] new types: __autofs_map, __autofs_master Signed-off-by: Steven Armstrong --- conf/type/__autofs_map/man.text | 60 +++++++++++++++++++ conf/type/__autofs_map/manifest | 42 +++++++++++++ conf/type/__autofs_map/parameter/optional | 3 + conf/type/__autofs_map/parameter/required | 1 + .../__autofs_master/files/auto.master.header | 3 + conf/type/__autofs_master/gencode-local | 26 ++++++++ conf/type/__autofs_master/man.text | 47 +++++++++++++++ conf/type/__autofs_master/manifest | 31 ++++++++++ conf/type/__autofs_master/parameter/optional | 1 + conf/type/__autofs_master/singleton | 0 10 files changed, 214 insertions(+) create mode 100644 conf/type/__autofs_map/man.text create mode 100755 conf/type/__autofs_map/manifest create mode 100644 conf/type/__autofs_map/parameter/optional create mode 100644 conf/type/__autofs_map/parameter/required create mode 100644 conf/type/__autofs_master/files/auto.master.header create mode 100755 conf/type/__autofs_master/gencode-local create mode 100644 conf/type/__autofs_master/man.text create mode 100755 conf/type/__autofs_master/manifest create mode 100644 conf/type/__autofs_master/parameter/optional create mode 100644 conf/type/__autofs_master/singleton diff --git a/conf/type/__autofs_map/man.text b/conf/type/__autofs_map/man.text new file mode 100644 index 00000000..fbbd15d6 --- /dev/null +++ b/conf/type/__autofs_map/man.text @@ -0,0 +1,60 @@ +cdist-type__autofs_map(7) +======================== +Steven Armstrong + + +NAME +---- +cdist-type__autofs_map - Manage autofs maps + + +DESCRIPTION +----------- +This cdist type allows you to define maps for autofs. + + +OBJECT ID +--------- +The object_id Is used as the mount-point as described in auto.master(5). + + +REQUIRED PARAMETERS +------------------- +map:: + Name of the map to use. See auto.master(5). + + +OPTIONAL PARAMETERS +------------------- +type:: + Type of map used for this mount point. Defaults to 'file'. + See map-type in auto.master(5) for possible values. +options:: + See auto.master(5). +comment:: + A comment describing this map. Is added to the generated entry in + auto.master. + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# Add auto mounter at /net +__autofs_map /net --map /etc/auto.net --type program + +# Add auto mounter at /pub +__autofs_map /pub --map /etc/auto.pub \ + --type file --options nosuid,rw,bg,hard,intr --ghost +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +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). diff --git a/conf/type/__autofs_map/manifest b/conf/type/__autofs_map/manifest new file mode 100755 index 00000000..74672e46 --- /dev/null +++ b/conf/type/__autofs_map/manifest @@ -0,0 +1,42 @@ +#!/bin/sh +# +# 2011 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 . +# + +name="/$__object_id" +map="$(cat "$__object/parameter/map")" + +if [ -f "$__object/parameter/type" ]; then + type="$(cat "$__object/parameter/type")" +else + type="file" + echo "$type" > "$__object/parameter/type" +fi + +# Generate entry for use in auto.master +entry="${name} ${type}:${map}" +if [ -f "$__object/parameter/options" ]; then + entry="$entry $(cat "$__object/parameter/options")" +fi +if [ -f "$__object/parameter/comment" ]; then + echo "# $(cat "$__object/parameter/comment")" > "$__object/parameter/entry" +fi +echo "$entry" >> "$__object/parameter/entry" + +require="$__self" __autofs_master + diff --git a/conf/type/__autofs_map/parameter/optional b/conf/type/__autofs_map/parameter/optional new file mode 100644 index 00000000..b1aa3a7e --- /dev/null +++ b/conf/type/__autofs_map/parameter/optional @@ -0,0 +1,3 @@ +type +options +comment diff --git a/conf/type/__autofs_map/parameter/required b/conf/type/__autofs_map/parameter/required new file mode 100644 index 00000000..b4a284c5 --- /dev/null +++ b/conf/type/__autofs_map/parameter/required @@ -0,0 +1 @@ +map diff --git a/conf/type/__autofs_master/files/auto.master.header b/conf/type/__autofs_master/files/auto.master.header new file mode 100644 index 00000000..53590257 --- /dev/null +++ b/conf/type/__autofs_master/files/auto.master.header @@ -0,0 +1,3 @@ +# Generated from cdist __autofs_master +# Do not change this file. Changes will be overwritten. + diff --git a/conf/type/__autofs_master/gencode-local b/conf/type/__autofs_master/gencode-local new file mode 100755 index 00000000..701f97a8 --- /dev/null +++ b/conf/type/__autofs_master/gencode-local @@ -0,0 +1,26 @@ +#!/bin/sh +# +# 2011 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 . +# +# +# Generate auto.master config based on all defined __autofs_map ojbects. +# + +auto_master="$__object/files/auto.master" +cat "$(cat "$__object/parameter/header")" > "$auto_master" +find "$__global/object/__autofs_map" -path "*.cdist/parameter/entry" | xargs cat >> "$auto_master" diff --git a/conf/type/__autofs_master/man.text b/conf/type/__autofs_master/man.text new file mode 100644 index 00000000..d889b1f6 --- /dev/null +++ b/conf/type/__autofs_master/man.text @@ -0,0 +1,47 @@ +cdist-type__autofs_master(7) +======================== +Steven Armstrong + + +NAME +---- +cdist-type__autofs_master - Generate the auto.master file + + +DESCRIPTION +----------- +This cdist type generates a auto.master configuration from given __autofs_map +definitions. See cdist-type__auto_map(7). + + +REQUIRED PARAMETERS +------------------- +None + +OPTIONAL PARAMETERS +------------------- +header:: + Absolute path to a file used as the header for the generated auto.master + file. + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +# auto.master with default header +__autofs_master + +# auto.master with custom header +__autofs_master --header /path/to/header +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +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). diff --git a/conf/type/__autofs_master/manifest b/conf/type/__autofs_master/manifest new file mode 100755 index 00000000..e37a5d34 --- /dev/null +++ b/conf/type/__autofs_master/manifest @@ -0,0 +1,31 @@ +#!/bin/sh +# +# 2011 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 . +# + + +if [ ! -f "$__object/parameter/header" ]; then + echo "$__type/files/auto.master.header" > "$__object/parameter/header" +fi + +[ -d "$__object/files" ] || mkdir "$__object/files" +require="$__self" __file /etc/auto.master --source "$__object/files/auto.master" \ + --mode 644 \ + --owner root \ + --group root + diff --git a/conf/type/__autofs_master/parameter/optional b/conf/type/__autofs_master/parameter/optional new file mode 100644 index 00000000..8e83f898 --- /dev/null +++ b/conf/type/__autofs_master/parameter/optional @@ -0,0 +1 @@ +header diff --git a/conf/type/__autofs_master/singleton b/conf/type/__autofs_master/singleton new file mode 100644 index 00000000..e69de29b From 6784d4ca167902c978346f3f999058a88ef56990 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 6 Apr 2011 23:29:52 +0200 Subject: [PATCH 1248/6109] docfix: add missing = Signed-off-by: Steven Armstrong --- conf/type/__autofs_map/man.text | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/type/__autofs_map/man.text b/conf/type/__autofs_map/man.text index fbbd15d6..1584c16b 100644 --- a/conf/type/__autofs_map/man.text +++ b/conf/type/__autofs_map/man.text @@ -1,5 +1,5 @@ cdist-type__autofs_map(7) -======================== +========================= Steven Armstrong @@ -15,7 +15,7 @@ This cdist type allows you to define maps for autofs. OBJECT ID --------- -The object_id Is used as the mount-point as described in auto.master(5). +The object_id is used as the mount-point as described in auto.master(5). REQUIRED PARAMETERS From df6c2909cb1932364f3b19a2811576d7ba5fac9e Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 6 Apr 2011 23:31:38 +0200 Subject: [PATCH 1249/6109] bow infront of the whitespace nazi Signed-off-by: Steven Armstrong --- conf/type/__autofs_map/man.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__autofs_map/man.text b/conf/type/__autofs_map/man.text index 1584c16b..941e22da 100644 --- a/conf/type/__autofs_map/man.text +++ b/conf/type/__autofs_map/man.text @@ -41,7 +41,7 @@ EXAMPLES -------------------------------------------------------------------------------- # Add auto mounter at /net -__autofs_map /net --map /etc/auto.net --type program +__autofs_map /net --map /etc/auto.net --type program # Add auto mounter at /pub __autofs_map /pub --map /etc/auto.pub \ From 88a667b17fcddaaaba00d232636e51e340f4ef6a Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Wed, 6 Apr 2011 23:42:22 +0200 Subject: [PATCH 1250/6109] docfix: add missing = Signed-off-by: Steven Armstrong --- conf/type/__autofs_master/man.text | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/type/__autofs_master/man.text b/conf/type/__autofs_master/man.text index d889b1f6..641c8393 100644 --- a/conf/type/__autofs_master/man.text +++ b/conf/type/__autofs_master/man.text @@ -1,5 +1,5 @@ cdist-type__autofs_master(7) -======================== +============================ Steven Armstrong From 9c5e7f516164ef9b9caa4030a1ca598911ac872a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 23:43:22 +0200 Subject: [PATCH 1251/6109] much more fun with 1.6.1 Signed-off-by: Nico Schottelius --- doc/changelog | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/changelog b/doc/changelog index 1a38a2bd..b88705f8 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,10 +1,13 @@ 1.6.1: * Improved logging: Show code responsible for abort - * New Type __package_pkg_openbsd + * Improved logging: Consistently prefix with current object or core * Bugfix: Type __debconf_set_selections used wrong contens for selection * Bugfix: Don't fail, if cache directory is not existing * Bugfix: __user and __group exited non-zero if no change was necessary - * New explorer: hardware_type + * New Explorer: hardware_type + * New Type __package_pkg_openbsd (Andi Brönnimann) + * New Type: __autofs_map (Steven Armstrong) + * New Type: __autofs_master (Steven Armstrong) 1.6.0: 2011-04-06 * New Type __package_yum From ff184006cb540b49feb12400a784dd828b280c96 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Apr 2011 23:46:15 +0200 Subject: [PATCH 1252/6109] colon gangster attack Signed-off-by: Nico Schottelius --- doc/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changelog b/doc/changelog index b88705f8..0560dee0 100644 --- a/doc/changelog +++ b/doc/changelog @@ -5,7 +5,7 @@ * Bugfix: Don't fail, if cache directory is not existing * Bugfix: __user and __group exited non-zero if no change was necessary * New Explorer: hardware_type - * New Type __package_pkg_openbsd (Andi Brönnimann) + * New Type: __package_pkg_openbsd (Andi Brönnimann) * New Type: __autofs_map (Steven Armstrong) * New Type: __autofs_master (Steven Armstrong) From c3341df08d5406bcbd1f49870765d3bb23d49577 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 7 Apr 2011 09:56:59 +0200 Subject: [PATCH 1253/6109] Upgrade to 1.6.1 Signed-off-by: Nico Schottelius --- bin/cdist-config | 2 +- doc/changelog | 82 ++++++++++++++++++++++++------------------------ 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 4346c0cb..5d19f854 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -19,7 +19,7 @@ # # -__cdist_version="1.6.0" +__cdist_version="1.6.1" # Fail if something bogus is going on set -u diff --git a/doc/changelog b/doc/changelog index 0560dee0..2fef50ca 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,30 +1,30 @@ -1.6.1: +1.6.1: 2011-04-07 * Improved logging: Show code responsible for abort * Improved logging: Consistently prefix with current object or core * Bugfix: Type __debconf_set_selections used wrong contens for selection * Bugfix: Don't fail, if cache directory is not existing * Bugfix: __user and __group exited non-zero if no change was necessary - * New Explorer: hardware_type - * New Type: __package_pkg_openbsd (Andi Brönnimann) - * New Type: __autofs_map (Steven Armstrong) - * New Type: __autofs_master (Steven Armstrong) + * New Explorer hardware_type + * New Type __package_pkg_openbsd (Andi Brönnimann) + * New Type __autofs_map (Steven Armstrong) + * New Type __autofs_master (Steven Armstrong) 1.6.0: 2011-04-06 - * New Type __package_yum - * New type __debconf_set_selections - * New explorer os_version - * Fix Type __group in case of __group NAME syntax - * Fix __package* types: consistently name --state removed instead of + * New Type: __package_yum + * New type: __debconf_set_selections + * New explorer: os_version + * Bugfix: Type __group failed in case of __group NAME syntax + * Bugfix: __package* types: consistently name --state removed instead of uninstalled or deinstalled - * Type __package gained Fedora support - * Removed --preseed support from __package_apt - * explorer/os: gained Fedora support + * Type __package: Added Fedora support + * Type __package_apt: Removed --preseed support + * Explorer os gained Fedora support * Simplified types __user and __group * New helper binary: cdist-mass-deploy 1.5.0: 2011-04-01 * Add basic cache functionality - * New type __process + * New type: __process * Restructured execution: (Steven Armstrong) Orientate processing on objects, resolve dependencies and ensure correct execution order. @@ -32,8 +32,8 @@ * Documentation: Remove legacy man pages (Steven Armstrong) 1.4.1: 2011-03-25 - * New type __key_value (Steven Armstrong) - * New type __apt_ppa (Steven Armstrong) + * New type: __key_value (Steven Armstrong) + * New type: __apt_ppa (Steven Armstrong) * Documentation: Manpage generation cleanup * Documentation: Manpage fix for __apt_ppa @@ -48,9 +48,9 @@ * Include HTML documentation of manpages and publish them 1.3.1: 2011-03-21 - * Document cdist-type-build-emulation - * Document cdist-type-emulator - * Document cdist-remote-explorer-run + * Document: cdist-type-build-emulation + * Document: cdist-type-emulator + * Document: cdist-remote-explorer-run * Fix dependencies in cdist-code-run * Fix dependencies in cdist-manifest-run-all * Add --source to __issue and fix os check @@ -62,33 +62,33 @@ 1.2.0: 2011-03-19 * Added dependencies (see cdist-type(7)) - * New type __removeline (Daniel Roth) - * New type __group (Steven Armstrong) - * New type __user (Steven Armstrong) - * Document cdist-run-remote - * Document cdist-code-run-all - * Document cdist-object-gencode - * Document cdist-explorer-run-global - * Document cdist-manifest-run-init - * Document cdist-manifest-run-all - * Document cdist-object-gencode-all - * Document cdist-manifest-run + * New type: __removeline (Daniel Roth) + * New type: __group (Steven Armstrong) + * New type: __user (Steven Armstrong) + * Documentation: cdist-run-remote + * Documentation: cdist-code-run-all + * Documentation: cdist-object-gencode + * Documentation: cdist-explorer-run-global + * Documentation: cdist-manifest-run-init + * Documentation: cdist-manifest-run-all + * Documentation: cdist-object-gencode-all + * Documentation: cdist-manifest-run 1.1.0: 2011-03-16 * Replace type __file with __file, __directory, __link - * Document cdist-env - * Document cdist-config - * Document cdist-dir - * Document cdist-quickstart + * Documentation: cdist-env + * Documentation: cdist-config + * Documentation: cdist-dir + * Documentation: cdist-quickstart 1.0.4: 2011-03-15 - * New type __motd - * New type __addifnosuchline (Daniel Roth) - * Document type __issue - * New type __user - * Document type __package - * Document type __package_pacman - * Document type __package_apt + * New type: __motd + * New type: __addifnosuchline (Daniel Roth) + * New type: __user + * Document type: __issue + * Document type: __package + * Document type: __package_pacman + * Document type: __package_apt * New parameter for __file: --owner and --group 1.0.3: 2011-03-11 From 965e80b0ef28d8dbb9ad6e5f0d464c167db7b2fe Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 7 Apr 2011 10:28:08 +0200 Subject: [PATCH 1254/6109] more stuff running in the systems group Signed-off-by: Nico Schottelius --- README | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README b/README index 54f792a7..75b36581 100644 --- a/README +++ b/README @@ -211,13 +211,14 @@ 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) + * [nss-pam-ldapd](http://arthurdejong.org/nss-pam-ldapd/) * [ircd-hybrid](http://www.ircd-hybrid.org/) (chat) * [stunnel](http://stunnel.mirt.net/) (SSL tunnel) * [mercurial-server](http://www.lshift.net/mercurial-server.html) (version control) * [xfce](http://www.xfce.org/) (lightweight desktop environment) * [slim](http://slim.berlios.de/) (graphical login manager for X11) -with cdist on a total of **20** production machines of the +with cdist on a total of **50** production machines of the [Systems Group](http://www.systems.ethz.ch) at the [ETH Zurich](http://www.ethz.ch) as well at home. From bc77a637a986f41653e72224580b1920bf8a4f02 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 7 Apr 2011 11:57:50 +0200 Subject: [PATCH 1255/6109] more cdist on more nodes = more fun Signed-off-by: Nico Schottelius --- README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index 75b36581..350cd3e1 100644 --- a/README +++ b/README @@ -211,14 +211,14 @@ 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) - * [nss-pam-ldapd](http://arthurdejong.org/nss-pam-ldapd/) + * [nss-pam-ldapd](http://arthurdejong.org/nss-pam-ldapd/) (authentication) * [ircd-hybrid](http://www.ircd-hybrid.org/) (chat) * [stunnel](http://stunnel.mirt.net/) (SSL tunnel) * [mercurial-server](http://www.lshift.net/mercurial-server.html) (version control) * [xfce](http://www.xfce.org/) (lightweight desktop environment) * [slim](http://slim.berlios.de/) (graphical login manager for X11) -with cdist on a total of **50** production machines of the +with cdist on more than **60** production machines of the [Systems Group](http://www.systems.ethz.ch) at the [ETH Zurich](http://www.ethz.ch) as well at home. From 4895a92d95c4d2d842100dadace9956634f81fc7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 7 Apr 2011 12:01:55 +0200 Subject: [PATCH 1256/6109] ++doc todo (funny item) Signed-off-by: Nico Schottelius --- doc/dev/todo/TAKEME | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/dev/todo/TAKEME b/doc/dev/todo/TAKEME index d456ae35..871045f2 100644 --- a/doc/dev/todo/TAKEME +++ b/doc/dev/todo/TAKEME @@ -53,4 +53,5 @@ DOCUMENTATION - asciidoc interprets __, which we use for variables names -> seek through docs and replace with \_\_! - reference explorers in cdist-reference! - +- compare running times: + one, 5, 10, 50, 100, 1000 hosts => how does cdist scale? From 59ec60ba0bbe6134609c9bf5571ba7be022475af Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 7 Apr 2011 12:07:06 +0200 Subject: [PATCH 1257/6109] ++todo Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index db1ba10a..a02d7013 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -3,3 +3,6 @@ Fix bin/cdist-type-template Cleanup documentation: type reference -> add types + manpages add explorer reference + +Catch broken instances in cdist-mass-deploy -p and report +broken deployements at the end! From 4873b046ba45527b2fe6685ff6fbfec5cee6b3fd Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 8 Apr 2011 10:51:27 +0200 Subject: [PATCH 1258/6109] allow user to change __cdist_tmp_base_dir to avoid using /tmp Signed-off-by: Nico Schottelius --- bin/cdist-config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cdist-config b/bin/cdist-config index 5d19f854..44a95f01 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -98,7 +98,8 @@ __cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname" ################################################################################ # Tempfiles # -__cdist_tmp_dir=$(mktemp -d "/tmp/cdist.XXXXXXXXXXXX") +: ${__cdist_tmp_base_dir=/tmp} +__cdist_tmp_dir=$(mktemp -d "$__cdist_tmp_base_dir/cdist.XXXXXXXXXXXX") __cdist_tmp_file=$(mktemp "$__cdist_tmp_dir/cdist.XXXXXXXXXXXX") ################################################################################ From a4c0b3df1fb23d02b7eaaf1c32be93cbdf764ec1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 8 Apr 2011 10:56:53 +0200 Subject: [PATCH 1259/6109] [DOC] explain and document __cdist_tmp_base_dir Signed-off-by: Nico Schottelius --- doc/man/man1/cdist-config.text | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/doc/man/man1/cdist-config.text b/doc/man/man1/cdist-config.text index 9d147988..0c8b0735 100644 --- a/doc/man/man1/cdist-config.text +++ b/doc/man/man1/cdist-config.text @@ -15,6 +15,28 @@ types, manifests, etc. Generally speaking, it's just usable from within the core and is only of interest for cdist-developers. +ENVIRONMENT VARIABLES +--------------------- +The following list contains environment variables that are known +to be changed by users in various situations. To change the variable, +use your current shell and export it, so all cdist-binaries know about it. + +__cdist_tmp_base_dir:: + Normally this points to /tmp. In case /tmp is not suitable for + cdist (i.e. has noexec flag setup) you can change this variable + to point to a better location. + + +EXAMPLES +-------- + +If /tmp has the noexec flag, you can use $HOME/.tmp for instance: + +-------------------------------------------------------------------------------- +export __cdist_tmp_base_dir=$HOME/.tmp +-------------------------------------------------------------------------------- + + SEE ALSO -------- cdist(7) From 10cc25330c7e397bf3788d5c49aaafafc4cbbbfb Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 8 Apr 2011 10:57:18 +0200 Subject: [PATCH 1260/6109] remove space at the end of the line Signed-off-by: Nico Schottelius --- bin/cdist-object-explorer-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-object-explorer-run b/bin/cdist-object-explorer-run index 79cd2865..b65c5cc1 100755 --- a/bin/cdist-object-explorer-run +++ b/bin/cdist-object-explorer-run @@ -44,7 +44,7 @@ if [ "$__cdist_has_explorer" ]; then __cdist_type_explorer_pushed_add "$__cdist_type" fi - __cdist_echo info "Running explorers " + __cdist_echo info "Running explorers" # Copy object parameters cdist-dir push "$__cdist_target_host" \ "$(__cdist_object_parameter_dir "$__cdist_object_self")" \ From bdb1c6e7a65e856bf6df121b26bd34d2dc6d065a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 8 Apr 2011 11:01:57 +0200 Subject: [PATCH 1261/6109] stuff for 1.6.2 Signed-off-by: Nico Schottelius --- doc/changelog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/changelog b/doc/changelog index 2fef50ca..83b2b6e3 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,3 +1,6 @@ +1.6.2: + * Core: Introduce __cdist_tmp_base_dir + 1.6.1: 2011-04-07 * Improved logging: Show code responsible for abort * Improved logging: Consistently prefix with current object or core From 08f37578fc1a685f60dfb69f14ec96f03b8dfe0d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 11 Apr 2011 11:13:06 +0200 Subject: [PATCH 1262/6109] +linklist Signed-off-by: Nico Schottelius --- doc/dev/logs/linklist | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 doc/dev/logs/linklist diff --git a/doc/dev/logs/linklist b/doc/dev/logs/linklist new file mode 100644 index 00000000..4ec144cb --- /dev/null +++ b/doc/dev/logs/linklist @@ -0,0 +1,2 @@ +http://groups.google.com/group/puppet-users/browse_thread/thread/83801a03c0fea665 +http://lists.debian.org/debian-user/2011/04/msg00818.html From 64826ca5ce29e913ce04ba3628a69bfbbc9a2429 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 12 Apr 2011 12:18:46 +0200 Subject: [PATCH 1263/6109] +links Signed-off-by: Nico Schottelius --- doc/dev/logs/linklist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/dev/logs/linklist b/doc/dev/logs/linklist index 4ec144cb..29d5ab96 100644 --- a/doc/dev/logs/linklist +++ b/doc/dev/logs/linklist @@ -1,2 +1,4 @@ http://groups.google.com/group/puppet-users/browse_thread/thread/83801a03c0fea665 http://lists.debian.org/debian-user/2011/04/msg00818.html +http://sans.ethz.ch/projects/puppet/ +http://www.nico.schottelius.org/eth/puppet/ From 0e42e98bb93ad5361cfd0b56142bb708b804c5c6 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 16 Apr 2011 23:27:01 +0200 Subject: [PATCH 1264/6109] begin to cleanup bin/cdist-type-template Signed-off-by: Nico Schottelius --- bin/cdist-type-template | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/cdist-type-template b/bin/cdist-type-template index dc853614..335a0ed9 100755 --- a/bin/cdist-type-template +++ b/bin/cdist-type-template @@ -26,9 +26,11 @@ set -eu __cdist_type="$1"; shift +__cdist_type_dir="$(__cdist_type_dir "$__cdist_type")" +echo "Creating type $__cdist_type in $__cdist_type_dir ..." # Base -mkdir -p "$(__cdist_type_dir "$__cdist_type")" +mkdir -p "$__cdist_type_dir" # Parameter mkdir -p "$(__cdist_type_parameter_dir "$__cdist_type")" From 10ebdd87d4e21c599dc29db6b604ed6e8d0fff0b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 16 Apr 2011 23:31:15 +0200 Subject: [PATCH 1265/6109] fixes + local and remote gencode Signed-off-by: Nico Schottelius --- bin/cdist-type-template | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/bin/cdist-type-template b/bin/cdist-type-template index 335a0ed9..772b7486 100755 --- a/bin/cdist-type-template +++ b/bin/cdist-type-template @@ -26,11 +26,11 @@ set -eu __cdist_type="$1"; shift -__cdist_type_dir="$(__cdist_type_dir "$__cdist_type")" +__cdist_my_type_dir="$(__cdist_type_dir "$__cdist_type")" -echo "Creating type $__cdist_type in $__cdist_type_dir ..." +echo "Creating type $__cdist_type in $__cdist_my_type_dir ..." # Base -mkdir -p "$__cdist_type_dir" +mkdir -p "$__cdist_my_type_dir" # Parameter mkdir -p "$(__cdist_type_parameter_dir "$__cdist_type")" @@ -38,11 +38,11 @@ touch "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_parameter_re touch "$(__cdist_type_parameter_dir "$__cdist_type")/${__cdist_name_parameter_optional}" # Manifest -cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_manifest}" +cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$__cdist_my_type_dir/${__cdist_name_manifest}" # # This is the manifest, which can be used to create other objects like this: -# __file /path/to/destination --source /from/where/ --type file +# __file /path/to/destination --source /from/where/ # # To tell cdist to make use of it, you need to make it executable (chmod +x) # @@ -50,8 +50,8 @@ cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cd eof -# Gencode -cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_gencode}" +# Gencode remote +cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_gencode}-${__cdist_name_gencode_remote}" # # This file should generate code on stdout, which will be collected by cdist @@ -63,5 +63,17 @@ cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cd eof +cat "$__cdist_abs_mydir/../doc/dev/header" - << eof > "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_gencode}-${__cdist_name_gencode_local}" + +# +# This file should generate code on stdout, which will be collected by cdist +# and run on the same machine cdist-deploy-to is executed. +# +# To tell cdist to make use of it, you need to make it executable (chmod +x) +# +# + +eof + # Explorer -mkdir -p "$(__cdist_type_dir "$__cdist_type")/${__cdist_name_explorer}" +mkdir -p "$__cdist_my_type_dir/${__cdist_name_explorer}" From 231eb1214c4de9b284edc84124ba8480901f5aa3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 16 Apr 2011 23:33:48 +0200 Subject: [PATCH 1266/6109] refuse to try to recreate a type Signed-off-by: Nico Schottelius --- bin/cdist-type-template | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/cdist-type-template b/bin/cdist-type-template index 772b7486..6d8a3f15 100755 --- a/bin/cdist-type-template +++ b/bin/cdist-type-template @@ -28,6 +28,10 @@ set -eu __cdist_type="$1"; shift __cdist_my_type_dir="$(__cdist_type_dir "$__cdist_type")" +if [ -d "$__cdist_my_type_dir" ]; then + __cdist_usage "Type $__cdist_type already exists" +fi + echo "Creating type $__cdist_type in $__cdist_my_type_dir ..." # Base mkdir -p "$__cdist_my_type_dir" From 24428b2070c22e96a8a19c878638610b4f3856bc Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 16 Apr 2011 23:35:07 +0200 Subject: [PATCH 1267/6109] more stuff for 1.6.2 Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index 83b2b6e3..2da35ad8 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,5 +1,6 @@ 1.6.2: * Core: Introduce __cdist_tmp_base_dir + * Core: Cleanup and enhance cdist-type-template 1.6.1: 2011-04-07 * Improved logging: Show code responsible for abort From da1d3fbc0469c56b393ee0df1d33096f2cfdb1e4 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 16 Apr 2011 23:51:24 +0200 Subject: [PATCH 1268/6109] begin new error catching code and make filter a function Signed-off-by: Nico Schottelius --- bin/cdist-mass-deploy | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy index 8a555411..294e1ca1 100755 --- a/bin/cdist-mass-deploy +++ b/bin/cdist-mass-deploy @@ -25,23 +25,38 @@ [ $# -ge 1 ] || __cdist_usage "[-p] [target host ]" set -eu +filter() +{ + awk -v host=$1 '{ print "[" host "] " $0 }' +} + parallel="" if [ "$1" = "-p" ]; then parallel=yes shift fi +i=0 while [ $# -ge 1 ]; do - # always assume we run parallel - cdist-deploy-to "$1" | awk -v host=$1 '{ print "[" host "] " $0 }' & - shift + if [ "$parallel" ]; then + cdist-deploy-to "$1" | filter + # Record pid and host for use later + eval pid_$i=$! + eval host_$i=\$1 + i=$((i+1)) + else + cdist-deploy-to "$1" | filter + fi - # if not, wait for it _now_ - [ "$parallel" ] || wait + shift done # else wait after all are started if [ "$parallel" ]; then __cdist_echo info "Waiting for cdist-deploy-to jobs to finish" + while [ $i -gt 0 ]; do + + done + wait fi From 0122ccc3eedabb8fcd07a9eacfe40dff5a7ec001 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 16 Apr 2011 23:56:10 +0200 Subject: [PATCH 1269/6109] in theory finish new error catching + displaying code Signed-off-by: Nico Schottelius --- bin/cdist-mass-deploy | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy index 294e1ca1..b78c032b 100755 --- a/bin/cdist-mass-deploy +++ b/bin/cdist-mass-deploy @@ -39,7 +39,7 @@ fi i=0 while [ $# -ge 1 ]; do if [ "$parallel" ]; then - cdist-deploy-to "$1" | filter + cdist-deploy-to "$1" | filter & # Record pid and host for use later eval pid_$i=$! eval host_$i=\$1 @@ -47,16 +47,20 @@ while [ $# -ge 1 ]; do else cdist-deploy-to "$1" | filter fi - shift done # else wait after all are started if [ "$parallel" ]; then __cdist_echo info "Waiting for cdist-deploy-to jobs to finish" - while [ $i -gt 0 ]; do - + while [ "$i" -gt 0 ]; do + eval pid=\$pid_$i + eval host=\$host_$i + wait "$pid" + if [ $? -ne 0 ]; then + __cdist_echo error "Configuration of host $host failed." + fi + i=$((i-1)) + shift done - - wait fi From 9c60a81d8a9ced7f9266602bc8a53b5ff226f661 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 16 Apr 2011 23:57:20 +0200 Subject: [PATCH 1270/6109] decrease first, last number is unused Signed-off-by: Nico Schottelius --- bin/cdist-mass-deploy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy index b78c032b..3d497436 100755 --- a/bin/cdist-mass-deploy +++ b/bin/cdist-mass-deploy @@ -53,14 +53,14 @@ done # else wait after all are started if [ "$parallel" ]; then __cdist_echo info "Waiting for cdist-deploy-to jobs to finish" - while [ "$i" -gt 0 ]; do + while [ "$i" -ge 0 ]; do + i=$((i-1)) eval pid=\$pid_$i eval host=\$host_$i wait "$pid" if [ $? -ne 0 ]; then __cdist_echo error "Configuration of host $host failed." fi - i=$((i-1)) shift done fi From 471b8a73088d0141cba6d59cd5cf04232b1e691b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 16 Apr 2011 23:57:46 +0200 Subject: [PATCH 1271/6109] pass hostname to filter Signed-off-by: Nico Schottelius --- bin/cdist-mass-deploy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy index 3d497436..b4ccc8ff 100755 --- a/bin/cdist-mass-deploy +++ b/bin/cdist-mass-deploy @@ -39,13 +39,13 @@ fi i=0 while [ $# -ge 1 ]; do if [ "$parallel" ]; then - cdist-deploy-to "$1" | filter & + cdist-deploy-to "$1" | filter "$1" & # Record pid and host for use later eval pid_$i=$! eval host_$i=\$1 i=$((i+1)) else - cdist-deploy-to "$1" | filter + cdist-deploy-to "$1" | filter "$1" fi shift done From a51267356297bacf3e90354bf672c246234a0610 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 17 Apr 2011 00:00:55 +0200 Subject: [PATCH 1272/6109] more small things for 1.6.2 Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index 2da35ad8..1d2c3565 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,6 +1,7 @@ 1.6.2: * Core: Introduce __cdist_tmp_base_dir * Core: Cleanup and enhance cdist-type-template + * Core: cdist-mass-deploy: Report failed cdist-deploy-to instances 1.6.1: 2011-04-07 * Improved logging: Show code responsible for abort From 01a541d0176ff3d584d4ddc16b1ff85b2fc0366a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 17 Apr 2011 00:10:07 +0200 Subject: [PATCH 1273/6109] use different count to ignore case of 0 hosts Signed-off-by: Nico Schottelius --- bin/cdist-mass-deploy | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy index b4ccc8ff..bd6bd406 100755 --- a/bin/cdist-mass-deploy +++ b/bin/cdist-mass-deploy @@ -41,26 +41,33 @@ while [ $# -ge 1 ]; do if [ "$parallel" ]; then cdist-deploy-to "$1" | filter "$1" & # Record pid and host for use later + i=$((i+1)) eval pid_$i=$! eval host_$i=\$1 - i=$((i+1)) else cdist-deploy-to "$1" | filter "$1" fi shift done -# else wait after all are started +e=0 if [ "$parallel" ]; then __cdist_echo info "Waiting for cdist-deploy-to jobs to finish" - while [ "$i" -ge 0 ]; do - i=$((i-1)) + while [ "$i" -gt 0 ]; do eval pid=\$pid_$i - eval host=\$host_$i wait "$pid" if [ $? -ne 0 ]; then - __cdist_echo error "Configuration of host $host failed." + e=$((e+1)) + eval e_host_$e=\$host_$i fi + i=$((i-1)) shift done fi + +# Display all failed hosts after all runs are done +while [ "$e" -gt 0 ]; do + eval host=\$host_$e + __cdist_echo error "Configuration of host $host failed." + e=$((e-1)) +done From 91106ba0af4f7be86cfe25f3be62d6892eee8bd3 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 17 Apr 2011 00:11:23 +0200 Subject: [PATCH 1274/6109] comment for sysadmins Signed-off-by: Nico Schottelius --- bin/cdist-mass-deploy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy index bd6bd406..1c6baa69 100755 --- a/bin/cdist-mass-deploy +++ b/bin/cdist-mass-deploy @@ -65,7 +65,7 @@ if [ "$parallel" ]; then done fi -# Display all failed hosts after all runs are done +# Display all failed hosts after all runs are done, so the sysadmin gets them while [ "$e" -gt 0 ]; do eval host=\$host_$e __cdist_echo error "Configuration of host $host failed." From 20f0a788b143c45b19c09ae73293e76df3cffaa9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 17 Apr 2011 11:32:11 +0200 Subject: [PATCH 1275/6109] use -gt consistently Signed-off-by: Nico Schottelius --- bin/cdist-mass-deploy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cdist-mass-deploy b/bin/cdist-mass-deploy index 1c6baa69..e8e2594f 100755 --- a/bin/cdist-mass-deploy +++ b/bin/cdist-mass-deploy @@ -37,7 +37,7 @@ if [ "$1" = "-p" ]; then fi i=0 -while [ $# -ge 1 ]; do +while [ $# -gt 0 ]; do if [ "$parallel" ]; then cdist-deploy-to "$1" | filter "$1" & # Record pid and host for use later From 14cb98b4f980832d19ff193b777aa018e815de48 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 18 Apr 2011 08:35:52 +0200 Subject: [PATCH 1276/6109] seperate branches for more than one feature, please Signed-off-by: Nico Schottelius --- doc/man/man7/cdist-hacker.text | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/doc/man/man7/cdist-hacker.text b/doc/man/man7/cdist-hacker.text index f9f08e31..027f28aa 100644 --- a/doc/man/man7/cdist-hacker.text +++ b/doc/man/man7/cdist-hacker.text @@ -55,12 +55,16 @@ There are though some requirements to ensure your changes don't break others work nor kill the authors brain: - Code submission must be done via git -- Code to be included should be branched of the upstream "master" branch - - Exception: Bugfixes to a version branch -- Code submissions must be in your master branch - - Exception: If you only want a comment on your code, but not an inclusion. - Do not add conf/manifest/init - This file should only be touched in your private branch! +- Code to be included should be branched of the upstream "master" branch + - Exception: Bugfixes to a version branch +- Code submissions should be in your master branch + - Other branches are fine as well, but you need to tell me which branch + your work is in! +- If you developed more than **one** feature, consider submitting them in + seperate branches. This way one feature can already be included, even if + the other needs to be improved. As soon as your work meets these requirements, you can contact me (IRC, Mailinglist, Phone, RFC 1149) and I'll check your code before From c929ce09776e0b335ef1de3bb24ca74e8ac3199e Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 19 Apr 2011 13:42:14 +0200 Subject: [PATCH 1277/6109] begin logfile for today Signed-off-by: Nico Schottelius --- doc/dev/logs/2011-04-19 | 67 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 doc/dev/logs/2011-04-19 diff --git a/doc/dev/logs/2011-04-19 b/doc/dev/logs/2011-04-19 new file mode 100644 index 00000000..65b9550b --- /dev/null +++ b/doc/dev/logs/2011-04-19 @@ -0,0 +1,67 @@ +Meeting with: Steven, Thorsten, Nico + +Problem: execute my code only if somebody else's changed something. + +Proposals: + +1) Introduce new binary (Steven) + +gencode: + +if has_changed __file/etc/nginx.conf; then + echo mycode +fi + +2) Use -f plus new variable to cover .cdist/has_code: + +if [ -f $global/objects/__file/etc/nginx.conf/$has_code ]; then + echo mycode +fi + +And $has_code resolves to .cdist/has_code to cover the .cdist +directory. + +3) Create a new tree that contains changed objects + +if [ -e $global/changed/__file/etc/nginx.conf ]; then + echo mycode +fi + +4) Use a \n seperated list + +if grep -q __file/etc/nginx.conf $global/changed; then + echo mycode +fi + +X) General problem (add to FAQ): + + When having "do something only if somebody else did something" + it is possible that users get confused, because code will not + be executed. + + This may especially happen in code development: + + a) User creates __file/etc/nginx.conf + b) User creates a new type __nginx that restarts + nginx, only if __file/etc/nginx.conf changed. + But __file/etc/nginx.conf has already been deployed + and thus will never be restarted. +-------------------------------------------------------------------------------- + +Introduce exclude/conflicts attribute for types? + + Handling in cdist vs. handling in the types themselves? + + Examples: __file, __link, __directory + + Need to handle errors on low level for those anyway. + + Conclusion: Wait until we need exclude in a different type. + + Pro: + Throw error as soon as possible without touching the target. + + Contra: + No needod for most cases. + Very controversal for stuff like __package and __package_gem + for instance: rails; Should those two conflict or not? From 0e5cb9b11f1c2609214711b22691b47b92101545 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 19 Apr 2011 13:43:03 +0200 Subject: [PATCH 1278/6109] cdist type template works Signed-off-by: Nico Schottelius --- doc/dev/todo/niconext | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/dev/todo/niconext b/doc/dev/todo/niconext index a02d7013..887856d5 100644 --- a/doc/dev/todo/niconext +++ b/doc/dev/todo/niconext @@ -1,5 +1,3 @@ -Fix bin/cdist-type-template - Cleanup documentation: type reference -> add types + manpages add explorer reference From 4d244e9ea2ff10521a9216166bacf53598f02d20 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 19 Apr 2011 22:30:06 +0200 Subject: [PATCH 1279/6109] =?UTF-8?q?import=20=5F=5Fssh=5Fauthorized=5Fkey?= =?UTF-8?q?=20from=20Aur=C3=A9lien's=20tree?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nico Schottelius --- conf/type/__ssh_authorized_key/man.text | 46 ++++++++++++++++ conf/type/__ssh_authorized_key/manifest | 55 +++++++++++++++++++ .../__ssh_authorized_key/parameter/optional | 2 + 3 files changed, 103 insertions(+) create mode 100644 conf/type/__ssh_authorized_key/man.text create mode 100755 conf/type/__ssh_authorized_key/manifest create mode 100644 conf/type/__ssh_authorized_key/parameter/optional diff --git a/conf/type/__ssh_authorized_key/man.text b/conf/type/__ssh_authorized_key/man.text new file mode 100644 index 00000000..af0c2017 --- /dev/null +++ b/conf/type/__ssh_authorized_key/man.text @@ -0,0 +1,46 @@ +cdist-type__ssh_authorized_key(7) +================================= +Aurélien Bondis - aurelien.bondis AT gmail DOT com + + +NAME +---- +cdist-type__ssh_authorized_key - Sends a user's public key to another user's authorized_keys + + +DESCRIPTION +----------- +This type sends a rsa key. By default uses root's key and sends it to root's authorized_keys + + +REQUIRED PARAMETERS +------------------- +None. + + +OPTIONAL PARAMETERS +------------------- +srcuser:: the user to take the rsa public key from +dstuser:: the user to give the rsa public key to + + +EXAMPLES +-------- + +-------------------------------------------------------------------------------- +#deploy root's public key +__ssh_authorized_key admin +#deploy bob's public key to alice's authorized_keys +__ssh_authorized_key --srcuser bob --dstuser alice +-------------------------------------------------------------------------------- + + +SEE ALSO +-------- +- cdist-type(7) + + +COPYING +------- +Free use of this software is +granted under the terms of the GNU General Public License version 3 (GPLv3). diff --git a/conf/type/__ssh_authorized_key/manifest b/conf/type/__ssh_authorized_key/manifest new file mode 100755 index 00000000..efadc3f6 --- /dev/null +++ b/conf/type/__ssh_authorized_key/manifest @@ -0,0 +1,55 @@ +#!/bin/sh +# +# 2011 Aurélien Bondis aurelien.bondis AT gmail DOT com +# +# 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 . +# +# +# This type allows to send a public ssh key from a user to the +# authorized_keys of another +# +#require="__package openssh-server --state installed" +# Get option srcuser if defined +if [ -f "$__object/parameter/srcuser" ]; then + srcuser=`cat "$__object/parameter/srcuser"` +fi +# Get option dstuser if defined +if [ -f "$__object/parameter/dstuser" ]; then + dstuser=`cat "$__object/parameter/dstuser"` +fi + +# if a source user is defined, use it's public key +if [ "$srcuser" ]; then + srcrsa="/home/${srcuser}/.ssh/id_rsa.pub" +# if no source user is defined we use root's public key +else + srcrsa="/root/.ssh/id_rsa.pub" +fi +# if a destination user is defined, insert in it's authorized_keys +if [ "$dstuser" ]; then + sshpath="/home/$dstuser/.ssh" +# if no destination user is defined we use root's home +else + sshpath="/root/.ssh" +fi +rsa=`cat $srcrsa` +__directory $sshpath +# the file authorized_keys depends on the .ssh folder +require="__directory${sshpath}" __file "$sshpath/authorized_keys" --mode 640 +# the line added depends on authorized_keys existence +require="__file${sshpath}/authorized_keys" __addifnosuchline sshkey --file \ + "$sshpath/authorized_keys" --line "$rsa" + diff --git a/conf/type/__ssh_authorized_key/parameter/optional b/conf/type/__ssh_authorized_key/parameter/optional new file mode 100644 index 00000000..4903f5be --- /dev/null +++ b/conf/type/__ssh_authorized_key/parameter/optional @@ -0,0 +1,2 @@ +srcuser +dstuser From c6d7ad31243fd65a0e5127b80a9e87acabfecb27 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 19 Apr 2011 22:30:56 +0200 Subject: [PATCH 1280/6109] =?UTF-8?q?++changes=20for=201.6.2:=20Imported?= =?UTF-8?q?=20=5F=5Fssh=5Fauthorized=5Fkey=20from=20Aur=C3=A9lien?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nico Schottelius --- doc/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changelog b/doc/changelog index 1d2c3565..be175ffd 100644 --- a/doc/changelog +++ b/doc/changelog @@ -2,6 +2,7 @@ * Core: Introduce __cdist_tmp_base_dir * Core: Cleanup and enhance cdist-type-template * Core: cdist-mass-deploy: Report failed cdist-deploy-to instances + * New Type __ssh_authorized_key (Aurélien Bondis) 1.6.1: 2011-04-07 * Improved logging: Show code responsible for abort From 08db913134d6c3274c76f9b59cafb7434a1ebd98 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 19 Apr 2011 22:34:13 +0200 Subject: [PATCH 1281/6109] add releasechecklist Signed-off-by: Nico Schottelius --- doc/dev/releasechecklist | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/dev/releasechecklist diff --git a/doc/dev/releasechecklist b/doc/dev/releasechecklist new file mode 100644 index 00000000..aefbfe4d --- /dev/null +++ b/doc/dev/releasechecklist @@ -0,0 +1,16 @@ +# Stuff to take care of when doing a release + +# adjust version +vi bin/cdist-config + +# adjust release date +vi doc/changelog + +# Import into current version branch +git checkout 1.6 +git merge master + +# Ensure documentation builds cleanly +./build.sh clean && ./build.sh man + + From 458126e700c2211d3b43409bce46d5d28d522716 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 19 Apr 2011 22:34:47 +0200 Subject: [PATCH 1282/6109] begin to make checklist a script Signed-off-by: Nico Schottelius --- doc/dev/releasechecklist | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/dev/releasechecklist b/doc/dev/releasechecklist index aefbfe4d..cbb5bb72 100644 --- a/doc/dev/releasechecklist +++ b/doc/dev/releasechecklist @@ -1,4 +1,7 @@ +#!/bin/sh + # Stuff to take care of when doing a release +echo "Preparing next release" # adjust version vi bin/cdist-config From 7a8559fe52104feaa1a3453ac6ffa6214d28a4ad Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 19 Apr 2011 22:40:51 +0200 Subject: [PATCH 1283/6109] in theory finish releasechecklistscript Signed-off-by: Nico Schottelius --- doc/dev/releasechecklist | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) mode change 100644 => 100755 doc/dev/releasechecklist diff --git a/doc/dev/releasechecklist b/doc/dev/releasechecklist old mode 100644 new mode 100755 index cbb5bb72..379954e7 --- a/doc/dev/releasechecklist +++ b/doc/dev/releasechecklist @@ -1,19 +1,31 @@ -#!/bin/sh +#!/bin/sh -e + +files="bin/cdist-config doc/changelog" # Stuff to take care of when doing a release echo "Preparing next release" -# adjust version -vi bin/cdist-config - -# adjust release date -vi doc/changelog - -# Import into current version branch -git checkout 1.6 -git merge master - # Ensure documentation builds cleanly ./build.sh clean && ./build.sh man +# get version +version=$(awk -F'=' '/^__cdist_version/ { print $2 }' bin/cdist-config | sed 's/"//g') +# get target branch +branch=${version%.?} + +# adjust version and release date +vi $files + +# Commit stuff +git commit $files + +# Import into current version branch +git checkout $branch +git merge master + +# Publish manpages and sourcecode +./build.sh web +./build.sh pub + +# FIXME: add tagging somewhere! From efe1d3db7984f3715b8b657a2bca7a61ae83d31a Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 19 Apr 2011 22:43:18 +0200 Subject: [PATCH 1284/6109] Prepare files for the next release --- bin/cdist-config | 2 +- doc/changelog | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/cdist-config b/bin/cdist-config index 44a95f01..366b7993 100755 --- a/bin/cdist-config +++ b/bin/cdist-config @@ -19,7 +19,7 @@ # # -__cdist_version="1.6.1" +__cdist_version="1.6.2" # Fail if something bogus is going on set -u diff --git a/doc/changelog b/doc/changelog index be175ffd..e2d6bb49 100644 --- a/doc/changelog +++ b/doc/changelog @@ -1,4 +1,4 @@ -1.6.2: +1.6.2: 2011-04-19 * Core: Introduce __cdist_tmp_base_dir * Core: Cleanup and enhance cdist-type-template * Core: cdist-mass-deploy: Report failed cdist-deploy-to instances From c2454b645b5be1b40c61dceb04a5e2e4f32ca7ba Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 19 Apr 2011 22:43:49 +0200 Subject: [PATCH 1285/6109] add tag support Signed-off-by: Nico Schottelius --- doc/dev/releasechecklist | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/dev/releasechecklist b/doc/dev/releasechecklist index 379954e7..098ead06 100755 --- a/doc/dev/releasechecklist +++ b/doc/dev/releasechecklist @@ -20,6 +20,11 @@ vi $files # Commit stuff git commit $files +# add tag +printf "Enter description for %s>" "$version" +read tagmessage +git tag "$version" "$tagmessage" + # Import into current version branch git checkout $branch git merge master @@ -27,5 +32,3 @@ git merge master # Publish manpages and sourcecode ./build.sh web ./build.sh pub - -# FIXME: add tagging somewhere! From 3de78bfaed74cc64be364825cf6e20ab4546c583 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 19 Apr 2011 22:45:05 +0200 Subject: [PATCH 1286/6109] + push architecture in readme Signed-off-by: Nico Schottelius --- README | 1 + 1 file changed, 1 insertion(+) diff --git a/README b/README index 350cd3e1..2d97f20c 100644 --- a/README +++ b/README @@ -35,6 +35,7 @@ Design | Meaningful error messages - do not lose time debugging error messages Design | Consistency in behaviour, naming and documentation Design | No surprise factor: Only do what is obviously clear, no magic Design | Define target state, do not focus on methods or scripts +Design | Push architecture: Instantly apply your changes Small core | cdist's core is very small - less code, less bugs Fast development | Focus on straightforwardness of type creation is a main development objective Requirements, Scalability | No central server needed, cdist operates in push mode and can be run from any computer From 6d5962826a9bfda60ab914de59cd4d2f15404678 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 19 Apr 2011 22:48:28 +0200 Subject: [PATCH 1287/6109] change back to master after everything is done Signed-off-by: Nico Schottelius --- doc/dev/releasechecklist | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/dev/releasechecklist b/doc/dev/releasechecklist index 098ead06..5568ee35 100755 --- a/doc/dev/releasechecklist +++ b/doc/dev/releasechecklist @@ -28,6 +28,7 @@ git tag "$version" "$tagmessage" # Import into current version branch git checkout $branch git merge master +git checkout master # Publish manpages and sourcecode ./build.sh web From 5cc626a2a10e771e34b2b5a78347ccc4f3a76bea Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 19 Apr 2011 23:47:26 +0200 Subject: [PATCH 1288/6109] add a video showing a cdist installation in less than 60 seconds Signed-off-by: Nico Schottelius --- ...st-installation-in-less-than-60-seconds.mp4 | Bin 0 -> 590996 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/video/cdist-installation-in-less-than-60-seconds.mp4 diff --git a/doc/video/cdist-installation-in-less-than-60-seconds.mp4 b/doc/video/cdist-installation-in-less-than-60-seconds.mp4 new file mode 100644 index 0000000000000000000000000000000000000000..cdccbe43406af40fa498799ffcd727acbba85201 GIT binary patch literal 590996 zcmeFZ1z1;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