Commit Graph

6836 Commits

Author SHA1 Message Date
demmm
a7b46a02eb [finishedq] add license for svg file 2021-03-09 19:45:32 +01:00
Adriaan de Groot
98524708cc [partition] Chase namespace change for Units 2021-03-09 19:45:12 +01:00
Adriaan de Groot
9f17d3fd12 [libcalamaresui] Paste the last 16KiB of the log file
- If Calamares is run more than once, reading the log file
  can get you older / not relevant log messages. Get the tail
  end instead.
2021-03-09 18:25:10 +01:00
Adriaan de Groot
980e5e13f8 Merge branch 'fixup-log-upload' into calamares 2021-03-09 18:22:51 +01:00
Adriaan de Groot
ea63f48c31 [libcalamares] Put the units in a nested namespace
- this makes it much easier to use the literal suffixes
  by using the namespace rather than individual operators.
2021-03-09 18:21:58 +01:00
Adriaan de Groot
a1ed303820 [libcalamaresui] Add test for Paste
This tests only the termbin ("fiche") paste by sending it
a derpy fixed string. Prints the resulting URL, doesn't
verify in particular.

It'd be rude to run this test too often.
2021-03-09 17:55:10 +01:00
Adriaan de Groot
44ec8a7c0b [libcalamaresui] Improve testability
- mark functions with STATICTEST so they can be compiled into a test
- move logfile-reading so we can call the pastebin-upload functions
  with an arbitrary payload.
2021-03-09 17:22:48 +01:00
Adriaan de Groot
846d6abaa8 [libcalamaresui] Move message- and clipboard handling
- The Paste API promises just a (string) URL back, not
  a whole message, so return just the URL from the
  abstract API and the concrete (fiche) implementation.
- Set clipboard contents from the UI
- Build (translated) message in the UI code
2021-03-09 15:51:24 +01:00
Adriaan de Groot
81badc36f4 [libcalamaresui] Implement abstract doLogUpload() API
This is a "do the right thing" function, which then calls
the implementation-specific code for each type.
2021-03-09 15:42:21 +01:00
Adriaan de Groot
1ff854f05d [libcalamaresui] Push upload to a more abstract API
- have a namespace Paste with just one entry point, which will handle
  untangling type &c.

This doesn't compile, but indicates the direction to take the API
2021-03-09 15:32:46 +01:00
Adriaan de Groot
efec12d001 [libcalamares] Read structured upload-server info
- Use just type and url, since port can be specified in
  a URL. Note that we only use host and port, not the
  scheme (or the path, for that matter).
- Factor out understanding the *uploadServer* key to a function.
2021-03-09 15:24:02 +01:00
Adriaan de Groot
bce6f3f1b7 [libcalamaresui] Adjust paste code to desired API
Still doesn't compile because consumers are not ready.
2021-03-09 14:56:37 +01:00
Adriaan de Groot
3c6683bd98 [libcalamaresui] Rip out untyped data about upload server
This doesn't compile, but indicates the **type** information
desired about the (a) upload server.
2021-03-09 14:51:59 +01:00
Adriaan de Groot
f72436aa0a [libcalamaresui] Drop RE-wrangling, compare hosts instead to detect valid paste URL 2021-03-09 14:41:58 +01:00
Adriaan de Groot
8af5fb5da5 [libcalamaresui] Simplify getting URL response
- get a QByteArray rather than going through a char[] buffer
- bytes-read is not important since the RE can only match if
  there **are** that many characters.
2021-03-09 14:38:43 +01:00
Adriaan de Groot
1bf95eacb0 [libcalamaresui] Tidy the logging some more 2021-03-09 14:33:47 +01:00
Adriaan de Groot
260862fabc [libcalamaresui] Move the format-string closer to where it is used 2021-03-09 14:31:46 +01:00
Adriaan de Groot
844831751d [libcalamaresui] Factor out the reading of the log file
- this will be needed for other pastebins, too
2021-03-09 14:30:20 +01:00
Adriaan de Groot
92e36558fa [libcalamaresui] Remove unnecessary shadowing in lambda 2021-03-09 14:25:40 +01:00
Adriaan de Groot
bc2435eb7d [libcalamaresui] Apply coding style 2021-03-09 14:23:52 +01:00
Adriaan de Groot
fc8830ae4a [libcalamaresui] Tidy logging 2021-03-09 14:23:27 +01:00
Adriaan de Groot
1ebb807624 [calamares] Drop #warning about KDSAG
- it might not be very current, and it's *probably* better to
  use dbus-activation / kf5dbus, but let's not call it
  deprecated until very sure that the dbus version does the
  right thing.
