Commit Graph

7789 Commits

Author SHA1 Message Date
Adriaan de Groot
afebe8211a Changes: pre-release housekeeping 2020-08-09 21:01:44 +02:00
Adriaan de Groot
f07c6ed876 i18n: drop pythonqt translations from the tooling 2020-08-09 21:00:40 +02:00
Adriaan de Groot
f08b4e502a i18n: update English source translations 2020-08-09 20:58:16 +02:00
Calamares CI
4808201944 i18n: [calamares] Automatic merge of Transifex translations 2020-08-09 20:49:43 +02:00
Adriaan de Groot
2b9b8bbbe8 Merge branch 'issue-1479' into calamares
Special case reiserfs (named "reiserfs" in /etc/fstab and as
a `mount -t` argument).

FIXES #1479
2020-08-09 09:43:01 +02:00
Adriaan de Groot
62a8ee9708 [libcalamares] Add name-for-partition-type method
- add apidox to all the untranslatedFS() methods
- add the most-basic of untranslatedFS(), which works on a given
  FileSystem::Type; this one can handle special cases where
  Cala needs a different untranslated name than what KPMCore provides.
2020-08-09 00:00:14 +02:00
Adriaan de Groot
537aad1222 [libcalamares] SPDX, DLLEXPORT on partition/FileSystem.h 2020-08-08 23:32:09 +02:00
Adriaan de Groot
fe3495ff97 [libcalamares] Expand KPMCore tests
- check on FS names as well
2020-08-08 22:54:59 +02:00
Adriaan de Groot
30335f27f0 Merge branch 'fix-joburg' into calamares
Resolve a long-standing annoyance. With the new model for TimeZones
and nicer data structures, along with consistent find-methods,
we can spot-patch TZ data to handle special cases of bad timezones
being assigned to obviously-otherwise locations.
2020-08-09 00:36:35 +10:00
Adriaan de Groot
5e5701363c [libcalamares] Test the spot-patch for Johannesburg
- Add a note about notation, degrees-minutes
2020-08-09 00:35:19 +10:00
Adriaan de Groot
e35992cf0b [libcalamares] Add spot-patches to timezone data
- for the purposes of Calamares's nearest-location selection algorithm
  for timezone selection, introduce spot patches: alternate markers
  on the map to indicate "things close to here belong in this timezone".
- hide the implementation detail in the find() methods.
2020-08-09 00:21:31 +10:00
Adriaan de Groot
028d424c73 [libcalamares] Expand testing of TZ location lookup
- Cape Town is in South Africa, so one might expect it to get South
  Africa's timezone -- which is Africa/Johannesburg -- but Windhoek
  is closer, so it gets that.
- Port Elisabeth is similar: Maseru lies between it an Johannesburg,
  so it gets the wrong timezone, too.

These both illustrate how the limited resolution of the map, together
with the "closest location" lookup, can give poor results. For most
of South Africa, the "wrong" timezone is closer than the right one.
2020-08-09 00:21:31 +10:00
Adriaan de Groot
6a33e72b58 [libcalamares] Refactor test to be data-driven
- this test is going to get a lot more cases, so prepare for that
2020-08-09 00:21:30 +10:00
Adriaan de Groot
00626fd96c [libcalamares] Refactor timezone loading
- load from a TextStream. This is prep-work for alternate TZ data
  sources.
2020-08-09 00:21:30 +10:00
Adriaan de Groot
0948963d86 [locale] Port TZ widget lookup to new find() method
- The TZ widget uses a different coordinate system (mapping lat and lon
  to pixel locations, and then calculating Manhattan distance from
  that), so needs a different distance function.
- Simplify code: there's just one "closest TZ" function.
2020-08-09 00:21:30 +10:00
Adriaan de Groot
2f871acbfd [libcalamares] Expose distanceFunc-find for timezones 2020-08-08 13:45:32 +02:00
Adriaan de Groot
0fda1dcf7d [libcalamares] Refactor finding-TZ algorithm
- introduce a distance function and use that, rather than coding it
  inside the find() function. This is prep-work for unifying the
  find() calls, based on various coordinate systems.
