Add a dracutlukscfg module to write a
/etc/dracut.conf.d/calamares-luks.conf file for LUKS full disk
encryption support with Dracut.
You should run:
* partition
* luksbootkeyfile
* dracutlukscfg
* dracut
in that order (not necessarily in immediate sequence). The
luksopenswaphook module is not used with Dracut.
If we use .replace("'", "'\\''") for escaping, we also need to use
single quotes, not double quotes.
This was broken by the port from '%' to format, which also randomly
changed quoting characters for no good reason. Changing the outer ones
does not matter, but \" or ' within a string is not the same thing!
Added an initramfscfg module to handle pre-configuration for the Debian
update-initramfs, such as installing hooks (needed for luks/FDE support
on Debian-based distros).
Closes#254. (Cherry-picked from the pull request.)
fstab.conf: Add a new "crypttabOptions" option that defaults to "luks".
Document that for Debian and Debian-based distributions, the
setting should be changed to "luks,keyscript=/bin/cat".
main.py: Append the options from the above setting to the end of every
line in crypttab.
At least the "luks" option should always be there, because there may be
different encryption types. The Debian initramfs-tools also require the
Debian-specific keyscript option and will otherwise ignore the keyfile
entirely (see pull request #254).
At least the Debian update-initramfs needs the entry to be there (see
pull request #254). Dracut will probably need it too. And logically, it
should be there.
These job plugins work similarly to view modules, with the following
differences:
* These jobs need to link only libcalamares, not libcalamaresui. For
this reason, PluginFactory was moved from libcalamaresui to
libcalamares. (It depends only on QtCore.)
* Instead of deriving from ViewModule, derive from CppJob (which is a
subclass of Job).
* Like process and Python jobs, a job plugin is a single job, whereas a
ViewModule can generate a whole list of jobs.
The CppJob and CppJobModule classes are new. In Module::fromDescriptor,
the combination type=job, intf=qtplugin is now supported and mapped to
CppJobModule.
locale -a returns the locales using ".utf8" names rather than ".UTF-8".
The case-insensitive match does not help because it is "utf8" rather
than "UTF-8". So we need to match both with and without the dash.