Jakob Petsovits
37179801eb
[libcalamares] Block sleep with systemd/CK login manager if present
...
Calamares running as root is not always conducive to successfully
communicating with the fd.o PowerManagement interface on the user
session bus.
The login manager interface has long provided a similarly capable
sleep inhibition functionality, which at this point would be present
on the vast majority of distributions. Use it if systemd-logind
or ConsoleKit2 have registered this service on the system bus.
Regardless of running as root or user, Calamares shouldn't have
an issue contacting this interface.
Fixes #2384
2024-12-07 12:39:24 -05:00
Adriaan de Groot
20e6d1d66c
[libcalamares] Deal with deprecations in QComboBox
2024-12-02 22:58:04 +01:00
Adriaan de Groot
a87487020a
[libcalamares] Repair tests that use deprecated QLocale functions
2024-12-02 22:57:49 +01:00
Adriaan de Groot
03c5e366ed
[libcalamares] Deal with deprecations in XML QDomDocument
...
Introduce some Calamares helpers in the compat/ headers
space to help Xml-wrangling (i18n support tools, GeoIP)
avoid compiler warnings about deprecated API.
It's cleaner this way anyway, with a nice value returned
from setting a document's contents, rather than a bunch
of pointer arguments.
2024-12-02 22:57:49 +01:00
Adriaan de Groot
2fcc008d7b
[libcalamares] Follow deprecations in QLocale
...
Prefer territory() over country() in Qt 6.6 and later.
2024-12-02 13:15:43 +01:00
Adriaan de Groot
196f85fa2c
C++: prefer std::as_const over Qt solution
...
In Qt 6.6, qAsConst is deprecated; since Calamares is C++17
we have had a standard solution always.
2024-12-02 13:15:42 +01:00
Adriaan de Groot
c6f429e310
[libcalamares] re-add Runner to the public API
2024-11-05 15:53:24 +01:00
Adriaan de Groot
05bc0cbb09
[libcalamares] Make other tests more resilient
...
Use the full path to the test file, rather than assuming the test
is run from the build-directory. Repair check that looked at
the number of keys in the test-file, now that a new key has been added.
2024-11-05 15:53:00 +01:00
Adriaan de Groot
8a095504c4
[libcalamares] Add nested (dotted) key lookup for GS
2024-11-05 14:50:20 +01:00
Adriaan de Groot
16cb360a69
[libcalamares] Don't write out pragmas by hand, use Qt helpers
2024-10-22 21:24:23 +02:00
Adriaan de Groot
206dfce409
[libcalamares] Add an "rwx" mode for permissions (and tests)
2024-10-22 17:35:13 +02:00
Adriaan de Groot
d1dece4473
[libcalamares] Expand file-permissions to allow leading 'o'
2024-10-22 17:31:30 +02:00
Adriaan de Groot
7842d03ef6
[libcalamares] Add an "integer-like" predicate for variants
2024-10-22 17:31:30 +02:00
Adriaan de Groot
e80437c9b9
[libcalamares] Make permissions-parsing public API
2024-09-23 21:53:50 +02:00
Adriaan de Groot
e57aab2008
[libcalamares] Split out file-mode parsing to a separate function
2024-09-11 18:01:26 +02:00
Adriaan de Groot
c51fa0e2f1
[libcalamares] Document the methods of TimeZone
2024-09-06 13:46:09 +02:00
Adriaan de Groot
3e885cda19
[libcalamares] Looks like Qt 6.7 supports Interlingue
2024-07-20 23:35:38 +02:00
Adriaan de Groot
ec5272ad65
[libcalamares] Prepare for ie (Interlingue) support in Qt
2024-07-20 22:32:46 +02:00
Adriaan de Groot
456bb1b3eb
[libcalamares] Mark CommandLine as public, expand API a little
2024-07-07 00:00:11 +02:00
Adriaan de Groot
bbe015e732
[libcalamares] Command verbosity was lost during expansion
2024-06-30 18:05:54 +02:00
Adriaan de Groot
265469c9cd
explain-verbose-test
2024-06-30 17:34:44 +02:00
Adriaan de Groot
e6de798228
[libcalamares] Add a test for command-timeout
2024-06-30 16:08:52 +02:00
Adriaan de Groot
8bb6c63931
[libcalamares] Avoid stray space when logging command-output
2024-06-30 16:08:52 +02:00
Adriaan de Groot
091c00e4ef
[libcalamares] use test to demonstrate verbose CommandLine
2024-06-30 16:08:52 +02:00
Adriaan de Groot
6969a5e01d
[libcalamares] log-as-you-go for verbose commands
2024-06-30 16:08:45 +02:00
Adriaan de Groot
4815bf6963
[libcalamares] Expand runCommand() inline for CommandLine
...
Since we want to hook up more to the runner, the simplified API
in System::runCommand() is not sufficient.
2024-06-30 15:10:05 +02:00
Adriaan de Groot
b0614bb79c
[libcalamares] Add verbosity to CommandLine
...
This is the data structure that stores a single
command for execution by the shell. There is no
back-end implementation for verbosity yet.
2024-05-26 21:32:58 +02:00
Adriaan de Groot
461f011521
[libcalamares] Avoid some undesirable overloads
...
Implicit int -> bool had a comment, which suggests it should just
be deleted from the overload set to avoid possible confusion.
2024-05-14 23:38:05 +02:00
Adriaan de Groot
8a14ddc97c
[shellprocess] Allow gs[key] variables in commands
2024-05-14 23:38:05 +02:00
Adriaan de Groot
4c8e91dc70
[libcalamares] Simplify collecting the maintainers info
2024-04-28 17:38:35 +02:00
Adriaan de Groot
d6c6b7c64b
[libcalamares] Remove the commented-out sponsor info
2024-04-28 17:36:27 +02:00
Adriaan de Groot
35990d9a6b
[libcalamares] Massage size types to avoid conversion warning
2024-04-28 17:01:07 +02:00
Adriaan de Groot
6dc83fb277
[libcalamares] Deal with Qt5/6 differences in count()
2024-04-28 17:01:07 +02:00
Adriaan de Groot
4625208ba2
[libcalamares] Apply newer clang-formatting
2024-04-17 10:50:38 +02:00
Adriaan de Groot
cca2cd3260
[libcalamares] Remove unnecessary QApplication
2024-04-17 10:11:40 +02:00
Adriaan de Groot
370e75fc71
[libcalamares] Repair apidox for Job
2024-04-16 15:41:12 +02:00
Adriaan de Groot
bf09dfc6af
[libcalamares] Suppress sleep / suspend during installation
2024-04-16 15:07:58 +02:00
Adriaan de Groot
fe68b45fc5
[libcalamares] Explain updating-status-text mechanism
2024-04-13 23:37:49 +02:00
Adriaan de Groot
fb83ad326b
[libcalamares] Document recommended translation contexts
...
Jobs have specific contexts for their different strings.
Many jobs (now) misuse prettyName() as a status message,
although the existing fallback mechanism means that the
name gets used as if it is a status message when the job
does not define a description or status.
2024-04-13 23:30:57 +02:00
Adriaan de Groot
14c8893b03
[libcalamares] Turn off Clang 17 warning for MOC
...
The build produces a zillion warnings about unsafe buffer usage
in the code that wrangles metaobjects and slot names. That is
generated code and we can't fix it.
2024-04-02 23:33:21 +02:00
Adriaan de Groot
012138c1f2
[libcalamares] Start with 3.5 TODOs, improve naming
2024-03-03 21:01:01 +01:00
dalto
7fd9d48a20
[calamares] Add python integration type and build type to log
2024-03-02 14:52:16 -06:00
Adriaan de Groot
028e9e68f9
[libcalamares] Add ${LANG} to process expansions
2024-02-26 22:37:20 +01:00
Adriaan de Groot
2697c35fc7
[libcalamares] Run ProcessJobs with CommandLine
...
This makes the behavior of process jobs and shellcommands the same.
2024-02-25 23:22:19 +01:00
Adriaan de Groot
4329b824d4
[libcalamares] Test command-expansion with environment
2024-02-25 23:22:19 +01:00
Adriaan de Groot
0ced01ddc3
[libcalamares] Test environment-setting for CommandLine
2024-02-25 23:22:19 +01:00
Adriaan de Groot
d5555eba32
[libcalamares] Add environment-setting to CommandLine
...
This class is shared -- used by shellprocess and contextualprocess --
to collect the command settings for a single shell invocation.
2024-02-25 23:22:19 +01:00
Adriaan de Groot
6770f781e3
[libcalamares] Tests for new CommandLine constructors
2024-02-25 23:22:19 +01:00
Adriaan de Groot
ae3e609024
[libcalamares] Get default timeout from CommandList
2024-02-25 23:22:19 +01:00
Adriaan de Groot
4aa2c4988c
[libcalamares] Replace factory method with constructor
2024-02-25 23:22:19 +01:00