2020-08-08 13:26:39 +02:00
Adriaan de Groot
fdbc253623 Merge branch 'issue-1457' into calamares
Support /etc/default/grub.d/ -- keep in mind that the **rest** of the
logic in writing a grub configuration file is unchanged, so 00calamares
may roughly override "global" or top-level grub variables like
GRUB_TIMEOUT.

FIXES #1457
2020-08-07 13:59:41 +02:00
Adriaan de Groot
473daecdbf [grubcfg] expand config-testing for the new features
- create directories for new tests ahead of the tests themselves;
  this **can** still cause problems if a test is run standalone.
- if creating the grub-dir at runtime is necessary, be informative
  if it fails.
2020-08-07 13:58:28 +02:00
Adriaan de Groot
8bf95b6881 [grubcfg] Support prefer_grub_d settings 2020-08-07 12:13:51 +02:00
Adriaan de Groot
064fff0c12 [grubcfg] Drop default_dir
- the default_dir was only stored in modify_grub_default() to
  create the directory if needed; move that functionality to
  the get_grub_config_paths() function (and drop the "s",
  since it now returns just one).
2020-08-07 12:07:26 +02:00
Adriaan de Groot
aa50dfb8a1 [grubcfg] refactor finding-the-grub-paths into a function 2020-08-07 12:02:42 +02:00
Adriaan de Groot
f85c70d4d2 [grubcfg] Introduce prefer_grub_d
- new setting for using /etc/defaults/grub.d/ (SEE #1457), not implemented
- add missing fields to schema for config file
2020-08-07 11:55:16 +02:00
Adriaan de Groot
3fc23e3b07 [grubcfg] Fix config schema 2020-08-07 11:43:48 +02:00
Adriaan de Groot
43f9f2e2f4 Merge branch 'issue-1477' into calamares
FIXES #1477
2020-08-07 11:30:30 +02:00
Adriaan de Groot
463ea3c73f [displaymanager] Fix config schema 2020-08-07 10:50:33 +02:00
Adriaan de Groot
f324a055e5 CMake: put completions with the other "misc. installs" 2020-08-07 10:43:29 +02:00
Adriaan de Groot
2ce12d5368 Merge branch 'issue-1476' into calamares
Go over the locale module again:
- new models that avoid weird casts and inconvenient iteration
- shared timezone data
- simple sorting and filtering
- simplify the map / QML version

FIXES #1476
FIXES #1426
2020-08-07 08:33:44 +02:00
Adriaan de Groot
1eef6d69f2 Merge branch 'mt-gs' into calamares
Fix up potential thread-safety issues with GS, expand testing.
2020-08-07 01:12:18 +02:00
Adriaan de Groot
cb20ba6aba [libcalamares] More GS load/save testing
- failures elsewhere boil down to QStringList is not supported,
  but a QVariantList of QVariants of QStrings is.
2020-08-07 01:11:14 +02:00
Adriaan de Groot
0de98fe4c1 [libcalamares] Expand YAML testing a little
- load/save of a stringlist seems to work
2020-08-07 00:57:30 +02:00
Adriaan de Groot
dbc49f001e [libcalamares] Test GS
- test insert, remove, emitted signals
- test loading and saving of YAML and JSON

This shows up a big bug in the YAML saving code (which was never
used, it seems, anyway)
2020-08-07 00:45:36 +02:00
Adriaan de Groot
a44e6802e5 [libcalamares] Rename tests for consistency 2020-08-07 00:13:58 +02:00
Adriaan de Groot
3c618a9a19 [libcalamares] Fix GS load behavior
- the loadJson behavior did too many notifications, and was likely to
  deadlock; write directly to the map instead and emit only once.
- the loadYaml method did something very different from its
  documentation or intent.
2020-08-07 00:08:47 +02:00
Adriaan de Groot
ac713d8c4b [libcalamares] Apply locking to GS access 2020-08-07 00:06:13 +02:00
Adriaan de Groot
dc5d98af7d [libcalamares] Address outdates assumptions about thread-safety 2020-08-07 00:02:14 +02:00
Adriaan de Groot
0121e3755b [libcalamares] GS improve load/save
- save should be const
- rename save() to saveJson() for parity with saveYaml()
2020-08-07 00:02:14 +02:00
Adriaan de Groot
104452513b [libcalamares] Document GS
- write apidox for all of GlobalStorage
- while here, polish up the SPDX bits
2020-08-06 23:14:44 +02:00
Adriaan de Groot
527449a102 [libcalamares] Improve GS debugDump() formatting 2020-08-06 22:54:37 +02:00
Adriaan de Groot
c64aefe43c [libcalamares] Remove unused include, declaration 2020-08-06 22:53:32 +02:00
Adriaan de Groot
52d1c8f88a [locale] Explicitly update GS from the locale step
- refactor into some free functions (out of the lambda's for connecting)
- introduce new method to call from onLeave(), matching previous
  widget behavior
2020-08-06 18:32:51 +02:00
Adriaan de Groot
c69bd972e9 [localeq] Demonstrate "offline" lookups
- we can do GeoIP and GeoNames lookups, **or**
- use Calamares's internal GeoIP lookup and country / city hints.

The online version is much more accurate, but costs more lookups;
in these examples, set it all to "offline" and document what needs
to change (code edit) to use the online version.

It's probably a good beginner job to introduce a bool in localeq.qml
to switch the behaviors.
2020-08-06 16:09:41 +02:00
Adriaan de Groot
71ca1e1544 [localeq] Pick up Config changes before showing the module 2020-08-06 16:09:41 +02:00
Adriaan de Groot
32c8338a9c [locale] QML doesn't like const 2020-08-06 16:09:41 +02:00
Adriaan de Groot
91cc5a2b42 [locale] Update the map-QML implementation
- Config has suitable strings for displaying TZ information.
  Use them and automatic bindings. Don't update the strings manually.
- Suggest online or offline TZ lookups based on what the distro wants.
  Edit the QML to pick online lookups (needs access to the geonames
  service, though).
- Drop the variables that point at config and geoip: the Config
  object has a currentLocation, which is filled in by both the
  configuration and any GeoIP lookup -- it doesn't have city
  or country information though.
2020-08-06 16:09:41 +02:00
Adriaan de Groot
15a8d62986 [locale] Add a 'current timezone' strings to Config
- status is a longer phrase
- name is a short human-readable name
- code is the internal code

Code that writes its own "Timezone set to" messages can use
the name, rather than the status.
2020-08-06 16:09:41 +02:00
Adriaan de Groot
eda14ce548 [locale] Avoid nullptr deref
- when no location has been set at all, there's no sensible TZ
  to report; just leave it blank. In *practice* you won't hit this
  code from the Calamares UI before a location has been set, because
  the Config object is instantiated and then immediately configured,
  but from tests or unusual UIs it could be.
2020-08-06 16:09:41 +02:00
Adriaan de Groot
b36ad4c7f4 [locale] Add test for Config initialization
- needs some massaging because Config otherwise depends on
  ModuleManager which is a UI class (for the Reasons),
  but we already have a BUILD_AS_TEST define for that purpose.
- demonstrate a nullptr deref.
2020-08-06 16:09:41 +02:00
Adriaan de Groot
04e53be934 [locale] Repair test: don't re-init te occupied-pixels set each loop
- while here, merge Tests.h to the cpp file
- Fix build when debugging timezones (missed during earlier refactor)
2020-08-06 16:09:41 +02:00
Adriaan de Groot
21f97db8fd [libcalamares] Offer translation lookup of regions 2020-08-06 16:09:41 +02:00