Commit Graph

8005 Commits

Author SHA1 Message Date
Adriaan de Groot
f73f94da27 Repait module.desc
- a handful of modules had an unused *requires* key in module.desc;
  this is probably from previous intentions around
  prerequisites-testing. Since the settings were empty anyway,
  they have been removed.
- [unpackfs] Compacted the way *requiredModules* list is written
2020-08-12 09:36:30 +02:00
Adriaan de Groot
efd7145f76 [libcalamares] Implement the interface-specific fields for descriptor 2020-08-12 09:06:47 +02:00
Adriaan de Groot
c8b96c278b [libcalamares] Complete the generic module descriptor
- loads emergency, noconfig, requiredModules keys
- warns (and marks descriptor invalid) if there are unused / unknown
  keys left over in the descriptor data.
2020-08-12 08:42:52 +02:00
Adriaan de Groot
e406ae1967 [libcalamares] Add name to module descriptor
- introduce basic tests of the data structure
- interpret name when passed in as descriptor data
2020-08-12 00:52:54 +02:00
Adriaan de Groot
e1e81bb133 [libcalamaresui] Warnings--, don't shadow a parameter 2020-08-12 00:39:01 +02:00
Adriaan de Groot
f1bb70269f [libcalamares] Improve warning/error logging
- the lack of a space after the : was inconsistent with most of the
  rest of the logging.
2020-08-12 00:34:22 +02:00
Adriaan de Groot
65273a262b [libcalamares] Start putting data into the module Descriptor 2020-08-12 00:33:08 +02:00
Adriaan de Groot
60fbf04594 [calamares] Adjust module test-loader for changed API
- the test-loader needs to create modules (and does so hackishly,
  outside of the ModuleManager) so it needs to chase the API as well.
2020-08-11 22:26:12 +02:00
Adriaan de Groot
3c6e53ecb9 [libcalamaresui] Chase the change in Module descriptor
- most of the code becomes **simpler** because the requirement
  to handle unstructured data is now in the descriptor itself,
  rather than in consumers.
2020-08-11 22:26:12 +02:00
Adriaan de Groot
ee834a7abb [libcalamares] Define interface for Module descriptor
- add fields -- all const, all bogus -- to the descriptor,
  introduce a stub method to load the descriptor from
  YAML data (e.g. read from module.desc)
- lighten the type-naming in Module a little, with usings
2020-08-11 22:26:12 +02:00
Adriaan de Groot
f0c4164515 [libcalamares] Add a more convenient find() to NamedEnum
- In most cases, you **know** the table covers all the enum
  values, and the extra parameter *ok* is just annoying.
  Provide a convenience that doesn't distinguish empty
  from empty-but-valid.
2020-08-11 22:26:12 +02:00
Adriaan de Groot
197cb9982c [libcalamares] Sort the tests by subdir 2020-08-11 22:26:12 +02:00
Adriaan de Groot
bdd6bdc3b2 [libcalamares] Migrate module type and interface to descriptor
- move the enums
- expose the named-enum functions for them
- **start** replacing Descriptor with something stronger; this fails
  zero tests so it obviously wasn't tested at all
2020-08-11 22:26:12 +02:00
Adriaan de Groot
215cd0d1c3 [users] Repair test on openSUSE 2020-08-11 22:16:03 +02:00
Bart Ribbers
b144f1dfc0
[mkinitfs] New module
This module allows the generation of the initramfs in Alpine Linux based
systems (excluding postmarketOS). Very bare bones, but then again it
doesn't need much. It uses the Alpine Linux tool "mkinitfs" to do the
job.
2020-08-11 18:18:52 +02:00
Adriaan de Groot
7cef99605f [libcalamares] Distinguish instances with an explicit weight
- setting the weight in *instances* should be different from letting
  the default weight (of 1) stand; explicitly saying 1 should
  carry some weight (ha!)
2020-08-11 16:45:51 +02:00
Adriaan de Groot
c8964717c7 [calamares] Bail out on invalid settings 2020-08-11 16:32:44 +02:00
Adriaan de Groot
d81d585c32 [libcalamares] Add isValid() to Settings
- settings can be invalid (missing data, whatever) and that
  can be used to shut things down early. Validity must be
  checked explicitly, though.
2020-08-11 16:32:44 +02:00
Adriaan de Groot
4cd2a4ae91 [libcalamares] Produce warnings while reading settings
- any invalid instance key will cause a complaint
- "new" custom instances in sequence get a complaint, but
  the instance description added to the list is valid
2020-08-11 16:32:44 +02:00
Adriaan de Groot
a8075fba5f [libcalamares] Chase API change in settings 2020-08-11 16:32:44 +02:00
Adriaan de Groot
253e5610af [libcalamares] Better type for the list of InstanceKeys
- *sequence* lists module instance keys; make the stored type of
  those keys InstanceKey instead of QString
2020-08-11 16:32:44 +02:00
Adriaan de Groot
b23dbd47c7 [libcalamaresui] Chase changes in instanceDescriptor
- this is mostly about deleting code, since the special-cases
  now live in libcalamares where `settings.conf` is interpreted.
2020-08-11 16:32:44 +02:00
Adriaan de Groot
57f5a92d96 [libcalamares] Build complete instanceDescriptor list
- there's no reason to ignore custom instances that are **not**
  mentioned in the *instances* section: it may be useful to
  name more that one even without distinct config files.
2020-08-11 16:32:44 +02:00
Adriaan de Groot
4968efdaa7 [libcalamares] Simplify constructors of InstanceDescription
- no more weights in constructors; do that in fromSettings() only.
- simplify test to drop those constructors
- set config file also for "normal" descriptors; fix test
2020-08-11 16:32:44 +02:00
demmm
355a4f9b8d [usersq] adding QML module usersq
module builds, installs and runs, connections are not working yet.

