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.
This is the start of a release script. The idea is to automate
a whole bunch of the steps documented in ci/RELEASE.md, so that
a release becomes more straightforward. Assumptions abound:
basically this is going to work on my workstation, and not
on any other.
- Make *mandatory* optional (and default to false); this
allows shorter lists of entries
- Allow degenerate entries which are just a name
(which have *mandatory* set to false as well).
SEE #992
- Allow just a name entry, instead of requiring an object
entry; this makes "foo" equal to { name: "foo", runlevel: "default" }
and simplifies more for the straightfoward case of #974.
- Based on comments from #974, follow the configuration
scheme from services-systemd, so with separate lists
"services" and "disable". This ties it **slightly**
less closely to the commands passed to rc-config.
- If runlevel isn't set (at all) then use "default". For
most systems that do not use multiple runlevels, this
simplifies the configuration to just a list of service names
to add or delete.
- Document the functions some more
- Only "state" (i.e. action) "add" and "del" make sense,
avoid calling rc-update for other keys (e.g. typo's).
This matches the documentation, although there might be
other actions that make sense (see also services-systemd,
with its enable, disable and mask actions).
- With refactored code, introducing new kinds of actions
is very few lines of code. Allow disabling targets
(services was already possible). Allow masking units,
but as a special case require the complete name.
FIXES#975
- The three steps of modifying services in the target
system do basically the same thing, so factor out
the loops and logging into a systemctl() function.
- Log to warning() instead of just debugging, on failure.
- There is more to failing out of loadModules() than just
emitting modulesFailed, so instead share the failure
code with the code after loading modules -- but don't load any.
- Module dependency-checking is done in two phases:
first, catch any unknown modules that are listed
in *requiredModules* and bail out before loading
anything. Second, check that the modules required
by X occur before X in the sequence.
- The value set in module.desc was never stored for use,
but isn't an attribute of the instance, either. It belongs
with the descriptor, in ModuleManager.
If USE_<foo> is given a value that doesn't match **anything**,
then bail out. Since USE_* is an explicit distro choice for a
specific implementation, it's an error if that implementation
is not there.
When there are multiple modules doing a thing and it really only
makes sense to have one of them in a given Calamares compilation,
the USE_<foo> variables allow you to select one, while ignoring
all the other implementations. If USE_<foo> is not set, all
implementations are included (as usual).
- The examples files are not harmless, so distro's should take a
explicit decision to install the config examples (instead of
putting files in /etc/calamares).
- Switch INSTALL_CONFIG to OFF by default **or**
- Make all the example configurations "harmless" or trigger
specific failure modes in the modules.
- Document that distro's should be creating their own set
of config and settings files and using those, rather than
relying on upstream example configs.
- Implement the required: module description field. This
would have prevented the plymouthcfg / grub failure fixed
in 3.2.1.
- Think about improving the available OPTIONs at a CMake level
to auto-fill SKIP_MODULES (e.g. it only makes sense to pick
**one** services module).
- Rename services to services-systemd
- Improve the example file in services-systemd
- Document it
- Make the sample harmless
- (Rougly) merge #972#975
- Merge OpenRC module
- Only with documentation
- Use the generalized module from #966
- Use YAML-CPP API for finding out if a node has a value at all.
- Asking for Type() of an undefined or NULL node throws an
exception, so the existing code didn't **actually** catch
cases where a required setting wasn't set at all.
- A valid line (as explained in the comments at the top of
the locale.gen file) is <locale> <encoding> (two fields),
so lines with more than two fields can't be valid locale-
listing lines. For them, pretend they name locale "",
which won't be matched.
- Improved debug-logging
- Fix the actual problem of listing locales more than once,
by listing them all, uniqified, at the end, with an explanitory
comment in the generated file.
- Be more accepting of what constitutes a locale-line; this allows
spaces before and after the `#` comment sign, but because we're
uniquifying, this doesn't cause duplicates.
- Because we write the enabled locales at the end, the full file
comment-header is retained un-mangled (instead of accidentally
enabling a locale mentioned as an example there).