Copy the mode (permissions) for configured files.

This makes the executables executable again.
Remove hardcoded /usr/share/cobbler path

Determine the directories to add to sys.path with the inspect module (they
are relative to the current file)
Support for virtualenv out of the box

If cobbler is installed using a virtualenv python it will use (and setup)
this python for its scripts and wsgi processes automatically.

The directory directives are needed on opensuse since it still uses apache 2.2.
Add some logging in cobblerd

cobblerd failed to start and the backtrace is nowhere to be found (here?).
At least log the message so its possible to fix the problem.
Strip the distribution names

On my system platform.linux_distribution() returns "opensuse " for some reason.
Play safe.
Improve regen_ss_file()

 - use python stdlib instead of os.system()
 - always change the owner of the file. Not only on creation.

The os.system() call failed for me because it tried with user apache that does not exist here.
With this code you can see the problem.
cli.py:  more meaningful messages on server exceptions

Make it clear that the exception originates server-side, and don't
trim the string, which may not be enclosed in quotes
utils.py:  fix set_virt_type() when value is <<inherit>>
koan/app.py:  get .ks file from --server host, not profile data

The profile's 'server' attribute address may not be addressable by the
VM host for retrieving the kickstart file to obtain install tree
information.

Instead, retrieve the kickstart file from the cobbler server specified
in the '--server' argument.
koan/app.py:  handle kickstart url '--proxy' argument

'--proxy' is a valid argument for the 'url' and 'repo' kickstart
options:

  url --url http://repos.example.com/repo --proxy=proxy.example.com:3128
koan/utils.py:  fix subprocess_get_response() to work with python 2.6

subprocess.check_output() was introduced in python 2.7, but EL6 is on
python 2.6.

Use the basic Popen() instead.
utils.py:  add option default to add_options_from_fields() choices

If the default option is not in the option list, add it.

Most notably, this adds '<<inherit>>' as a choice to many options with
a fixed list of choices.
Distro inheritance:  do what's expected

*** This is an experimental patch, not well tested and incomplete ***

Profile objects may have the 'distro' attribute set at any level in
the inheritance tree.

Other missing attributes are inherited from the closest ancestor where
the attribute is set.  However, 'distro' attribute was not, and the
distro was always selected from the base profile in the hierarchy.

This countered expectations when higher-level profile 'distro' attributes
were set but not honored.

Some of the changed code is hacking around Profile.get_parent(), which
returns the distro object if there's no self.parent.  I don't know the
code well enough to remove that behavior.

Changes:

The tree objects have a new 'get_inherited_distro()' method that
returns the distro object set in the nearest ancestor (starting with
itself).  ('get_distro()' is a helper function)

Then utils.grab_tree() builds the tree with the inherited distro at
the base instead of the base profile's distro.  When utils.blender()
runs __consolidate(), the attributes from the inherited distro are
picked.  (__consolidate() also no longer treats the Profile.distro
attribute specially, so it is inherited as other attributes and
matches the inherited distro object.)

A few places in kickgen.py where 'distro =
profile.get_conceptual_parent()' are replaced with
get_inherited_distro() instead.  There are many other such places that
need to be examined.
koan: Add storage pool refresh function

When an RBD volume is created with qemu-img, libvirt is not
automatically notified, and trying to attach the volume causes an
exception.  The storage_pool_refresh() function scans uses virsh to
scan pools, and any pool that contains one of the created disks is
refreshed so that libvirt knows the volume exists.
koan:  support rbd volumes

Add rbd to driver lists and fix problems with rbd
source-protocol/format/driver confusion.

qemu-img/kvm and virt-install have different requirements for disk
args specification.

The qemu-img '-f' option stands for 'format', except when creating RBD
volumes (or maybe any 'network' type disk, incl. iSCSI and sheepdog?),
it stands for 'protocol', an attribute in 'network'-type disk 'source'
elements.  In addition, qemu-img (qemu in general) wants the disk
identifier to be preceded by 'rbd:', which virt-manager and libvirt do
not.

Since the RBD volume is being created by qemu-img, virt-manager
considers it 'managed or other existing storage', and therefore wants
the disk identifier specified in '--disk vol=' rather than '--disk
path='.  It also complains about specifying 'format=' for existing
volumes (and if that were allowed, would be 'raw', not 'rbd').
Add source /etc/sysconfig/cobblerd to init script
setup.py:  fix man page install source glob