- FileSystem.h depends on KPMcore and only compiles when
KPMcore is present; it can use KPMcore identifiers.
- Global.h doesn't.
- Move the few functions introduced into Global.h that need
KPMcore, to FileSystem.h instead.
When KPMcore is present, the calamares::kpmcore wraps that
and provides suitable API detection. If KPMcore is not
present, the same interface library provides -DWITHOUT_KPMcore.
- kpmcore (when used as target "kpmcore") has an interface
include directory that does not contain the "kpmcore/"
subdirectory. But the headers it has installed, assume it
is there (e.g. kpmcore internals use #include <fs/filesystem.h>).
- add an alias at Calamares level that sticks in some more
includes, adds the relevant WITHOUT_kpmcore when it's
not there, etc.
The distinction CalamaresUtils and Calamares is old-fashioned,
since we can use nested namespaces (and already do) for a lot
of things; make libcalamares/locale/ a bit more consistent
by using namespace Calamares::Locale for everything.
Some distro's let the user change the hostname at will;
others don't, and yet others don't have systemd to change
the hostname with at all. Check if we **can** change the
hostname (as a non-root user), before setting expectations.
- remove "bogus" key when it's not needed
- check for existence of "branding" key in GS before
subscripting it (this happens in tests, where no
GS contents are loaded, but not in regular use,
where startup loads the branding data into GS)
The schema is considered invalid by **some** versions of
configvalidator (or rather, the underlying jsonschema):
```
128: '#definitions/groups' does not match '^[^#]*#?$'
128:
128: Failed validating 'pattern' in metaschema['properties']['definitions']['additionalProperties']['$dynamicRef']['allOf'][0]['properties']['$id']:
128: {'$comment': 'Non-empty fragments not allowed.',
128: '$ref': '#/$defs/uriReferenceString',
128: 'pattern': '^[^#]*#?$'}
```
Remove the `#` from the IDs.
- can't use *bogus* as a key unless that's allowed by
the schema -- and it is not.
- can't supply empty config if there is supposed to be
an object there.
This makes it a little difficult to allow a config-file
that is actually no-configuration-at-all (or only-defaults).
Put in values for *btrfsSwapSubvol* since it isn't a fragile
setting.
Looks like clang-format was applied to this JSON schema
file in 5a14c3c76f, which is
completely borked. Restore from earlier revision, now
with just `machineid` removed.