Some files are taken from the host and managed as intermediate
config files during the build of the image. Changes to those
files during the build run by e.g a script will not become
effective because the file gets restored. With this patch we
detect the modification condition and throw a warning message
such that the author of the image can adapt the description
as suggested in the message. This Fixes#817
Some config files e.g etc/hosts needs to be temporary copied
from the buildsystem host to the image root system. This is
done by a custom copy with the .kiwi extension and a symlink
to that file. During the installation process the package
manager either overwrites the file or creates a .rpmnew variant.
In case a .rpmnew variant exists there is code in kiwi which
restores that .rpmnew variant to become the real file. However
that _restore_intermediate_config_rpmnew_variants() method
runs after overlay files has been applied to the system because
it's part of the final cleanup step. In order to preserve
an eventual overlay version of the file the .rpmnew variant
gets only restored if the real file does not exist.
This Fixes#807
In root_bind if the cleanup failed to remove a directory
hierarchy the error message was just displaying the path
as it would be on the host root and not based on the root
of the image root tree.
move_to_root is called to check each element of a given list
and changes any path specification to a valid path if the given
root path would be it's root(/). This tranformation implied the
creation of paths containing double slashes like //foo which
was considered harmless. However it has turned out that the dnf
package manager makes a difference here which requires to fix
the resulting paths. This Fixes#761
kiwi uses e.g etc/hosts from the host system for proper name
resolution during the build. The temporary variant of that
file will be deleted by kiwi at the end of the installation
process. However depending on the package manager and the
distribution it could happen that the intermediate config
file added by kiwi is treated as existing config variant.
In case of rpm a .rpmnew file variant of the config file
is created and that needs to be handled by kiwi. Therefore
this patch adds a private restore method for the .rpmnew
case. It might be needed to add other restore methods to
deal with this issue depending on how other (non rpm) based
package managers handles the situation. Fixes#104
All mkdtemp created directories are created with the 'kiwi_'
prefix. In addition all code parts which leaves tmpdirs in
the system after kiwi is done were fixed