Adriaan de Groot
6ede9f2c7c
[libcalamares] Test QFileInfo::dir() for completeness
2020-02-07 16:08:38 +01:00
Adriaan de Groot
e65969d587
[libcalamares] Re-do createTargetDirs()
...
- Drop the basedirs idea, replace return with just bool
- Use QDir::mkpath, with some extra validation
- Test it a bit
2020-02-07 15:51:46 +01:00
Adriaan de Groot
8b8ecf7b7b
[libcalamars] Improve test init and cleanup
...
- Test createTargetFile and removeTargetFile
- Clean up afterwards
- Ensure /tmp is the RMP for each test
2020-02-07 15:23:02 +01:00
Adriaan de Groot
b502d78984
[libcalamares] Fix warning message
...
- "create" was when this function was used elsewhere
2020-02-07 13:58:44 +01:00
Adriaan de Groot
394eee3954
[libcalamares] Test more targetPath() scenario's
2020-02-07 13:57:14 +01:00
Adriaan de Groot
8d23e665ea
[libcalamares] Fix targetPath() tests
...
- there is less simplification done than you might think
2020-02-07 13:53:49 +01:00
Adriaan de Groot
daa5b804b3
[libcalamares] Split paths-tests into own test executable
...
- Since these tests all want a system object, and a GS
with a sensible setup, give them one with its own initTestCase().
This could have been done with one executable, running tests from
multiple classes, but there's not much overall benefit there.
2020-02-07 13:49:06 +01:00
Adriaan de Groot
31878dd43b
[libcalamares] Avoid double / between root and path in targetPath()
2020-02-07 13:29:35 +01:00
Adriaan de Groot
15bca702c1
[libcalamares] Add tests for path functions (part 1)
2020-02-07 11:51:13 +01:00
Adriaan de Groot
95936549e2
[libcalamares] Add a createTargetBasedirs()
...
- Used to ensure that the directories leading up to a given path
exist. Implementation is incomplete and broken for now.
- While here, avoid removing an empty pathname in removeTargetFile()
(the empty pathname indicates a broken configuration).
2020-02-07 11:30:37 +01:00
Adriaan de Groot
4af68365c9
[machineid] Remove obsolete implementation
2020-02-07 11:16:40 +01:00
Adriaan de Groot
bf882cec1d
[machineid] Migrate removeFile() to libcalamares
...
- Becomes removeTargetFile()
2020-02-07 11:16:01 +01:00
Adriaan de Groot
9ef04192db
[libcalamares] Simplify returns in targetPath()
2020-02-07 11:03:40 +01:00
Philip Müller
97ddd30af4
[machineid] folder needs to be created when not exists
...
- See #1314
2020-02-07 10:46:26 +01:00
Philip Müller
72d742e2f4
[machineid] Use same approach as we do in Manjaro
...
- See also https://gitlab.manjaro.org/applications/calamares/commit/da8f45ae
- Fixes #1314
2020-02-07 10:34:01 +01:00
Philip Müller
c766a0f10f
[machineid] create dbus var-lib folder when not existing
...
See also #1314
2020-02-07 10:26:36 +01:00
Adriaan de Groot
dec30d70fd
CI: tidy up scripts
...
- Add SPDX headers
- Indent consistently (tabs, not a mix of 2-space, 4-space, and tabs)
The scripts were originally added without a license header.
Since they are simple, and re-usable, and not particularly
interesting, I've made the license explicitly 2-clause BSD.
This is unlike the rest of Calamares, which is GPLv3+; the
build system and support scripts are not the software itself.
2020-02-06 13:11:23 +01:00
Adriaan de Groot
0d2425ca78
CI: make shell-scripts tab-indented by default
2020-02-06 13:01:55 +01:00
Adriaan de Groot
44489d3d7b
CI: tidy up license header in txcheck.sh
2020-02-06 12:51:06 +01:00
Adriaan de Groot
b8505dc621
CI: tidy up txcheck.sh
...
- Add license header with SPDX info
- Add usage header
- Support --help
- Document internals a little more
2020-02-06 12:45:40 +01:00
Adriaan de Groot
53b6113c75
[welcome] Fix QML tests
2020-02-05 18:38:46 +01:00
Adriaan de Groot
eaea262449
Merge branch 'master' into qml
2020-02-05 18:03:31 +01:00
Adriaan de Groot
5d25719918
Merge branch 'translation-debugging'
...
Better support for ad-hoc translation loading. Use -T to load
local translations independent of the -d flag.
2020-02-05 17:52:19 +01:00
Adriaan de Groot
4b3f7eb209
[calamares] Local translations can be a separate setting
...
- Don't stick this in Settings, though, it becomes overly complicated.
2020-02-05 17:48:39 +01:00
Adriaan de Groot
24c2c435a0
[libcalamares] Try repairing tests
...
- Fail on FreeBSD with an instant timeout
2020-02-05 17:08:47 +01:00
Adriaan de Groot
4525060c26
[calamares] Refactor Settings initialization
...
- add a Settings::init() to do actual work
- remove the same kind of code from CalamaresApplication
- make constructor of Settings private
- initialize settings before the application
2020-02-05 16:48:49 +01:00
Adriaan de Groot
68e8b0695d
[calamares] Make declaration order match calling order
2020-02-05 16:14:56 +01:00
Adriaan de Groot
db80a34aca
[calamares] Remove intermediate debug-settings
...
- There's a multi-stage setup for debug-mode, where the application
object also knows that debugging is set. Remove it.
- Break debug mode (because now the settings don't get debug-mode set).
- Refactor so that parameter handing is only done if this Calamares
is the unique (first) Calamares.
2020-02-05 16:10:41 +01:00
Adriaan de Groot
50b6801d35
[calamares] Install translator after loading settings
...
- means that also the *initial* translation can take settings
into account, like -d loading local translations.
2020-02-05 14:33:42 +01:00
Adriaan de Groot
f233cac7a1
[calamares] Refactor debug-logging settings
2020-02-05 14:23:55 +01:00
Adriaan de Groot
ea8adc3de7
[calamares] Simplify return from main
2020-02-05 14:04:52 +01:00
Adriaan de Groot
af862336a8
[calamares] Initialize settings before QML
2020-02-05 13:50:18 +01:00
Adriaan de Groot
91625c8ba8
[libcalamares] Tidy up boolean options in Settings
...
- The const getters for a single boolean value have moved
to the header, for inlining.
- Document the getters and what their settings mean.
2020-02-05 13:35:26 +01:00
Adriaan de Groot
21aec96e2e
Changes: document new language, random
2020-02-04 22:24:22 +01:00
Calamares CI
f45ed644d9
i18n: [python] Automatic merge of Transifex translations
2020-02-04 22:19:48 +01:00
Calamares CI
8c0ef5798d
i18n: [dummypythonqt] Automatic merge of Transifex translations
2020-02-04 22:19:48 +01:00
Calamares CI
2088261ac6
i18n: [desktop] Automatic merge of Transifex translations
2020-02-04 22:19:47 +01:00
Calamares CI
1b3797b414
i18n: [calamares] Automatic merge of Transifex translations
2020-02-04 22:19:47 +01:00
Adriaan de Groot
d956c79291
[libcalamares] Load translations from more places
...
- To support translation testing, without needing to recompile
Calamares, load files from the local directory when debugging,
or from /usr/share/calamares/lang/ in general.
- This allows updating translations and testing them with just
lrelease (a translation build tool) installed, without rebuilding
Calamares.
- This allows distro's to ship updated or modified translations without
rebuilding Calamares.
2020-01-30 19:06:33 +01:00
Adriaan de Groot
f1d7b29f11
Merge branch 'issue-1254'
2020-01-30 10:34:14 +01:00
Adriaan de Groot
02e5e0de5e
[users] Use entropy service.
...
FIXES #1254
2020-01-30 10:32:34 +01:00
Adriaan de Groot
5b987d4f33
[machineid] Use entropy service
...
- Most of the code was error-checking, just replace the open-read
with a call to the service instead.
- It's not an error if /dev/urandom doesn't exist in the source system
(there may be other good random sources, and otherwise we have the
low-quality random fallback).
2020-01-30 10:32:27 +01:00
Adriaan de Groot
c971127b17
[machineid] Fix entropy-file return
...
- If the file was created and written, it would drop out of the
if() and return an error anyway.
2020-01-30 10:08:55 +01:00
Adriaan de Groot
e56948cefa
[libcalamares] Fix tests (cell is the lower unicode byte)
2020-01-29 16:41:17 +01:00
Adriaan de Groot
be0831ee11
[libcalamares] Add printable-entropy (e.g. for password salt)
2020-01-29 16:39:25 +01:00
Adriaan de Groot
8947f9c00c
[libcalamares] Test the Entropy service
2020-01-29 16:16:12 +01:00
Adriaan de Groot
a574b43eb8
[libcalamares] Also report empty buffer as no-entropy
2020-01-29 16:08:33 +01:00
Adriaan de Groot
842a90e026
[libcalamares] Add an Entropy service for getting random data
...
- Tries to get the "best" random data
- Reports the quality of the random data it got
2020-01-29 16:03:50 +01:00
Adriaan de Groot
445eb1f640
Changes: post-release housekeeping
2020-01-29 11:42:22 +01:00
Adriaan de Groot
252ce70203
i18n: updated (English) source files
2020-01-29 11:42:04 +01:00