qemu/tests/cfg/kernel_install.cfg: Uncoment all variants

It is not a problem that they are all uncommented. Just
use the variant you need.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
qemu/tests/kernel_install.py: Fix typos and control file location

The control file location now can be determined using
the data dir module.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
shared/deps: Add patched boottool

Current autotest upstream has a strange bug that makes
setting up a boot entry on a guest system not possible.

Ship this file with a patch to the problem for the time
being. We plan on getting rid of it as soon as autotest
0.15.X rpms are packaged and ubiquitous.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
shared/deps: Add patched test kernel install autotest client module

Ship this modified version of the autotest module
necessary to execute the kernel install test. As
this module utility mostly for virt-tests, the original
client module will be dropped from autotest-client-tests.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virttest.utils_test: Numerous fixes to the run_autotest function

In order to make the kernel install (and other autotest
tests) viable again even when using the autotest client
from the system wide install (rpm), perform a number of
changes in the run_autotest function:

 * Locate the needed autotest pieces on a system wide
   install
 * Set the destination autotest path in the guest to
   '/usr/local/autotest', unconditionally
 * Modify the global_config.ini to be copied to the
   guest to honor the dest autotest path
 * Send a patched version of the boottool to the guest
   instead of the one provided by autotest
 * Send a patched version of the kernel install
   autotest client module to the guest instead of
   the one provided by autotest

Although not quite what we want, it is the only way
to work around the current autotest 0.14.3 rpm install
limitations. We'd like to drop the modified versions
ASAP.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
guest kernel install: Auto configure kernels

If no kernel configure file was provided, just let
autotest auto configure the kernel, based on the
guest current running kernel config.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
qemu/tests/cfg/kernel_install.cfg: Improve comments

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
guest kernel install test: Use install_what_provides directly

That will produce the same outcome as calling provides
and then using the output to install the package.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
guest kernel install: Use a more robust way to install koji/brew pkgs

Since we might have problems checking for packages that
provide a given file, let's try to be more robust and
provide the names of the koji and brew providers directly.

Although slightly less flexible, the package names are
not expected to change soon, and this avoids yum problems
fetching up information (SSL errors).

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
guest kernel install: Hardcode brew/koji pkg names

Fedora 18 has shown us that using yum.YumBase() is
not so safe as we previously thought. The CLI app
does a lot of housekeeping that we've been unable
to replicate using the parts of the yum API that we
could've figured out.

Therefore, be more direct and hardcode the names
of the packages that might provide brew or koji.
This way, when we call install() on them, we're
invoking the CLI, that will do all the housekeeping
and avoid errors.

Also, handle better errors when we couldn't get
a package information from brew, raise an error
much more understandable for the user.

signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
guest kernel install: Log kernel before kernel install attempt

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
utils_test.run_autotest: Only process results if non None

This is a little correction to avoid IndexErrors in case
results processing failed.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
kernel_install.cfg: Switch to koji specs

It is easier to handle different OS (RHEL vs Fedora),
and parameter passing if we turn the multitude of params
you may pass to koji client:

* Koji builds
* Koji tags
* Subpackages

Into a single string encoding those. KojiSpec already
deals with it and reduces the complexity.

Provide an example of kernel install via brew for
RHEL 6.3.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>