2021-03-09 13:57:21 +01:00
Adriaan de Groot
430b3b0722 REUSE: tag the schema file (badly, missing an email address) 2021-03-09 13:55:20 +01:00
Adriaan de Groot
0b8ef49e7e [calamares] Make debug-window available to QML
- Add a toggle() to the debug-window manager, for convenience
- Make the manager available to QML
- Use the debug-window manager (code imported from KaOS)
2021-03-06 23:11:41 +01:00
Adriaan de Groot
c00a382aea [calamares] Refactor debug-window handling
Move the management of the (a?) DebugWindow to a separate
class, and hang on to that manager in CalamaresWindow.
This is prep-work towards making it available from QML as well.
2021-03-06 22:55:48 +01:00
Adriaan de Groot
992c673951 [calamares] Document how to hide the Quit button
The Quit button can have its own logic at a QML level for
show/hide. It **ought** to follow the *quitVisible* property,
but can do additional work. Here, document how a distro might
choose to hide the Quit button on the last page (generally,
that's the "finished" page).
2021-03-06 22:08:35 +01:00
Adriaan de Groot
44602d0237 [finishedq] CMake: missing keyword 2021-03-06 15:33:15 +01:00
Adriaan de Groot
83e6476be8 [finishedq] Tighten up requirements 2021-03-06 15:23:23 +01:00
Adriaan de Groot
e9384deb5d [finishedq] Document the meaningful settings of the config file 2021-03-06 15:20:24 +01:00
Adriaan de Groot
bd775a16e2 [finished] Add a restart-anyway API to Config
It's possible to ignore the "user setting" for restart-now
and call doRestart(true) directly. This is intended for
use with specific UIs that make that choice clear for the user.

Hook up both [finished] and [finishedq] to the "traditional"
restart-if-the-box-is-ticked logic although the example
QML doesn't expose that box.
2021-03-06 13:51:45 +01:00
Adriaan de Groot
aa004503c5 [finished] Expand Config object's repertoire of notification-API 2021-03-06 13:38:02 +01:00
Adriaan de Groot
f8258f671b [calamares] Navigation getting the wrong side 2021-03-06 13:14:40 +01:00
Adriaan de Groot
6f15b69917 Merge branch 'qml-resizing' into calamares
Make panel sizes consistent, so the QML-navigation can be used better.
2021-03-05 23:20:47 +01:00
Adriaan de Groot
19874ebc3a [finished] Document doRestart() better
- move all the 'really want restart' logic to restartNowWanted()
2021-03-05 23:19:56 +01:00
Adriaan de Groot
f94853eb28 [finishedq] Always restart if possible 2021-03-05 23:17:57 +01:00
Adriaan de Groot
075a28a06d [finished] Log the doRestart() attempt 2021-03-05 22:59:53 +01:00
Adriaan de Groot
0d7c1ec130 [finishedq] Port QML back to using Config object 2021-03-05 22:59:04 +01:00
Adriaan de Groot
5b376b41bf [finishedq] Chase business logic in Config object 2021-03-05 22:40:38 +01:00
Adriaan de Groot
3ad3a9adfc [finished] Move the business logic to the Configt object 2021-03-05 22:27:24 +01:00
Adriaan de Groot
04145f49f8 [calamares] Factor out size-setting for QML panels
- Either orientation needs to have the same generic size-setting
  code, for both navigation and progress panels.
2021-03-05 16:59:54 +01:00
Adriaan de Groot
82223431fa [calamares] Pass orientation into panel-creation
- Add function for mapping panel sides to an orientation (H/V)
- Pass that into the creation functions

This is prep-work for handling vertical navigation and horizontal
progress reporting cleanly.
2021-03-05 14:21:19 +01:00
Adriaan de Groot
0f50085bb9 [calamares] Refactor sidebar creation
- None of these need to be methods of the main window,
  and it can all be put tidy away as static free functions.
2021-03-05 14:01:28 +01:00
Adriaan de Groot
a8463a8763 [calamares] Prefer to expand main panel
- Don't let the navigation items grow if they are QML
  (the Widget ones don't either) so the main panel takes
  most of the space.
2021-03-05 13:35:00 +01:00
Adriaan de Groot
ab7f6abf02 [calamares] Decouple debug-window button
- Provide slots and signals for managing the debug-window,
  so it can be used from QML as well.
2021-03-05 13:20:47 +01:00
Adriaan de Groot
1739d8f15f
Merge pull request #1647 from demmm/calamares
[finishedq] adding QML finished module
2021-03-05 12:24:16 +01:00
Adriaan de Groot
6a1e46d7f6 [libcalamaresui] Add properties to ViewManager to expose Settings 2021-03-03 16:06:53 +01:00
Adriaan de Groot
849da3f322 [libcalamaresui] The ViewManager is a UI component for QML, not core 2021-03-03 15:54:11 +01:00
Adriaan de Groot
c3860849c1 [libcalamaresui] Notify step number when modules are all loaded
- using the QML sidebar would not highlight the first step on startup,
  only after next / prev would the highlight show up. Now, notify
  when all the modules are loaded (and number 0 is active).
2021-03-03 15:43:11 +01:00
demmm
7acc8bcec3 [finishedq] adding QML finished module
module builds & runs, config connections are not registering
no errors
finishedq.qml is offering a different option though, running commands directly in qml
plasma-framework executer is used for that
2021-02-27 22:04:30 +01:00
Adriaan de Groot
cc3017be53
Merge pull request #1619 from deprov447/Upload_Install_Log
[libcalamaresui] Implementing LogUpload functionality from branding
2021-02-26 13:13:16 +01:00
Adriaan de Groot
24e129a413 Merge branch 'issue-1634' into calamares
FIXES #1634
2021-02-23 16:17:57 +01:00
Adriaan de Groot
d3acc39d2d Merge branch 'qml-finished' into calamares 2021-02-23 16:17:14 +01:00
Adriaan de Groot
a4682db987 [finished] Tidy up notification-at-end (and allow failed notifications) 2021-02-23 16:05:48 +01:00
Adriaan de Groot
5af614daf7 [finished] Allow positive and negative notifications at end. 2021-02-23 15:59:40 +01:00
Adriaan de Groot
ec4b6752d6 [finished] Move notification to Config 2021-02-23 15:54:19 +01:00
Adriaan de Groot
76a2791b12 [finished] Clean up includes 2021-02-23 15:42:14 +01:00
Adriaan de Groot
7d024cf72b [finished] Move restart handling to Config 2021-02-23 15:36:44 +01:00
Adriaan de Groot
9d6d8ecaea [finished] Heavy refactor
- move most of the business logic to Config
- make retranslate of the page more robust (e.g. changing language
  after failure would restore the un-failed message)

There's still some bits left.
2021-02-23 15:03:16 +01:00
Adriaan de Groot
288fe5b274 [finished] Rename and document following coding style 2021-02-23 12:50:52 +01:00
Adriaan de Groot
40961f21a7
Merge pull request #1624 from benne-dee/schema-netinstall
[netinstall] Schema for groups in netinstall.schema.yaml
2021-02-23 12:31:47 +01:00
benne-dee
f0aa515c8b
[netinstall] Schema validates also groups file 2021-02-22 22:17:06 +05:30
Adriaan de Groot
9c8194402b [keyboard] Add ASCII mapping for Greek
FIXES #1642
2021-02-19 14:33:38 +01:00
Adriaan de Groot
cdbf45b5d3 [libcalamaresui] Remove unused include 2021-02-19 14:29:46 +01:00
Adriaan de Groot
3a4dcb6913 [libcalamaresui] Give slideshow (ExecutionViewStep) widgets names 2021-02-17 14:34:33 +01:00
Adriaan de Groot
7e6c3a2309 [libcalamaresui] Give the slideshow-widgets a name
- this is the *working* part of the slideshow, not its background
2021-02-17 14:25:06 +01:00
Adriaan de Groot
49f4e7b8e1 [calamares] Make the widget-tree more informative, mention class name 2021-02-17 14:19:45 +01:00
Adriaan de Groot
6bf82e9c65 [welcome] Update .conf documentation
- fix typo
- don't suggest google as internetCheckUrl
- mark TODOs for #1384
2021-02-16 16:32:34 +01:00
Anubhav Choudhary
9738851261 YAML list for uploadServer key 2021-02-15 20:51:41 +05:30
Anubhav Choudhary
7057081bdf QUrl for serverURL + renames 2021-02-10 14:38:26 +05:30
Adriaan de Groot
e49f0cf3ba [libcalamares] Document NamedEnum in much more detail 2021-02-09 17:03:19 +01:00
Adriaan de Groot
04f4441182 [netinstall] Build up a list of urls, rather than just one
- the list is unused, and doesn't drive the loading of groups either;
  the existing one-string entry is used.
2021-02-09 15:06:53 +01:00
Adriaan de Groot
ca1ae6fd1d [netinstall] Support retranslation in the Config object 2021-02-09 11:06:59 +01:00
Adriaan de Groot
335ccbc149 [netinstall] Move other translation parts to Config 2021-02-09 10:58:11 +01:00
Adriaan de Groot
cf7391696e [netinstall] Continue moving settings to the Config object 2021-02-08 22:57:38 +01:00
Adriaan de Groot
f045e4f00e [libcalamares] Switch default language in Belarus
*If* the distro has GeoIP enabled and auto-selects the language for
Calamares, then Belarus now selects Russian, rather the Belarusian.
This is based on some personal input, mostly, and Wikipedia census data.

FIXES #1634
2021-02-07 22:35:32 +01:00
Chrysostomus
16eff98a06 Don't use f-strings yet. 2021-02-07 15:39:38 +02:00
Chrysostomus
0c92a36a53 Remove unnecessary comment 2021-02-07 15:29:30 +02:00
Chrysostomus
6d55005da0 Mount subvolumes to correct mountpoints 2021-02-07 00:16:26 +02:00
Chrysostomus
b16bd6bb23 Fix name error 2021-02-06 20:03:30 +02:00
Chrysostomus
67aedd5582 Move comments closer to where they are used 2021-02-06 19:54:29 +02:00
Chrysostomus
16bf7925a2 Adjust comments 2021-02-06 19:48:09 +02:00
Chrysostomus
1896a38ccc Fix a typo 2021-02-06 01:38:03 +02:00
Chrysostomus
1e0295dc65 Fix name error 2021-02-03 22:55:11 +02:00
Adriaan de Groot
84240683f5 [finished] Apply coding style 2021-02-03 17:16:22 +01:00
Adriaan de Groot
cb4248e56d [finished] Move config from viewstep to config object
- the configuration is still duplicated in the widget, and
  functionality still needs to move to the Config object
- the ViewStep is cut down to almost nothing
2021-02-03 17:14:49 +01:00
Adriaan de Groot
c82b802f4e [libcalamares] Typo in documentation 2021-02-03 17:12:33 +01:00
Adriaan de Groot
4ae3a7af61 [finished] Start Config-ification
- Introduce a Config class with suitable properties for use in QML,
  read configuration; this is unused right now.
2021-02-03 16:54:18 +01:00
Adriaan de Groot
b8a9c4c3b7 [users] Be more forgiving in tests
- the host system's /etc/group is being read, and that varies between
  host OS versions; since I was doing today's release on KaOS, the
  test was failing because of arbitrary differences between the
  default groups on each Linux flavor.
2021-02-03 13:48:01 +01:00
Adriaan de Groot
144b51f00e [partition] Use automount control
FIXES #1604

(Admittedly, this fixes the problem only when there's Plasma Solid automount
present, and not any of the other kinds; but none of those have been reported
yet, and adding them into AutoMount.cpp is opaque to the rest of the
system)
2021-02-03 01:31:37 +01:00
Adriaan de Groot
17f73b1294 [partition] Test automount job in a queue 2021-02-03 01:26:49 +01:00
Adriaan de Groot
38fa1d9567 [libcalamares] Distinguish logging raw, shared and unique pointers
- It shouldn't be necessary to explicitly .get() pointers for
  logging, and it's convenient to know when a pointer is smart.
  * no annotation means raw (e.g. @0x0)
  * S means shared
  * U means unique
2021-02-03 01:06:25 +01:00
Adriaan de Groot
c43a6ab866 [partition] Improve logging in automount test
- switch logging in job to VERBOSE because we don't want to be printing
  pointers to the regular session log
- switch logging in test to VERBOSE to actually see the messages from the Job
- hook the test into the build
2021-02-03 00:46:34 +01:00
Adriaan de Groot
c98a330bf9 [libcalamares] Store DBus reply value, drop debug-logging 2021-02-03 00:46:00 +01:00
Adriaan de Groot
aae815cf3b [partition] Add trivial test for automount management job 2021-02-02 23:01:59 +01:00
Chrysostomus
fcf6e2fb25 fix typos 2021-02-02 23:07:35 +02:00
Adriaan de Groot
1704ad5977 [partition] Add a job to handle automount behavior
- while here, nudge CalamaresUtils automount API a little,
  since it doesn't really need an rvalue-ref.
2021-02-02 19:18:19 +01:00
Adriaan de Groot
f3752e200a [libcalamaresui] Display first 6, last 2 lines of long error messages, preserve newlines 2021-02-02 16:40:01 +01:00
Adriaan de Groot
b9210721e6 Merge branch 'issue-1613' into calamares
The popup now cuts down messages to a manageable length.
Hopefully the part that is preserved, will still show
something meaningful for the user (8 lines of text should
be sufficient for the kind of things we do).

FIXES #1613
2021-02-02 16:35:10 +01:00
Adriaan de Groot
eafb8149b3 [libcalamares] Test some degenerate truncation cases 2021-02-02 15:35:53 +01:00
Adriaan de Groot
a383aa974a [users] Need <memory> for unique_ptr
- Although unique_ptr is only used when ICU is enabled, include it
  always because it is likely that we'll use more unique_ptr
  in the implementation at some point.
2021-02-02 13:38:52 +01:00
Adriaan de Groot
caff0176b1 [libcalamares] Need <memory> for unique_ptr
FIXES #1631
2021-01-31 21:40:41 +01:00
Neal Gompa
e56bdd019f modules/bootloader: Use the correct names for the shim binaries
Ever since signed shim binaries for multiple architectures became
available, the shim binaries installed in Linux distributions have
been renamed to include the EFI architecture in the binary names.

This started in Fedora, but is now used in openSUSE and Ubuntu too.

Reference for shim binary names comes from shim spec in Fedora:

d8c3c8e392/f/shim.spec (_23-32)
2021-01-30 05:37:41 -05:00
Adriaan de Groot
7ab9c63903 [libcalamares] Extend test with some degenerate cases 2021-01-29 11:53:36 +01:00
Adriaan de Groot
5c402ffd66 [libcalamares] Truncate to a character count as well 2021-01-28 22:13:44 +01:00
Adriaan de Groot
1542bad224 [libcalamares] Truncate strings without trailing newline properly 2021-01-28 15:30:00 +01:00
Adriaan de Groot
8e3ed3c933 [libcalamares] Remove redundant variable, use NEWLINE instead of character-literal 2021-01-28 15:24:05 +01:00
Adriaan de Groot
3623e9aefc [libcalamares] Extend tests of string-truncation 2021-01-28 14:47:03 +01:00
Adriaan de Groot
b85e5b52c2 [libcalamaresui] Apply coding style
- Some minor bits snuck in with the string-truncation code
- While here, make UPDATE_BUTTON_PROPERTY more statement-like
  so it doesn't confuse code-formatters.
2021-01-28 13:52:48 +01:00
Adriaan de Groot
db5f3bc309 Merge branch 'issue-1613' into calamares 2021-01-28 01:07:03 +01:00
Adriaan de Groot
319a720d1b [libcalamares Expand tests 2021-01-28 01:06:09 +01:00
Adriaan de Groot
b144d81979 [libcalamares] Fix up smart-string-truncation
- off-by-one when source ends with a newline
- lastNewLine was being calculated as a left-index into the string,
  then used as a count-from-right
2021-01-28 01:02:46 +01:00
Adriaan de Groot
3be360e433 [libcalamares] Add tests to string truncation
- check that basic manipulations succeed
- trailing-lines selection fails, though
2021-01-28 00:23:13 +01:00
Adriaan de Groot
8cc114bf2c [libcalamares] Move smart-string-truncation to library
Expand the API a little to support first-lines, last-lines,
and something of both. Use strong types to make the names
clear for each.
2021-01-27 23:51:03 +01:00
benne-dee
f8385d2cb8
Fix https in URL 2021-01-27 23:12:29 +05:30
benne-dee
13181a52ee
Define schema for groups in netinstall.schema.yaml 2021-01-27 22:38:40 +05:30
Chrysostomus
8c0c84f162 Create all fstab entries one way instead of having special handling 2021-01-27 15:41:01 +02:00
benne-dee
938edf5bd6
Create shellprocess.schema.yaml 2021-01-27 11:41:53 +05:30
Chrysostomus
14fbbd92dc Get configured subvolumes from the global storage 2021-01-26 22:56:31 +02:00
Chrysostomus
092374d08c Add modified list to global storage 2021-01-26 22:48:02 +02:00
Chrysostomus
f53f43ad03 Remove some unnecessary bits 2021-01-26 22:42:35 +02:00
Chrysostomus
4b6718b354 Further generalize subvolume handling 2021-01-26 22:35:42 +02:00
Chrysostomus
942221c764 Generalize subvolume handling 2021-01-26 22:24:50 +02:00
Chrysostomus
945effb048 Amend subvolumes to include path 2021-01-26 22:13:29 +02:00
Chrysostomus
b5cfa5109e Add schema definition 2021-01-26 21:34:11 +02:00
Chrysostomus
4ab30569c2 Add default configuration 2021-01-26 21:31:33 +02:00
Adriaan de Groot
4f78afe67e [libcalamaresui] Display a reduced amount of details
Cut the error message from down to a maximum of 8 lines
so that the messagebox does not hopelessly overflow.
2021-01-26 00:37:08 +01:00
Adriaan de Groot
f0fd47eeb3 [libcalamares] Simplify logging-manipulators
Writing `Logger::NoQuote{}`` has annoyed me for a while, so
switch it to a constant, like SubEntry, so it looks more
like a regular manipulator object.
2021-01-26 00:13:10 +01:00
Adriaan de Groot
c1064c5e08
Merge pull request #1597 from Chrysostomus/btrfs-swap
[fstab][mount] Btrfs swapfile handling
2021-01-25 15:19:45 +01:00
Anubhav Choudhary
b4078f3634 Changed branding keynames + minor fixes 2021-01-25 01:09:20 +05:30
Anubhav Choudhary
186c065b4c PasteURL sent to clipboard 2021-01-23 22:49:23 +05:30
Anubhav Choudhary
a2c930a714 Code-formatted and Copyright-text added 2021-01-23 21:16:32 +05:30
Anubhav Choudhary
ff66e4b3d5 Redirecting logUpload vars to pasteUtility 2021-01-23 20:47:33 +05:30
Anubhav Choudhary
f6cb879929 branding.desc updated 2021-01-23 20:43:55 +05:30
Adriaan de Groot
9a4c599e22 [libcalamares] Tidy logging a little for Python errors 2021-01-22 14:49:20 +01:00
Adriaan de Groot
6978ce3cb4 [partition] Collect more kpmcore 4.2 code 2021-01-20 14:56:34 +01:00
Adriaan de Groot
520f08bbba [partition] Fix build with legacy kpmcore 2021-01-20 14:54:12 +01:00
Adriaan de Groot
31bf38977e [partition] Refactor partition-labeling 2021-01-20 14:48:44 +01:00
Adriaan de Groot
3ade1fd84a Merge branch 'add-automount-control' into calamares 2021-01-18 16:28:12 +01:00
Adriaan de Groot
b709ba7a5b
Merge pull request #1590 from deprov447/Back/Next_buttons_at_installation
Navigation buttons hideability during installation
2021-01-18 16:24:10 +01:00
Adriaan de Groot
9482935034
Merge pull request #1572 from gportay/partition-output-more-things-in-overiew
[partition] output more things in overiew
2021-01-18 15:08:19 +01:00
Adriaan de Groot
478af25cec
Merge pull request #1571 from gportay/unpackfs-skip-overlay-extended-attributes
[unpackfs] Skip overlay extended attributes
2021-01-18 15:00:12 +01:00
Anubhav Choudhary
0ff32784d1 hooked backAndNextVisible signal to nonQML navigation 2021-01-13 22:41:25 +05:30
Anubhav Choudhary
a9539018e9 [fixed] backAndNextVisbility logic 2021-01-13 22:15:22 +05:30
Gaël PORTAY
af5c57a713 [partition] Output filesystem features in overview 2021-01-08 08:57:03 -05:00
Gaël PORTAY
c045af1975 [partition] Output GPT entries in overview 2021-01-08 08:57:03 -05:00
Gaël PORTAY
bf9c9a64f1 [libcalamares] Introduce new function getPartitionTable 2021-01-08 08:54:02 -05:00
Adriaan de Groot
132ff59d9c [libcalamares] Make running commands less chatty
If there's no output, don't mention it; don't mention failure modes
if the command was successful.
2021-01-06 00:07:35 +01:00
Adriaan de Groot
a3eae323f1 [libcalamares] Rename test-executable: avoid clashes with 'cala<tab>' 2020-12-22 22:08:23 +01:00
Adriaan de Groot
d74bdbcfd0 [libcalamares] coding-style, logging in calautomount 2020-12-22 22:07:17 +01:00
Adriaan de Groot
3150785ff1 [libcalamares] Use shared_ptr instead of unique_ptr
The value inside a unique_ptr can't be opaque, it needs to be known
at any site where the pointer may be deleted. shared_ptr does not
have that (deletion is part of the shared_ptr object, which is larger
than the unique_ptr) and so can be used for opaque deletions.
2020-12-22 21:29:49 +01:00
Adriaan de Groot
1c4bf58fb4 [libcalamares] automount-manipulation test-program 2020-12-22 21:25:00 +01:00
Adriaan de Groot
f0a33a235c [libcalamares] Make automountDisable() more flexible 2020-12-22 21:24:30 +01:00
Adriaan de Groot
9e6bddf31a [partition] Add new AutoMount-manipulating helpers 2020-12-22 16:05:20 +01:00
Adriaan de Groot
1c285f011b [libcalamares] Export partition-syncer symbols 2020-12-22 16:03:51 +01:00
Adriaan de Groot
c963d8905f [netinstall] Merge the two descriptions of *immutable* 2020-12-21 17:24:06 +01:00
Chrysostomus
271122865f define global storage 2020-12-20 01:27:45 +02:00
Adriaan de Groot
2ccd5a2043 Docs: explain about loadmodule
The Python-specific `testmodule.py` was replaced by the more
general `loadmodule`.

FIXES #1596
2020-12-14 16:18:50 +01:00
Anubhav Choudhary
e3a41571f0 Spacing added 2020-12-08 18:19:14 +05:30
Chrysostomus
727f7859b7 Mount @swap to /swap when needed 2020-12-07 22:59:29 +02:00
Chrysostomus
b180cbd47d Generate a subvolume for swap if swapfile is used 2020-12-07 22:52:39 +02:00
Chrysostomus
97eb32bf5c Correct the path of swapfile on btrfs 2020-12-07 22:47:32 +02:00
Chrysostomus
80a538665e Generate entry for subvolume @swap 2020-12-07 22:39:21 +02:00
Chrysostomus
3f0612b4ad Use different location for swapfile on btrfs root 2020-12-07 22:31:20 +02:00
Anubhav Choudhary
0f2320bd47 Initializing bools in settings.h 2020-12-07 21:40:59 +05:30
Anubhav Choudhary
03d1fe434c Navigation button hideability added 2020-12-06 04:32:18 +05:30
Chrysostomus
59cfdcccdf Use variable instead of a function 2020-12-05 22:57:51 +02:00
Chrysostomus
0ed0d37693 Don't use plymouth-encrypt if there is keyfile in use, because it is buggy and asks for password even when it is not needed 2020-12-05 22:55:35 +02:00
Adriaan de Groot
06c6ea04c0 [users] Make status message consistent (no .) 2020-12-04 22:26:27 +01:00
Calamares CI
3c14d7092a i18n: [dummypythonqt] Automatic merge of Transifex translations 2020-12-04 22:11:59 +01:00
Adriaan de Groot
a93e96da7c [branding] Restore dropped https 2020-12-04 20:56:46 +01:00
Anubhav Choudhary
e8238ca713 Name added in copyright section 2020-12-04 23:01:06 +05:30
Anubhav Choudhary
a4c759355b [Fix] WelcomePage links
"Generic support" and "Known Issues" links fixed
2020-12-04 10:39:07 +05:30
Adriaan de Groot
f4133a97db [libcalamares] Make test a bit more verbose (before failing) 2020-11-30 15:38:17 +01:00
Adriaan de Groot
fa7d2bda16 [libcalamares] Misplaced space in a test-filename 2020-11-30 15:28:08 +01:00
Adriaan de Groot
1f21b9ad73 [dracutlukscfg] Const data
The QLatin1String() might be replaced by char[], that trades one
initialization for two but with a simpler data section; this
probably is not worth profiling.
2020-11-30 14:41:02 +01:00
Adriaan de Groot
1f0aec5f87 [dracutlukscfg] Job-internal constant data doesn't need to be a member 2020-11-30 14:35:21 +01:00
Adriaan de Groot
d2c7c42aec [dracutlukscfg] More static methods -> free functions 2020-11-30 14:32:36 +01:00
Adriaan de Groot
6d02bab098 [dracutlukscfg] static methods -> free functions
These methods don't touch anything in the class, and are more safely
tucked away as static (TU-local) free functions.
2020-11-30 14:23:06 +01:00
Adriaan de Groot
6df3c023c8 [luksbootkeyfile] Free functions that really are static (TU-local) 2020-11-30 14:16:35 +01:00
Adriaan de Groot
b82da569d5 [plasmalnf] Remove unused (widget) files 2020-11-30 14:16:35 +01:00
Adriaan de Groot
06e2db946f [plasmalnf] Older Qt doesn't have -> for iterator
With Qt 5.15.2 (and clang), `k->first` works, but this breaks
with Qt 5.11 (and gcc), this is not available and the dereference
  must be written differently, `(*k).first`.
2020-11-30 13:12:42 +01:00
Adriaan de Groot
ff66eacd0d Merge branch 'issue-1573' into calamares 2020-11-30 12:31:26 +01:00
Adriaan de Groot
fb9fa347a0 [plasmalnf] Fix iteration
`for k : images` iterates over the values in the map, while we need
both the key (the theme-id) and the value (the image to hand to
that theme).
2020-11-30 12:30:01 +01:00
Adriaan de Groot
bcff0454a3 [plasmalnf] Give the themes a selected-state
- This kind of runs around the selection model on the view,
  but we're drawing radio buttons ourselves **anyway**
  and the list of themes knows which is selected / current
  independent of the view.
2020-11-30 12:11:11 +01:00
Adriaan de Groot
da4f8fffcf [plasmalnf] Give the theme list plenty of space 2020-11-30 11:31:44 +01:00
Adriaan de Groot
cf538fb837 [plasmalnf] Implement a delegate for drawing the list of themes 2020-11-30 11:19:00 +01:00
Adriaan de Groot
cc6611bac4 [plasmalnf] Make 'the size of screenshots' available outside ThemeInfo 2020-11-30 10:46:46 +01:00
Adriaan de Groot
dac590a094 [plasmalnf] Rip out the intermediate model again, in prep for a delegate 2020-11-28 16:53:35 +01:00
Adriaan de Groot
61a2335909 [users] Stray space in message (reported by Transifex user Moo) 2020-11-24 23:47:13 +01:00
Adriaan de Groot
ccfbd6b972
Merge pull request #1566 from Chrysostomus/calamares
Don't use a keyfile for encrypted partitions if /boot in unecrypted
2020-11-24 16:13:32 +01:00
Adriaan de Groot
2a30ae1e25 [unpackfs] Log failure during unpackfs more clearly 2020-11-22 23:14:02 +01:00
Adriaan de Groot
66da5f2fa4 [netinstall] Removing the last package should clear it out.
FIXES #1577
2020-11-18 17:27:50 +01:00
Adriaan de Groot
06cbabd189 [plasmalnf] Simplify (warnings--, debug--) 2020-11-17 14:40:21 +01:00
Adriaan de Groot
faa1cb6b65 [plasmalnf] Demand-load image for a theme 2020-11-17 14:32:50 +01:00
Adriaan de Groot
58ea40c14d [plasmalnf] Add a description
- add a role for description
- change view to a table view
2020-11-17 12:41:50 +01:00
Adriaan de Groot
258a14bea2 [plasmalnf] Expose only the themes model
- make ThemeInfo and ThemeInfoList internal, expose only
  ThemesModel to the rest of the PlasmaLnF module
- don't build the widget anymore (needs to be replaced by
  a delegate)
2020-11-17 11:56:09 +01:00
Adriaan de Groot
04a6fbc4c4 [plasmalnf] Fix debug-logging
- ProcessResult isn't loggable, so operator bool() is called, so
  it logged 'false' on failure which isn't helpful.
2020-11-17 11:42:27 +01:00
Adriaan de Groot
0a88273e0d [plasmalnf] Replace combobox with a view 2020-11-17 11:38:33 +01:00
Adriaan de Groot
3909459563 [plasmalnf] Signal more changes to the model
- also individual changes need to be signalled
- use QSignalBlocker to avoid spamming changes when calling
  aggregate change methods
- refactor findById() so that also a row number can be
  obtained, which is needed for the change signals.
2020-11-17 11:17:47 +01:00
Adriaan de Groot
f93cec031b [plasmalnf] Introduce an index-lookup function
- for signalling model changes, also need to know indexes / row
2020-11-17 00:25:48 +01:00
Adriaan de Groot
f9e99da468 [plasmalnf] Improve lnf model
- remove useless widget pointer from themeinfo
- notify when data changes in the model
2020-11-17 00:12:47 +01:00
Adriaan de Groot
1f57a0ddda [plasmalnf] Very basic combo-box based UI 2020-11-17 00:02:59 +01:00
Adriaan de Groot
aaa56b6903 [plasmalnf] Rip out most of the widget
- put a filter model in place, so only the themes with "show" set
  are displayed
- rip out the messing about with widgets, soon to introduce a model-
  based UI
2020-11-16 23:36:32 +01:00
Adriaan de Groot
d4887426e2 [plasmalnf] Set screenshots on themes, filtering
- while here reorder the config so the effect of *showAll* is clearer
2020-11-16 21:57:06 +01:00
Adriaan de Groot
254933a488 [plasmalnf] Prep-work for loading the themes into the model 2020-11-16 21:28:37 +01:00
Adriaan de Groot
57907ca992 [plasmalnf] Move model to ThemeInfo files 2020-11-16 18:14:23 +01:00
Calamares CI
9bf0a3414f i18n: [dummypythonqt] Automatic merge of Transifex translations 2020-11-16 12:15:52 +01:00
Chrysostomus
ff9f47ec83 Fix syntax errors 2020-11-15 01:42:16 +02:00
Chrysostomus
567b01eab0 call function at different scope to avoid name collision 2020-11-13 23:39:25 +02:00
Chrysostomus
09798a2a12 Use free functions (I wish I had known I can do this) 2020-11-13 00:02:12 +02:00
Chrysostomus
8676ce9a20 Simplify the generators 2020-11-12 23:57:02 +02:00
Gaël PORTAY
feab8bebba [partition] Remove unused attribute m_defaultFsType
This attribute is used since the commit fcd0e8d36 [partition] Apply
partition layout when replacing free space
2020-11-12 15:15:51 -05:00
Adriaan de Groot
dda2e1f29f Merge commit 'a8359696caf07b81b85db8acad2d3f44720d07fa' into calamares
This is the bugfix part (rather than the "clean up this widgets mess")
of issue-1573, ensuring that the LookAndFeelPackage setting is
saved to the target system config file.
2020-11-12 15:59:56 +01:00
Adriaan de Groot
27f1e82a8f [plasmalnf] Remove unused path-setting from the widget
- Only Config needs to know the path, since it is responsible for
  doing the actual lnf changes.
2020-11-12 15:59:03 +01:00
Adriaan de Groot
a19109ed0b [plasmalnf] Prepare a new model
- start a model for available themes, to replace the list held
  by the widget which just duplicates information.
- move preselected theme to Config.
2020-11-12 15:36:29 +01:00
Adriaan de Groot
03e09cb7e6 [keyboard] When changing layouts, reset variant
- Need to update the variant that is in use, **and**
  explicitly update it in the widget, in order to re-load
  the keyboard image for the newly-selected layout+variant.
2020-11-12 15:29:15 +01:00
Adriaan de Groot
fdfe3937e9 [keyboard] Tell the keyboard preview to update on config changes
These calls to setLayout() and setVariant() got lost in
the transition to Config object, in 5afe5413.

Reported by Harald Sitter.
2020-11-12 14:50:21 +01:00
Gaël PORTAY
2e6d632c7c [partition] Fix typo 2020-11-11 12:49:44 -05:00
Adriaan de Groot
cba2733471 [plasmalnf] Move job creation to config 2020-11-11 14:45:31 +01:00
Adriaan de Groot
0af12546ef [plasmalnf] Migrate more settings to Config 2020-11-11 14:41:45 +01:00
Adriaan de Groot
b4aca7e188 [libcalamares] Tidy up documentation for System::runCommand
- Make explicit which one runs in the host, which one is selectable.
- Document *location* parameter in the selectable version.
- Tidy up alignment of apidox.
2020-11-11 14:03:23 +01:00
Adriaan de Groot
00293d1111 [plasmalnf] Move the lookandfeeltool path setting to Config 2020-11-11 13:21:16 +01:00
Adriaan de Groot
0f07550006 [plasmalnf] Introduce (empty) Config object 2020-11-11 13:08:42 +01:00
Adriaan de Groot
a8359696ca [plasmalnf] Remove unnecessary includes 2020-11-11 13:06:09 +01:00
Adriaan de Groot
76b0981918 [plasmalnf] Apply workaround for lookandfeeltool
The lookandfeeltool does not (always?) write the LookAndFeelPackage
key that the KCM does -- and which this module reads on startup
to find the default LnF. This seems to be a regression in recent
lookandfeeltool versions (or in the KCM code that backs it).

Workaround supplied by jghodd.

Fixes #1573
2020-11-11 12:57:40 +01:00
Adriaan de Groot
8f590848bd [plasmalnf] Simplify code
- Look-and-Feel job has no status to speak of
- Coding style
2020-11-11 12:45:19 +01:00
Chrysostomus
543a9e1afc Remove extra static keyword 2020-11-10 22:11:49 +02:00
Adriaan de Groot
b503aa645b
Merge pull request #1563 from LordTermor/calamares
[users] Full name transliteration support for user creation
2020-11-10 01:19:44 +01:00
Artem Grinev
16eca3c1be [users] Apply code format 2020-11-10 01:54:21 +03:00
Artem Grinev
ca033583a4 Simplified logic a bit, made punctuation handling more correct 2020-11-10 01:47:07 +03:00
Artem Grinev
da5fb2d3e1 Improved comment 2020-11-10 01:40:08 +03:00
Artem Grinev
d5e678157d Changed TRANSLITERATOR_ID type to array 2020-11-10 01:23:10 +03:00
Gaël PORTAY
7859d98a32 [unpackfs] Skip overlay extended attributes
The module preserves the extended attributes at rsync and the overlay
filesystem stores extended attributes by inodes.

The overlay filesystem keeps traces of the lower directory by encoding
and storing its UUID to the attribute trusted.overlay.origin. If the
index feature is on, that attribute is compared to the UUID of the lower
directory at every subsequent mounts and causes mount to fail with
ESTATE if it does not match.

This filters the namespace trusted.overlay.* by using the rsync option
--filter='-x trusted.overlay.*' to make sure the overlays extended
attributes are not preserved.

Fixes:
        # mount -t overlay -o lowerdir=...,upperdir,...,workdir= overlay /mnt/etc
        mount: /var/mnt/etc: mount(2) system call failed: Stale file handle.

        # dmesg
        (...)
        overlayfs: "xino" feature enabled using 32 upper inode bits.
        overlayfs: failed to verify origin (/etc, ino=524292, err=-116)
        overlayfs: failed to verify upper root origin
2020-11-09 17:13:12 -05:00
Chrysostomus
e3ee3c623d Add some relevant looking stuff to header file 2020-11-09 23:24:09 +02:00
Adriaan de Groot
b4c3236e4a [users] Consume error information from libpwquality
Previously, the auxerror information was never stored, and
the messages were all un-numbered or un-explained.
Now, consume that information and store it when check()
is called, ready to be used when (possibly much later,
or after a translation change) explanation() is called.
2020-11-09 16:08:19 +01:00
Adriaan de Groot
43565027f5 [users] m_auxerror never set, always nullptr 2020-11-09 15:42:22 +01:00
Adriaan de Groot
f3e37f3cee [users] Remove unused PWQuality method 2020-11-09 15:40:23 +01:00
Adriaan de Groot
a5dfe7cd68 i18n: update english translations 2020-11-09 15:14:54 +01:00
Adriaan de Groot
4e9c18a565 [users] Translate PWQuality error messages with numbers 2020-11-09 15:14:41 +01:00
Adriaan de Groot
2a9bbf1dd5 [users] Add test for jobs-creation
- This tries to avoid the now-fixed situation where a sudoersGroup job
  is not created at all (because of a logic error).
- While here, coding style
2020-11-09 11:39:11 +01:00
Chrysostomus
adc8d7e624 Fix typo 2020-11-07 12:55:54 +02:00
Adriaan de Groot
3b152ba455 Merge branch 'fix-sudo-settings' into calamares 2020-11-06 22:28:37 +01:00
Adriaan de Groot
43e271dfec [users] Missing negation 2020-11-06 22:27:46 +01:00
Adriaan de Groot
8e53b83f9f [users] Test for setting / resetting sudo settings 2020-11-06 22:27:34 +01:00
Chrysostomus
b7cc4860e0 Put the condition on a single line for prettiness sake 2020-11-06 21:45:01 +02:00
Chrysostomus
3731dfb146 Try not to create the keyfile if not necessary 2020-11-06 21:32:10 +02:00
Adriaan de Groot
6f41949bba [users] Log when sudo is skipped 2020-11-06 14:38:12 +01:00
Gaël PORTAY
6e9ce7194f [mount] Ignore unformatted filesystems only
Mount guesses the filesystem if it is unset or if it is set to auto,
thanks to blkid. That is the case for the bind mountpoints like /dev or
/run/udev in mount.conf. See `mount(8)` for more details.
2020-11-06 07:38:48 -05:00
Matti Hyttinen
73b5c62ab8
Update main.py
typo in a comment
2020-11-06 08:49:22 +02:00
Adriaan de Groot
afb4e00f92 [keyboard] Pre-select pc105 2020-11-06 01:10:27 +01:00
Adriaan de Groot
e5b7e66ee9 [locale] Filter zones combo always
The drop-down of zones was initially unfiltered, so you could start
in Europe/Amsterdam and the zones drop-down would also show Australian
zones; picking Perth would have weird effects, since Europe/Perth
doesn't exist and so you'd end up in New York instead.

- set the filtering region immediately, rather than only when the
  region changes.
2020-11-05 00:33:45 +01:00
Adriaan de Groot
83b2b95381 [libcalamares] Reduce object churn
- we don't need to allocate a new translator each time the language changes
2020-11-05 00:09:23 +01:00
Chrysostomus
741c1c5d1e Use constructor instead of a loop 2020-11-05 01:01:26 +02:00
Adriaan de Groot
59255c7a57 Changes: apply coding style 2020-11-05 00:00:29 +01:00
Adriaan de Groot
be7b63051e Enable keyboard-model and layout-name translations.
SEE #1515
2020-11-04 23:36:33 +01:00
Chrysostomus
26b1c349d3 Set default value inside the relevant function 2020-11-04 19:27:59 +02:00
Adriaan de Groot
c4de62cb9a Merge branch 'fix-keyboardq' into calamares
Various file writes were not being checked, and the code
was a bit tangled; specifically keyboardq did **not**
configure properly on KaOS and now seems ok.
2020-11-04 17:09:56 +01:00
Adriaan de Groot
83d2c06f68 [keyboard] Apply coding style 2020-11-04 16:36:52 +01:00
Adriaan de Groot
705e6dd8d6 [keyboard] Improve debug-logging for writing etc/default 2020-11-04 16:32:22 +01:00
Adriaan de Groot
cbc376a206 [keyboard] Improve debug-logging for writing X11 config 2020-11-04 16:32:22 +01:00
Philip Müller
5191df2bde
Merge pull request #1568 from gportay/partition-fix-typo
[partition] Fix typo
2020-11-04 16:18:00 +01:00
Adriaan de Groot
57da222c72 [keyboard] Improve debug-logging for vconsole-config 2020-11-04 16:16:28 +01:00
Gaël PORTAY
e2b00bc517 [partition] Fix typo 2020-11-04 09:58:07 -05:00
Gaël PORTAY
e9e4be1c60 [umount] Fix list of mount-points to unmount
The root mount-point can end with a / while the mount-point read from
the file /etc/mtab does not end with a /.

This leads to skip the unmounting of the root mount-point and causes the
removal of the root mountpoint directory to fail with EBUSY because it
is still mounted.

This uses the python functions os.path.normpath() to normalize the root
mount-point (i.e. to drop the trailing /) and os.path.commonprefix() to
determine the longest common prefix between the two mount-points. If the
returned prefix is identical to the normalized root mount-point then the
mount-point must be added to the list of the mount-points to unmount.

More generally, the python modules should rely on the os.path functions
to compare for paths instead of using strings. It covers this way lots
of corner cases (path with "//", "/../", "/./", ...).
2020-11-04 08:37:22 -05:00
Adriaan de Groot
845fb3f6da [keyboard] Refactor writing-various-files
- put the writing of each kind of file in its own block -- this should
  become separate functions -- so that variables become more local
  and debugging can be improved.
- while here, fix the error message for /etc/default/keyboard:
  it would complain and name the vconsole file path if it ever failed.
2020-11-04 14:03:14 +01:00
Adriaan de Groot
3e51d77782 [keyboard] Check for successful file-write 2020-11-04 13:39:23 +01:00
Adriaan de Groot
2c297a068f [partition] Log when an EFI problem has been solved 2020-11-04 12:32:51 +01:00
Adriaan de Groot
0f38ee624e [partition] static-assert that our shortcut makes sense 2020-11-04 09:59:35 +01:00
Artem Grinev
94f7efb89f [users] Remove ' from transliterated string 2020-11-04 03:37:25 +03:00
Artem Grinev
f20d0a7593 [users] Name cleanup after transliteration 2020-11-04 03:24:58 +03:00
Artem Grinev
aa5ef7a6b8 [users] New transliterator ID 2020-11-04 03:21:31 +03:00
Adriaan de Groot
15ace5202d [partition] Simplify EFI-flags checking with KPMCore 4 2020-11-04 01:16:36 +01:00
Adriaan de Groot
85bb8c27b3 [partition] Simplify flags calculations
- factor out the flags-we-want from the flags-we-already-have
 - the use of ->activeFlags() meant that the state on *disk* was
   being compared with the flags-we-want; if a partition was re-edited,
   then you couldn't change the flags back to the state-on-disk
   (eg. enable a flag, then change your mind and disable it).
 - set the flags before refreshing the partition, because the
   refresh checks for EFI bootability and that needs the new flags,
   not the old ones.
2020-11-04 00:58:11 +01:00
Adriaan de Groot
949e33f1e8 [partition] Massage logging while checking for EFI boot 2020-11-04 00:43:32 +01:00
Adriaan de Groot
63964de4bd [partition] Explain underlying type for flags variant 2020-11-04 00:32:21 +01:00
Adriaan de Groot
87c77d9807 [partition] When flags are explicitly invalid, return early 2020-11-04 00:14:05 +01:00
Adriaan de Groot
356e13ae93 [partition] Improve logging readability 2020-11-03 23:46:07 +01:00
Chrysostomus
fe291bc51a Write the crypttab entry still 2020-11-03 23:33:24 +02:00
Chrysostomus
9f52282e4c Don't use keyfile if there /boot is unencrypted 2020-11-03 23:23:56 +02:00
Chrysostomus
3eae98eac3 Don't enable grub password query if /boot is on unencrypted partition 2020-11-03 23:15:35 +02:00
Adriaan de Groot
72c9df67d2
Merge pull request #1565 from Chrysostomus/calamares
[initcpiocfg] Use graphical decryption prompt with plymouth
2020-11-03 14:29:22 +01:00
Adriaan de Groot
f898840e16 [users] Expand schema to cover new possibilities 2020-11-03 13:02:49 +01:00
Chrysostomus
84558333bf Regular plymouth hook is also still needed 2020-11-03 13:57:19 +02:00
Chrysostomus
3bf57c7785 Use graphical decryption prompt with plymouth as adviced here: https://wiki.archlinux.org/index.php/plymouth#The_plymouth_hook 2020-11-03 13:55:24 +02:00
Adriaan de Groot
36f9fd56a3 [users] Expand the example config with new possibilities 2020-11-03 12:54:19 +01:00
Adriaan de Groot
7c268b2e4d [users] Correct terminology in configuration documentation 2020-11-03 12:48:12 +01:00
Adriaan de Groot
2516f18d1b
Merge pull request #1560 from gportay/partition-mount-make-mountPoint-and-filesystem-optionals
[partition,mount] Make mountPoint and filesystem optionals
2020-11-02 23:25:53 +01:00
Adriaan de Groot
ffce79e30e [partition] Initialize the filesystem type, not the partition type
- Passing FileSystem::Type to the QString constructor for
  partition type is not what I intended.
2020-11-02 22:32:44 +01:00
Adriaan de Groot
73b5a0898d [partition] Migrate the defaultFS type
- remove the m_defaultFSType from PartitionLayout, because it is
  set on construction -- which is too early, before the configuration
  has been read.
- make the default FS explicit in the init() calls which pass in
  a configuration; this needs support in the intermediate
  PartitionCoreModule.
2020-11-02 21:35:43 +01:00
Adriaan de Groot
23eabd74c6 [partition] Set FS type explicitly if no layout is given
- the "simple" constructor for PartitionEntry left the FS type
  set as the constructor left it -- which is Unknown by default.
  This leads to install failures in systems that don't set a
  special layout but just want a single / -- because the FS is
  set to Unknown.
- massage the constructor and consumer of the code, push
  Ext4 FS in the tests and use the configured default in production.
2020-11-02 16:01:10 +01:00
Artem Grinev
c85d1ae1fe Explanation why ICU is needed for usersq module 2020-11-02 17:53:05 +03:00
Adriaan de Groot
f78752303b [partition] Improve constructors for layout
- initialize flags by default
- the copy constructor was just doing the default thing,
  so make that explicit
2020-11-02 15:40:32 +01:00
Gaël PORTAY
6013ed52f8 [partition] Ignore unformatted filesystem 2020-11-02 09:01:23 -05:00
Gaël PORTAY
db08d2db8b [partition] Make filesystem optional and default to unformatted 2020-11-02 08:36:41 -05:00
Gaël PORTAY
163351a803 [mount] Ignore empty or unformatted filesystems 2020-11-02 08:36:41 -05:00
Gaël PORTAY
c6feedf923 [mount] Ignore empty mountpoints 2020-11-02 08:36:41 -05:00
Gaël PORTAY
54fd1f4b26 [mount] Print a warning if mount failure
The return of the call to libcalamares.utils.mount is never tested and
it may fail silently; this causes some mounpoints to be missing.

This adds a warning if mountpoint cannot be mounted.

	chcon: failed to get security context of '/tmp/verity': Operation not supported
	06:44:23 [6]: static CalamaresUtils::ProcessResult CalamaresUtils::System::runCommand(CalamaresUtils::System::RunLocation, const QStringList&, const QString&, const QString&, std::chrono::seconds)
	    Running "env" ("mount", "-t", "unformatted", "/dev/sdb2", "/tmp/calamares-root-kv8dqgb5/tmp/verity")
	    ..  Finished. Exit code: 32
	    ..  Target cmd: ("mount", "-t", "unformatted", "/dev/sdb7", "/tmp/calamares-root-kv8dqgb5/tmp/verity") output:
	 mount: /tmp/calamares-root-kv8dqgb5/tmp/verity: unknown filesystem type 'unformatted'.
2020-11-02 08:36:41 -05:00
Gaël PORTAY
1f9f506a16 [partition] Make mountPoint optional
Some devices cannot be mounted (as DM_verity_hash), therefore, it is
nosense to set a mountPoint for them.
2020-11-02 08:36:41 -05:00
Adriaan de Groot
486cdaeeb6 [users] Shuffle library order to satisfy CI build 2020-11-02 14:10:35 +01:00
Adriaan de Groot
2bd3f1d8c1 Merge branch 'issue-1523' into calamares 2020-11-02 13:08:30 +01:00
Adriaan de Groot
b61b5f8650 [users] Run an expected-to-fail test in creating groups 2020-11-02 12:27:50 +01:00
Adriaan de Groot
8127ae704c [users] Expand tests for groups a little 2020-11-02 12:13:59 +01:00
Adriaan de Groot
e66f81f6ee CMake: comment on BUILD_AS_TEST 2020-11-02 12:01:02 +01:00
Adriaan de Groot
10991346b7
Merge pull request #1561 from gportay/partition-set-swap-partition-name
[partition] Allow a configurable swap Partition name
2020-11-02 11:43:07 +01:00
Adriaan de Groot
7578768c46
Merge pull request #1562 from gportay/partition-group-efi-things-together
[partition] Group EFI things together
2020-11-02 11:39:44 +01:00
Artem Grinev
4e54a2aefe [users] Cleaned error handling a bit 2020-11-02 04:01:01 +03:00
Artem Grinev
8e07bb00f9 [users] Construct icu::UnicodeString from QString's utf16 chars directly 2020-11-02 03:52:37 +03:00
Artem Grinev
48eae463cc [users] Full name transliteration support for user creation 2020-11-01 19:45:12 -05:00
Adriaan de Groot
0bad5469fc [libcalamares] Fix tests failures from JobQueue asserts
Some compile flags changed recently, triggering assert()
in the jobqueue when there is more than one. There's no
real reason for JobQueue to be a singleton, but it wants
to be. So clean up pointers a little more enthusiastically.
2020-11-01 17:59:41 +01:00
Adriaan de Groot
4746754344 [keyboard] Translate layouts as well 2020-11-01 14:28:12 +01:00
Adriaan de Groot
6863db0dc1 [keyboard] Use the translations if they were loaded 2020-11-01 14:19:06 +01:00
Adriaan de Groot
f088efdf84 [keyboard] Re-jig translation extraction
- Use classes to prompt lupdate to extract with a better
  context (e.g. the class name, rather than plain "QObject")
  so that the translation-lookup can use the named context.
- Add hard-coded "default" variant
- Add totally bogus Tajik translations, for testing purposes
2020-11-01 13:50:12 +01:00
Adriaan de Groot
1a5fa36fb6 i18n: build keyboard translations
This is the Wrong Thing To Do, but we'll do it for now: build the
keyboard translations into the executable. In the medium term
they should move to the modules that use them, with the re-vamp
of how translation changes are signalled.
2020-11-01 12:42:58 +01:00
Adriaan de Groot
4a08fdbb92 [partition] Reduce warnings from KPMCore
- make KPMHelper.h an "everything include" and suppress warnings
  from it, then use it in the tests.
2020-11-01 00:20:17 +01:00
Adriaan de Groot
d26fde6647 [partition] Reduce warnings
- Add a helper header that munges the warnings-settings so that
  KPMcore headers can be included.
2020-11-01 00:05:05 +01:00
Adriaan de Groot
c41ff94f8a [locale] Reduce warnings (C++17)
Now that Calamares is compiled as C++17, we get this:

src/modules/locale/timezonewidget/TimeZoneImage.cpp:28:55: warning: out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated [-Wdeprecated]
/* static constexpr */ const QSize TimeZoneImageList::imageSize;
2020-10-31 23:48:20 +01:00
Adriaan de Groot
4d444cbfbb [partition] Reduce warnings (Clang, FreeBSD)
The code doesn't match the comment: there are no by-ref captures
in the code, and the shadowing of parameters and local variables
is confusing. Remove one variable that is passed in as an argument
(and just pass the value as argument) and copy-capture the other
rather than doing weird argument passing.
2020-10-31 23:37:06 +01:00
Adriaan de Groot
0a44ce381e [partition] Reduce warnings (Clang, FreeBSD)
- remove unused this captures from lambda
- rename variables that are short, cryptic, and shadowed
- remove documentation for parameters that don't exist
2020-10-31 23:16:48 +01:00
Gaël PORTAY
3967cfe0eb [partition] Group EFI things together 2020-10-31 18:09:44 -04:00
Gaël PORTAY
a1d45122eb [partition] Update partition.conf 2020-10-31 17:59:08 -04:00
Gaël PORTAY
dad9587c3e [partition] Allow a configurable swap Partition name
This commit adds the new configuration `swapPartitionName` to the file
partition.conf.

This option sets the partition name to the swap partition that is
created. If this option is unset, the partition is left unnamed.
2020-10-31 17:39:50 -04:00
Adriaan de Groot
4387b8061e [keyboard] Move responsibility for retranslation to Config
- only widgets get language change events, so we need to
  hook that up to the ViewSteps and inform the Config
  object so that it can (re)load translations for the
  keyboard data.
2020-10-31 20:02:21 +01:00
Adriaan de Groot
71e0081fce [keyboard] SPDX-tagging 2020-10-30 22:31:42 +01:00
Adriaan de Groot
7db398cfdf
Merge pull request #1558 from gportay/partition-cleanups
[partition] cleanups
2020-10-30 22:30:38 +01:00
Adriaan de Groot
89a180ee58 [keyboard] Initial support for translated keyboard names 2020-10-30 16:24:56 +01:00
Adriaan de Groot
b72eba8157 [libcalamares] Extend the Deleter-helper with "preserve"
Sometimes you want to keep the thing around after all.
2020-10-30 15:58:38 +01:00
Adriaan de Groot
7659dfdb9d [libcalamares] Expose a translations-loading function 2020-10-30 15:58:38 +01:00
Gaël PORTAY
f03ae06deb [partition] Rename execute to createPartitions 2020-10-30 10:20:18 -04:00
Gaël PORTAY
f2bfe2bd6a [partition] Fix coding style 2020-10-30 10:14:40 -04:00
Gaël PORTAY
cd725fbb4b Fix missing SPDX-FileCopyrightText in header 2020-10-30 10:12:28 -04:00
Gaël PORTAY
2007335865 [partition] Rename the KPMCore Partition local to part 2020-10-30 10:12:28 -04:00
Gaël PORTAY
32c1f81fbf [partition] Rename iterator in for loop to entry 2020-10-30 10:12:28 -04:00
Gaël PORTAY
3016b93c8f [partition] Simplify the method execute
- Rename the "size" locals using "sectors" in their name. Size may be
  confusing or not enough specific as it can be interpreted a size in
  Byte.
    partSizeMap -> partSectorsMap,
    totalSize -> totalSectors,
    availablesize -> availableSectors,
    size -> sectors,
    minSize -> minSectors
    maxSize -> maxSectors
- Create a the new local currentSector to iterate over the sectors;
  instead of using the parameter firstSector.
- Remove the variable end that does not help much; too many variable
  already. Expand its expression instead.
2020-10-30 10:12:28 -04:00
Gaël PORTAY
81bec68b3d [partition] Introduce new constructors for PartitionEntry
- Introduces new constructors for PartitionEntry: copy constructory and
  constructor with all attributes.
- Use the new constructor in method addEntry().
2020-10-30 10:12:27 -04:00
Gaël PORTAY
3f2dd516d3 [partition] Simplify the retrieval of the size attributes
- The variant helper toString() takes a default value since commit
  c9f942ad6 ([libcalamares] Add default value to variant helpers).
- Set the default value to 0 and simplify the retreival of size values
  by calling the helper toString() and removing the temporary variables.
2020-10-30 10:11:56 -04:00
Gaël PORTAY
03df5f6891 [libcalamares] Fix constness of functions 2020-10-30 09:42:59 -04:00
Gaël PORTAY
aec066359a [libcalamares] Fix coding style 2020-10-30 09:42:59 -04:00
Gaël PORTAY
db7cf74034 [partition] Remove the call the method contains
- The variant helper getString() calls contains() already.
2020-10-30 09:17:12 -04:00
Gaël PORTAY
d6ea30b23e [partition] Move initLayout logic to object PartitionLayout
- The logic of the method initLayout belongs to the object
  PartitionLayout. Move logic to that object.
- Use a single method initLayout in object PartitionCoreModule.
- Member m_partLayout in object PartitionCoreModule is no longer
  allocated.
2020-10-30 09:17:12 -04:00
Gaël PORTAY
eae1e90dce [partition] Remove unused PartitionLayout constructor
- The constructor PartitionLayout with PartitionEntry appears to be
  unused since its always. Drop it!
2020-10-30 09:17:12 -04:00
Gaël PORTAY
f2960366c8 [partition] Remove unused addEntry method
- The method addEntry with PartitionEntry appears to be unused since its
  always. Drop it!
2020-10-30 09:17:12 -04:00
Adriaan de Groot
ac6c9fae4a [libcalamares] Do not use moved-from object 2020-10-30 13:51:53 +01:00
Adriaan de Groot
2e9a44269c [keyboard] Extracted strings from keyboard list 2020-10-30 12:39:47 +01:00
Adriaan de Groot
5a378090c2 [keyboard] Do not munge keyboard model name
The translation happens whenever this code is run, which may
not match the language the user subsequently selects.
It also causes general problems with the translation,
since we end up with a possibly-partly-translated name.
2020-10-30 12:16:14 +01:00
Adriaan de Groot
7ec8c454bd [keyboard] Ukranian needs a switcher, too 2020-10-30 11:21:57 +01:00
Adriaan de Groot
8457a00ad0 [keyboard] Fix group-switcher multiplying
FIXES #1556
2020-10-30 11:05:15 +01:00
Adriaan de Groot
daaf16d331 Merge branch 'calamares' into issue-1523 2020-10-29 16:33:27 +01:00
Adriaan de Groot
cd9c0ea781 [keyboard] Reduce debugging output 2020-10-28 17:00:12 +01:00
Adriaan de Groot
2e5301c5c9 [keyboard] Simplify back down to lambdas
- With debugging and untangling done, the lambdas are simple
  and short, so return to using them. One point of improvement
  might be to give the models suitable slots themselves,
  to avoid even this indirection.
2020-10-28 16:54:08 +01:00
Adriaan de Groot
0bf28b0b94 [keyboard] Sanity in setCurrentIndex() parameters 2020-10-28 16:47:52 +01:00