taskbase: Use values from ini, override with json

Certain required variables in ini files like ref were unused in
tree composes.  These fixes result in using setting a rule that
if the value is in the ini file, use it but it can be overriden
by input from a json file.  The ini variable is then added to a
temporary json file that is stored in a tempdir and consumed by
'rpm-ostree compose tree'.

Along with adding the ini content to the json file, a function
was also added to detect if the json file has an include
statement.  If so, it will inherit the included json file
content and merge the two with the following rules:

    * if the key value doesn't exist in the json, add it
    * if the key value is a list and does exist, merge and
      remove duplicates.

And finally, to make processing for 'rpm-ostree tree compose'
easier, the detected repo files are copied to the temp dir.
treecompose: Make -c optional and set config.ini to default

Changed -c to be optional and set config.ini to be the default config
file used in treecomposes.  This nearly allows users to run
treecompose with the stock git fedora-atomic git repo.
/etc/rpm*.conf back to /etc/sysconfig/

It's the right thing to do. This is not a config file, it's
a short file with simple envariable settings, intended for
use by systemd via EnvironmentFile. And, on RHEL7:

  # grep -R EnvironmentFile /usr/lib/systemd/system/|wc -l
  37
  # grep -R EnvironmentFile /usr/lib/systemd/system/|grep -v /sysconfig/
  36

That is: EnvironmentFile=/etc/sysconfig/<something> appears
to be a strong RHEL convention. We should abide by it.
KRB5CCNAME: take advantage of systemd env

systemd provides EnvironmentFile=<path>, and we're already
using that for pointing to our config file. Take advantage
of that feature to also define KRB5CCNAME. This removes
some complexity from the code, and also eliminates a
potentially thread-unsafe use of putenv().
use systemd instances.

We may need to run multiple instances of a message bus
listener, with different configs for different message
types or brokers. This appears to be the systemd-sanctioned
way to do so. See

    http://0pointer.de/blog/projects/instances.html

Usage diff:

  - systemctl start rpm-ostree-toolbox-build-monitor.service
  +   "   "    "  "  "   "  "   "  "   "  " -monitor@foo.service

...where foo is an instance name. Each instance must have
a corresponding /etc/sysconfig/rpm-ostree-toolbox-foo file.
Restart services on failure.

Failures are common with QPID: network hiccups, planned
outages, gremlins.

Much as I wanted to leave this as a site policy decision,
there doesn't seem to be a simple systemctl-ish way to do so.
See systemd.service(5) for restart directive, and perhaps
rhbz#756787 for hints on how to use /etc/systemd for
local overrides.

On kinit.service, set RemainAfterExit=yes. This serves as
a flag for build-monitor.service
Whew! Fix systemd dependencies.

First: use both After= and Requires=. They're different.

Second: make -build.service depend on kinit timer *and* service.
This starts the timer (which doesn't seem to check or care about
exit status of the kinit script) and also runs the service.
lorax-embed-repo: Stop using extlinux by default

We're switching to GRUB2, which will support UEFI.
installer: Save all data from Lorax

Previously we were just doing boot.iso -> installer.iso, but in order
to support PXE we want to expose at least the extracted
kernel/vmlinuz/squashfs, and at that point we might as well just dump
it all.

If we need to subset it later, we can do that.
imagefactory: Print working directory for logs

So I can find them...
Clean up ImageFactory code, move IF-specific bits from TaskBase

The ImageFactory code had some leftover generic bits from when this
code was one big script.  Kill those.
imagefactory: We actually export raw images

Until this gets fixed...
lorax-embed-repo: Remove remote configuration for install media

It's not useful, because it points at the local content.
installer: Support injecting %post scripts

This is a horrific hack, I admit.  Basically as an OS builder
that requires subscription management, we need a way to inject
%post bits to explicitly deconfigure the system.

For example:

rm -f /etc/ostree/remotes.d/*.conf
echo 'unconfigured-state=This system is not registered; You can use subscription-manager to register.' >> $(ostree admin --print-current-dir).origin

A perhaps better alternative would be a variant of ostreesetup that
unset the remote configuration when done.  But that would require a
new pykickstart...
Fix merge in Makefile, for systemd file renames