Merge branch 'master' into install

Conflicts:
	lib/cdist/config.py
	lib/cdist/path.py

Merged changes from config.py to config_install.py

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-10-06 16:52:20 +02:00
commit 54fb9e6c3f
14 changed files with 201 additions and 218 deletions

View file

@ -1,6 +1,7 @@
2.0.3:
* Improved logging, added --verbose, by more quiet by default
* Bugfix __user: Correct quoting (Steven Armstrong)
* FIXME: Support for __remote_exec and __remote_copy
2.0.2: 2011-09-27
* Add support for detection of OpenWall Linux (Matthias Teege)

View file

@ -0,0 +1,87 @@
Commands needed:
conf/cmd/remote_exec
conf/cmd/copy
If ! conf/cmd/remote_exec:
use builtin
If ! conf/cmd/copy:
use builtin
--------------------------------------------------------------------------------
--cmd-dir?
$__cdist_cmd_dir
--------------------------------------------------------------------------------
-> Depend on session!
Builtin:
cdist.exec.run_or_fail(["scp", "-qr", source,
self.remote_user + "@" +
self.target_host + ":" +
destination])
self.remote_prefix = ["ssh", self.remote_user + "@" + self.target_host]
self.remote_user = remote_user
self.remote_prefix = remote_prefix
--------------------------------------------------------------------------------
What is in a session?
base_dir
target_host
--------------------------------------------------------------------------------
remote_user
pseudo-static, can be hardcoded again
--------------------------------------------------------------------------------
Result:
os.environ['__remote_exec'] = ["ssh", "-l", "root" ]
os.environ['__remote_exec'] = ["ssh", "-o", "User=root" ]
os.environ['__remote_copy'] = ["scp", "-o", "User=root" ]
__remote_exec=~/sudossh __remote_copy=... cdist config localhost
~/sudossh hostname $@...
~/sudocopy a hostname:b
~/chrootssh
~/chrootcopy
a)
3 cmd verzeichnnise: cdist, sudo, chroot
pro aufruf variable ändern
b)
1 dir, mit zeug
pro aufruf variablen ändern
conf/cmd/remote_exec
args for __remote_exec
$1 = hostname
$2 - ... = stuff to be executed in /bin/sh on remote side
$2 - $7 = env
$7 - 12 = cmd
args for __remote_copy
$1 = file here
$2 = hostname:destination
--------------------------------------------------------------------------------
There needs to be an easy way to change those cmds!
--------------------------------------------------------------------------------
Env-Passing:
_a=b test -> test can access $_a
_a=b test $_a -> $1 = "", because _a is *not* set within the shell
_a=b; test -> can access $_a
_a=b; test $_a -> $1 == "b"

View file

@ -1,48 +0,0 @@
cdist-config(1)
===============
Nico Schottelius <nico-cdist--@--schottelius.org>
NAME
----
cdist-config - Read basic cdist configuration
DESCRIPTION
-----------
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.
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)
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).

View file

@ -1,49 +0,0 @@
cdist-env(1)
============
Nico Schottelius <nico-cdist--@--schottelius.org>
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. 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 `./bin/cdist-env`
--------------------------------------------------------------------------------
For bourne shell, there is also a shorter version:
--------------------------------------------------------------------------------
. ./bin/cdist-env
--------------------------------------------------------------------------------
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).

View file

@ -1,47 +0,0 @@
cdist-quickstart(1)
===================
Nico Schottelius <nico-cdist--@--schottelius.org>
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).

View file

@ -1,56 +0,0 @@
cdist-type-emulator(1)
======================
Nico Schottelius <nico-cdist--@--schottelius.org>
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).

View file

@ -46,9 +46,8 @@ work nor kill the authors brain:
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!
- On a merge request, always name the branch I should pull from
- Always ensure **all** manpages build: ./build.sh man
- 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.