[rpm] Add Signature tag to the output of 'installed-rpms'

 RPM meta data consists of Signature,Packager,BuildHost,Vendor tags
 it is useful for identifying 3rd party packages present on a system.
 This patch adds the gpg and pgp signature columns to installed-rpms.

Signed-off-by: Poornima M. Kshirsagar <pkshiras@redhat.com>
[ovirt] ensure /etc/rhevm is collected

The path /etc/rhevem may be a symbolic link. Include a trailing
slash in the copy spec to ensure it is collectes.

Based on a suggestion from Sandro Bonazzola.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[ovirt] add ovirt-engine-reports config

Add:
/etc/ovirt-engine-reports
|-- ovirt-engine-reports.conf.d
|   |-- 10-setup-jboss.conf
|   `-- 10-setup-protocols.conf
`-- sso.properties

to the report

Change-Id: I2287258b9652aa9ebf7f60528c378f4eeb2179d3
Related-To: https://bugzilla.redhat.com/1086942
Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
 sos/plugins/ovirt.py | 1 +
 1 file changed, 1 insertion(+)
[ovirt] add jboss runtime configuration

In oVirt 3.5 jboss runtime config changed location.

Add to the report:
/var/lib/ovirt-engine-reports/jboss_runtime/config/
|-- ovirt-engine-reportsd_history
|   |-- current
|   |   `-- ovirt-engine-reportsd.v1.xml
|   |-- ovirt-engine-reportsd.boot.xml
|   |-- ovirt-engine-reportsd.initial.xml
|   |-- ovirt-engine-reportsd.last.xml
|   `-- snapshot
|-- ovirt-engine-reportsd-logging.properties
`-- ovirt-engine-reportsd.xml

/var/lib/ovirt-engine/jboss_runtime/config/
|-- ovirt-engine_history
|   |-- current
|   |   `-- ovirt-engine.v1.xml
|   |-- ovirt-engine.boot.xml
|   |-- ovirt-engine.initial.xml
|   |-- ovirt-engine.last.xml
|   `-- snapshot
|-- ovirt-engine-logging.properties
`-- ovirt-engine.xml

Change-Id: I15864ef5197ec1c42f4a68445d5586847e595bc2
Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
 sos/plugins/ovirt.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
[ovirt] nit: fixing bad indentation

Change-Id: I5f570416d8f80d79589bf93854ece1b307dc60ae
Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
 sos/plugins/ovirt.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
[ovirt_hosted_engine] new plugin for oVirt

The oVirt Hosted Engine packages allow to run
ovirt-engine inside a VM. This plugin provides
info about the setup and the high availability daemons
running such VM.

Change-Id: I4380bbed5bab4dd7fd3472bf5d5d1265f1eed3e7
Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
 sos/plugins/ovirt_hosted_engine.py | 85 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)
 create mode 100644 sos/plugins/ovirt_hosted_engine.py
[apt] Add apt-cache policy info for installed pkg

apt-cache policy information for each package can be
useful to identify the source of the installed package.
Fixes #389

Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
Fix variable naming according to comment

Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
[plugin] mark more interfaces private

Numerous Plugin methods are not expected to be called from outside
the base class. Mark them private with a leading underscore:

  _copy_dir()
  _copy_node()
  _copy_symlink()
  _do_copy_path()

  _expand_copy_spec()
  _mangle_command()
  _make_command_filename()
  _is_forbidden_path()

  _collect_copy_specs()
  _collect_cmd_output()
  _collect_strings()

A couple of these (_mangle_command() and _do_copy_path()) are
invoked from the Plugin test suite; update the relevant cases to
call the new names.

Fixes #348.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[plugin] remove superfluous parens in is_installed()

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[plugin] fix whitespace in Plugin._copy_symlink()

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[plugin] remove superfluous parens in Plugin._do_copy_path()

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[plugin] remove superfluous parens in Plugin.check_ext_prog()

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[plugin] remove superfluous parens in Plugin.get_cmd_output_now()

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[plugin] fix indentation in Plugin._collect_copy_specs()

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[plugin] remove superfluous parens in Plugin.report()

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[plugin] remove unused itertools import

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[plugin] ensure Plugin has an 'archive' member

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[sosreport] log sosreport command line

Log the command line given to sosreport in the report log:

INFO: [sos.sosreport:setup] executing 'sosreport -o lvm2 --batch --build --debug'

Fixes #392.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[sosreport] re-order logging shutdown

Currently we remove all log handlers and then add the log files
to the archive. This can cause messages to leak to the console
when running in --quiet mode:

  # sosreport -o lvm2 --batch --build --debug --quiet
  No handlers could be found for logger "sos"

This happens because the Archive classes output to the 'sos'
logger; removing the handlers before archiving the logs causes
a default basicConfig to be used and generates the above message.

Add the files to the archive and then remove the handlers.

Fixes #393.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>