[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>
[sosreport] remove jython logging handler workaround

The workaround in sosreport.py for log handlers persisting past
logging.shutdown() on Jython causes further problems with leaking
log handler messages in the non-build case (i.e. where we are
calling the Archive's finalize() method). Fix this by removing
the workaround since sos no longer targets the Jython runtime.

Fixes: #393.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[abrt] trigger plugin on more packages

Add the GUI and main abrt packages to the plugin's packages list.

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[anaconda] make password scrubbing more robust

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[hpasm] fix add_copy_specs() use

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[ipa] fix get_cmd_output_now usage

Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
[veritas] fix call_ext_prog usage

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