UserQmlViewstep.cpp/h are from PR https://github.com/calamares/calamares/pull/1356
sections are commented out to make the module build, but help is needed to get those 2 files corrected.

config names used in usersq.qml are guessed from users/Config.cpp
debug window shows correct entries in GS, and under the module tab, usersq.conf is read
as should too. Running shows most config used in users.qml are not registered/wrong,
many entries like: qrc:/usersq.qml:228:13: Unable to assign [undefined] to bool

It is understood not all needed from the users module has moved to Config.cpp yet,
but doing the PR now, since it runs, doesn't crash cala and help is needed to further implement.
2020-08-11 13:46:05 +02:00
Adriaan de Groot
e507338f4c [libcalamares] Test config filenames as well (custom vs standard) 2020-08-11 13:27:15 +02:00
Adriaan de Groot
1f57a99ff2 [libcalamares] Rename moduleInstances() and fix tests
- "custom" is a misnomer, so drop that from the name
- tests adjusted: all instances are returned, not just the "custom"
  ones.
2020-08-11 12:54:29 +02:00
Adriaan de Groot
6f7234e4ac [libcalamares] Add all mentioned instances to the instanceList
- "custom" instances is now a misnomer, since all the instances
  go into it; they are distinguished by `isCustom()` on the descriptor
2020-08-11 12:43:59 +02:00
Adriaan de Groot
f157d9c459 [libcalamares] Refactor data-loading in Settings
- expose, for testing purposes, the load-from-YAML-data part
  alongside the public constructor that reads a YAML file
- add test for building the list of instances
2020-08-11 11:53:50 +02:00
Adriaan de Groot
34e31d4331 [libcalamares] Revert PRIVATETEST
- looks funny
- is hard to get clang-format to respect this; it's intended as an
  access-modifier, but those are baked into the code rather than
  being configurable.
- is probably rare enough that #ifdef is acceptable
2020-08-11 11:09:07 +02:00
Adriaan de Groot
53eb6c614a [libcalamares] Make InstanceDescription a class
- switch from dumb struct to a class; use a structured InstanceKey
- expand testing of InstanceKey and InstanceDescription
2020-08-11 10:31:12 +02:00
Adriaan de Groot
9c382e3555 [libcalamares] Support switching public/private during tests 2020-08-11 10:16:00 +02:00
Adriaan de Groot
e96198e61c Merge branch 'calamares' into issue-1176 2020-08-10 23:22:14 +02:00
Adriaan de Groot
8518a5037d Changes: post-release housekeeping 2020-08-10 23:18:02 +02:00
Adriaan de Groot
1c2cceb3b8 Mention both of the fixed bugs 2020-08-10 22:58:11 +02:00
Adriaan de Groot
9413b28209 [libcalamares] Improve logging - report correct number of jobs left 2020-08-10 20:22:48 +02:00
Adriaan de Groot
e9f2c57442 [users] Missing ! makes install always fail
FIXES #1483
2020-08-10 18:37:26 +02:00
Adriaan de Groot
31cfdf926c [libcalamares] Apply SPDX to utils/ 2020-08-10 18:21:42 +02:00
Adriaan de Groot
172859dc2d Changes: pre-release housekeeping 2020-08-10 18:21:36 +02:00
Adriaan de Groot
c48ec6bf94
Merge pull request #1481 from demmm/calamares
[welcomeq] language bar icon configurable
2020-08-10 17:02:58 +02:00
Adriaan de Groot
03871db597 [users] **keep** the create users job
- need to add the job to the list rather than just leaking it
2020-08-10 16:52:19 +02:00
Adriaan de Groot
cac3e042d8 [libcalamares] Improve logging in runCommand() (less chatty) 2020-08-10 16:41:19 +02:00
Adriaan de Groot
3a0155b69d [calamares] Fix up multiple-moc of KDSAG
- was getting multiple definitions of moc-related code due to automoc
  combined with KDSAG having its own #include moc, comment-out the include.
- while here, simplify the CMake bits for building KDSAG
2020-08-10 16:41:19 +02:00
Adriaan de Groot
3227658475 [calamares] Fix up multiple-moc of KDSAG
- was getting multiple definitions of moc-related code due to automoc
  combined with KDSAG having its own #include moc, comment-out the include.
- while here, simplify the CMake bits for building KDSAG
2020-08-10 16:10:16 +02:00
demmm
01f0367459 [localeq] use image instead of theme icon 2020-08-10 12:30:55 +02:00
Adriaan de Groot
483c0a84f8 [libcalamares] Update SPDX in modulesystem/ 2020-08-10 09:53:05 +02:00
Adriaan de Groot
21b4a36a91 [libcalamares] Remove empty .cpp file
- Requirement.cpp was there "just in case" the header grew
  functions that need an implementation, but that seems
  unlikely (the header is just a struct of POD).
2020-08-10 09:50:27 +02:00
Adriaan de Groot
d83543d904 Merge branch 'calamares' into issue-1176 2020-08-10 09:45:05 +02:00
Adriaan de Groot
740d723ec0 CMake: add SPDX identifiers to top-level CMakeLists.txt
- This is kind of bogus, since the file has existed for much longer
  than the identifier says, but I don't want to do spelunking now.
2020-08-10 09:44:34 +02:00
Adriaan de Groot
a873badf87 [libcalamares] Update SPDX identifiers in locale/ 2020-08-10 09:43:13 +02:00