- point to main Calamares site in the 'part of' headers instead
of to github (this is the "this file is part of Calamares"
opening line for most files).
- remove boilerplate from all source files, CMake modules and completions,
this is the 3-paragraph summary of the GPL-3.0-or-later, which has
a meaning entirely covered by the SPDX tag.
The intended license for the CMake modules is BSD-2-Clause;
there's no desire to restrict what can be done with these,
and CMake modules are generally 2-clause licensed.
- The variables that are set for out-of-tree builds are prefixed
with to avoid name clashes; make the module-infrastructure
respect those instead of the in-tree variable names.
- .. and then duplicate the in-tree variables to the out-of-tree
variables, so we only need one set of module instructions.
- The Python configuration tests sometimes need extra setup, so
do that through a CMakeTests.txt file in the test directory.
- Patch up existing tests:
- grubcfg needs /tmp/calamares/etc/default to exist
- rawfs won't work on FreeBSD because of differences in /proc
- If a module has tests/#.global or tests/#.job, these are used
as arguments to a test-run of loadmodule (which reads them
and runs the module with that configuration).
- This makes the old python-loading test and test-runner entirely
obsolete, so remove them too.
- Loading the module will check Python modules for syntax,
and C++ modules for symbols. This would be a good idea,
except for where it calls exec() and does things to the
running system. Most modules are harmless with an empty
config, but you never know (e.g. a process module).
Switching to INSTALL_CONFIG=OFF breaks tests by not having them
in the build directory. Some logic was coupling not-installing
to not-using-in-build-dir too closely.
Since we install the CMake files now, also put license headers in them.
These files are intended to help plugin and branding component authors
write them in a simple Calamares-idiomatic way.
If Python isn't found, or PythonQt isn't found, there is no point
in copying over the modules into the build tree; this may even be
misleading because the files are there, but won't work and this
will be noticed at runtime only.
Instead, skip the modules and explain why.
Make a function out of explaining-skipped-modules, and call it
not only after collecting all the modules, but also after
the feature summary, so that it's quite clear which modules
are skipped.
Modules may be skipped for different reasons: SKIP_MODULES
is the traditional approach to suppress some, but other modules
may have unmet build requirements (e.g. Plasma Look-and-Feel,
or the Partitioning module) and should be able to opt-out
of being built. For all those skipped, log it explicitly after
all the modules have been examined.
Only CMake-based (e.g. C++) modules support opting-out in this way.