grubby: add grubby boot manager as a client dep

This is a requirement for the new boottool(.py) implementation,
which depends on grubby. Making a client dep allows one
to install grubby easily on systems that do ship or install
it by default.

Please notice that if you plan to use boottool(.py) as a
standalone tool, it also includes the ability to auto install
grubby.

The versioning scheme used for grubby is not official. It
adds '-autotest' to distinguish from the official version. Our
goal is to have all the functionality in the -autotest version
merged upstream, so that we'll be able to follow the official
version.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
boottool: introduce boottool rewrite

With the introduction of new bootloader versions, most notably
grub2[1], support would have to be introduced to the boottool.
While doing some shopping, we noticed that grubby[2] had support
for all bootloaders that boottool offered plus grub2.

This new boottool, introduced here, is a simple wrapper for
grubby, to account for command line syntax and output
compatiblity. The long-term plan is to drop this new boottool
and rely on grubby directly.

[1] AKA grub, because grub 1 is now know as grub legacy
[2] http://git.fedorahosted.org/git/grubby.git

Changes from v7:
 * Rework logging system
 * Bumped grubby version
 * Fixed grubby version regex

Changes from v6:
 * Fixed typos
 * Made EliloConf a new style class

Changes from v5:
 * Implemented set_default_by_index and fix call of get_entry_indexes()
 * Implemented --default and --set-default actions
 * Updated exported symbols (__all__)
 * Made parse_entry a function, to ease its use by server side code

Changes from v4:
 * Made EfiVar and EfiToolSys inherit from object (lmr)
 * EfiToolSys checks the basic directory structure at at init (lmr)
 * _max_index replaced by _get_entry_indexes (lmr)
 * Removed xen_hypervisor parameter from add_kernel (lmr)

Changes from v3:
 * Respect --debug= command line options
 * Respect --bootloader= command line option
 * Better format the messages output via the logging system
 * Removed FIXMEs on XEN support
 * Style and spacing fixes
 * Improved find_executable and make it a function
 * Automatically install grubby if it's not found
 * Simplified version check routines
 * remove attempt to support boot once on ia64 with 2.4 kernels
 * Introduced EliloConf, simple parser for elilo config file
 * Completed support for boot once on ia64
 * Updated mininum required version of grubby to 8.9

Changes from v2:
 * Log messages on BoottoolApp should start with that as a prefix
 * Stardandization of return values from API and actions methods
 * Opmization while checking for harmful messages on boot once for
   gruby
 * Naming fixes recommended by pylint
 * Makefile patching for explicity adding libuuid on RHEL4
 * Python 2.4 compatibility issue with tarfile's extractall()
 * Fixes for ia64 and temporary placeholders for boot_once
 * Introduced classes to manipulate EFI variables
 * Initial implementation of boot once for elilo based on
   EfiVars/EfiToolSys

Changes from v1:
 * fix typos
 * fixes for opts vs self.opts
 * action block comment moved to correct location
 * moved implementation of add_kernel to an API method
 * make Grubby pass the --config-file argument to grubby
 * add remove_kernel as an API method and make action use it
 * add boot_once action using the boot_once API

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
boottool: auto install of grubby for users of the client library

The boottool CLI already does auto installation of grubby if a
recent enough version is not found on the system. This patch
makes that feature a function that can also be used by users of
the boottool client library, at instantiation time.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
boottool: adapt server side bootloader.py for rewrite of bootool

Signed-off-by: Cleber Rosa <crosa@redhat.com>
bootool: removed (now) legacy perl based version

Signed-off-by: Cleber Rosa <crosa@redhat.com>
bootool: renamed new boottool.py to be called simply boottool

Signed-off-by: Cleber Rosa <crosa@redhat.com>
boottool: fixes for missing methods on server API

As reported by visonlee, on issues #282 and #281.

Signed-off-by: Cleber Rosa <crosa@redhat.com>