drop journald restart hack

This may have been fixed by fedup commit cce438d6 - previously we were
doing the upgrade-switch-root with stdin/stdout/stderr -> /dev/null,
which might have messed with systemd's connection to journald.

Or maybe something else changed inside journald/systemd. Who knows?
Set UPGRADE=1 unconditionally

It's better to avoid twiddling the commandline; if you're booting a
special upgrade image then we can assume that we're in upgrade mode.
Add initrd-system-upgrade-generator

This adds a systemd generator for the second phase of a system upgrade;
if /sysroot/system-upgrade is present (and a symlink to a directory)
when systemd starts, then we're back in the initramfs for upgrade time.

In that case, switch the default target to 'upgrade.target' so we'll run
the upgrade.
journal to disk during upgrade

This patch sets up /var/log/journal inside the initrd so it points to
/var/log/upgrade.journal, and then signals journald to make the journal
persistent.

This should mean that even if you pull the plug mid-upgrade, we'll have
all the journal info that was written up until that moment.
turn off initrd-mode for saved initramfs

If /etc/initrd-release is present, systemd makes some assumptions about
what it should be doing - it basically runs in "initrd mode". We don't
really want that during the upgrade, so remove that file from the saved
copy of the initramfs to turn it off.
system-upgrade-fedora: factor out read_filelist()

We might want to read more than one filelist in the future, so it's a
good idea to factor this out so we can use it again.
upgrade-cleanup: fix log output formatting

very important. yes.
Always put shell on tty2

Sometimes people get kinda freaked out if the upgrade seems like it's
not doing anything (like, say, maybe it's taking 90 seconds to run a
package %post script or something). And if they can't switch to a shell
and confirm that the system is actually doing stuff, they assume it's
hung, and reboot, and totally destroy their system.

So: always put a shell on tty2. And make sure the shell gets restarted
when we switch roots, so it actually works like it's supposed to.

If you really don't want the shell there for whatever reason, you can
add 'rd.upgrade.noshell' to the boot arguments to suppress it.
Use /var/tmp/system-upgrade.state as state file

Trying to be consistent about using 'system-upgrade' instead of upgrade.
Also, a very minor shell cleanup.
upgrade-debug-shell.service -> system-upgrade-shell.service

It's not just for debugging anymore, so rename it.
update TODO
Drop workaround for bug in dracut < 025

Fix went upstream, no need to keep the workaround here.
build fixes & improvements

Fixes:

* Commit 9e2da51 renamed upgrade-debug-shell.service to
  system-upgrade-shell.service but didn't change the name in the Makefile

* Commit b7b112c refactored out read_filelist() but forgot to copy the
  declaration for GError *error from main().

Improvements:

* Generate fedup-dracut.spec from fedup-dracut.spec.in
* Add 'rpm' and 'upgrade.img' targets
Fix misnamed system-upgrade-shell.service

Yet another place I forgot to change the name. Womp womp.
makefeduprepo: add './serve' script

The ./serve script uses python's SimpleHTTPServer to serve the created
repo on port 8000. Simple as heck. No guarantees about security or
sanity are made, but dang that's handy.
Makefile: add 'repo' target

With this, 'make repo' will create a valid --instrepo at ./repo.
This means you can set up a usable instrepo by doing:

    make
    sudo make install
    sudo make repo
    cd repo
    ./serve

and now you have an installable repo being served on port 8000. Handy!
improve makefeduprepo dracut call

Try not to pull useless stuff from the host system into the upgrade.img
created by makefeduprepo.
drop unneeded workaround

Plymouth gets started by other stuff, no need to mess with it here.
drop workaround for missing `swapoff`

fixed upstream as of dracut-025 (haraldh/dracut@488d55c)
fix initrd-system-upgrade-generator

The [ -d /sysroot/system-upgrade ] test fails when the link is an
absolute link; we've changed roots, so /var/tmp/system-upgrade doesn't
exist anymore.

Read the contents of the symlink and check under /sysroot instead.