De-brand config file

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
Fix config file path

For me 'make prefix=/usr libdir=/usr/lib64 sysconfdir=/etc install' put the
configuration files in /etc/corewatcher/, but these files weren't looking
in that subdirectory.

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
Clean out meego/tizen specific things and quiet compile warnings

Updated code to match nitra needs in terms of paths, config, info sent to
server.  Also removed a lot of code unused as a result of the code
updating, which was causing compile warnings due to our pedantic nitra
settings.

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
Add an example yaml file

This is an example of a low quality (no debuginfo present) core that was
processed/submitted.

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
Correct memory management around os-release/version

Valgrind reminded me I should correctly dup the substring and free the
original full string.

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
A little more cleaning

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
A little more cleaning pre-production

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
Fix autotools paths

I don't fully understand how/where autotools gets its default values, but
these don't seem to be set correctly if I don't explicitly set them.

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
Search for core_* instead of core.*

This is pretty arbitrary, but that happens to be what's checked into
nitra's config files currently.  Eventually we'll be called dynamically
by systemd probably when it receives things regarding which we've asked
to be notified.

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
Remove two old meego-isms

The /etc/os-release file is now standard and we have our own default server
for now and it isn't the meego one.

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
Shift files from /tmp to /var/lib/corewatcher

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
Open /var/lib/corewatcher correctly after creation

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
Remove system config files

In Nitra these are owned by a system configuration files "package".

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
Remove unlink option

This will be handled for us by tmpwatch

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
Remove release-info option

This is distribution creator editorial choice, not a user choice.

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
Change from /tmp to /var/lib/corewatcher

We want dumps to be persistent across reboots, so tmpfs isn't the best
place for them.  Plus /tmp is a wild west of writability.  We'll allow full
writing of /var/lib/corewatcher, but not /var/lib/corewatcher/processed.
Still need a tmp watcher on this area to prune files.

Also this directory is an editorial choice by the distro maker, not a user
configurable option...remove user configurability.

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
Remove unused build_release

This is used in one place and simply hard coded there to be /etc/os-release
which is the new/current standard everywhere.

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
Cope with oddities around umask and permission bits

For some reason the mask passed to mkdir() isn't (always?) honored, but the
directory starts with safe enough perm's and I can subsequently add the
ones I'd just asked for and not been given.

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
Require allow-submit=yes and allow-pass-on=yes

Refuse to run if allow-submit=yes and allow-pass-on=yes are not set in the
config file.  These will be set by a prompt at first boot.

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>
Remove unused/unneeded corewatcher-config bits

Signed-off-by: Tim Pepper <timothy.c.pepper@linux.intel.com>