5032 Commits (eb4ffe737e55240759ff69c2ffb0108bb4a52d47)

Author SHA1 Message Date
Adriaan de Groot caf18321df [users] Adjust UI to is-field-editable based on presets 6 years ago
Adriaan de Groot 7bae625f46 [users] Pick up UI changes based on the values from Config 6 years ago
Adriaan de Groot b4a21d7aca [libcalamares] Add macro CONFIG_PREVENT_EDITING to handle uneditable fields
Boilerplate code for avoiding accidental setting of an internal
field when the UI is editable and the underlying data isn't.
6 years ago
Adriaan de Groot 3ea796d009 [users] 'undo' changes to values if the UI is wonky
- you can still call set*(), eg. from the UI, when the field is
  not editable. Although the code previously ignored the change,
  this would lead to a mismatch between what the UI is showing
  (the changed value) and what the Config has (old value).
  Emit a changed-signal (notify) with the old value so that the
  UI is changed *back* as soon as possible.
6 years ago
Adriaan de Groot 9fcf9b5fa8 [users] Pick up values from Config object on startup
- Previously, we 'knew' that the values in Config were empty,
  so didn't have to set them from the Config when building
  the (widget) page
6 years ago
Adriaan de Groot 941cc9c48b [users] Match presets to the actual name of fields 6 years ago
Adriaan de Groot 2e90a8d829 [libcalamares] Report preset mis-configurations
- warn about fields applied twice (program error)
- warn about fields not used (configuration error)
- add operator<< for "clean" looking preset application
6 years ago
Adriaan de Groot d8dff3dc65 [libcalamares] Replace loadPresets() with an applicative style
Build up the list of known presets by what the Config-object
expects, not by what the Config file provides. This allows
early detection of mis-matched configurations.

Presets can only apply to Q_PROPERTY properties, and the
preset must match the property name.
6 years ago
Adriaan de Groot 448e478b6d [users] Use base Config and its Preset-handling 6 years ago
Adriaan de Groot 381a4f9b53 [users] Add preset to users module Config 6 years ago
Neal Gompa d39f2b8c3e [packages] Drop urpmi support
This code is essentially untested and unused, as OpenMandriva has been
using DNF for three years now.

Reference: https://www.openmandriva.org/en/news/article/switching-to-rpmv4
6 years ago
Adriaan de Groot cb67c79203
Merge pull request #1651 from demmm/calamares
[finishedq] add license for svg file
6 years ago
demmm a7b46a02eb [finishedq] add license for svg file 6 years ago
Adriaan de Groot 98524708cc [partition] Chase namespace change for Units 6 years ago
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.
6 years ago
Adriaan de Groot 430b3b0722 REUSE: tag the schema file (badly, missing an email address) 6 years ago
Adriaan de Groot 44602d0237 [finishedq] CMake: missing keyword 6 years ago
Adriaan de Groot 83e6476be8 [finishedq] Tighten up requirements 6 years ago
Adriaan de Groot e9384deb5d [finishedq] Document the meaningful settings of the config file 6 years ago
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.
6 years ago
Adriaan de Groot aa004503c5 [finished] Expand Config object's repertoire of notification-API 6 years ago
Adriaan de Groot 19874ebc3a [finished] Document doRestart() better
- move all the 'really want restart' logic to restartNowWanted()
6 years ago
Adriaan de Groot f94853eb28 [finishedq] Always restart if possible 6 years ago
Adriaan de Groot 075a28a06d [finished] Log the doRestart() attempt 6 years ago
Adriaan de Groot 0d7c1ec130 [finishedq] Port QML back to using Config object 6 years ago
Adriaan de Groot 5b376b41bf [finishedq] Chase business logic in Config object 6 years ago
Adriaan de Groot 3ad3a9adfc [finished] Move the business logic to the Configt object 6 years ago
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
6 years ago
Adriaan de Groot d3acc39d2d Merge branch 'qml-finished' into calamares 6 years ago
Adriaan de Groot a4682db987 [finished] Tidy up notification-at-end (and allow failed notifications) 6 years ago
Adriaan de Groot 5af614daf7 [finished] Allow positive and negative notifications at end. 6 years ago
Adriaan de Groot ec4b6752d6 [finished] Move notification to Config 6 years ago
Adriaan de Groot 76a2791b12 [finished] Clean up includes 6 years ago
Adriaan de Groot 7d024cf72b [finished] Move restart handling to Config 6 years ago
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.
6 years ago
Adriaan de Groot 288fe5b274 [finished] Rename and document following coding style 6 years ago
Adriaan de Groot 40961f21a7
Merge pull request #1624 from benne-dee/schema-netinstall
[netinstall] Schema for groups in netinstall.schema.yaml
6 years ago
benne-dee f0aa515c8b
[netinstall] Schema validates also groups file 6 years ago
Adriaan de Groot 9c8194402b [keyboard] Add ASCII mapping for Greek
FIXES #1642
6 years ago
Adriaan de Groot 6bf82e9c65 [welcome] Update .conf documentation
- fix typo
- don't suggest google as internetCheckUrl
- mark TODOs for #1384
6 years ago
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.
6 years ago
Adriaan de Groot ca1ae6fd1d [netinstall] Support retranslation in the Config object 6 years ago
Adriaan de Groot 335ccbc149 [netinstall] Move other translation parts to Config 6 years ago
Adriaan de Groot cf7391696e [netinstall] Continue moving settings to the Config object 6 years ago
Chrysostomus 16eff98a06 Don't use f-strings yet. 6 years ago
Chrysostomus 0c92a36a53 Remove unnecessary comment 6 years ago
Chrysostomus 6d55005da0 Mount subvolumes to correct mountpoints 6 years ago
Chrysostomus b16bd6bb23 Fix name error 6 years ago
Chrysostomus 67aedd5582 Move comments closer to where they are used 6 years ago
Chrysostomus 16bf7925a2 Adjust comments 6 years ago
Chrysostomus 1896a38ccc Fix a typo 6 years ago
Chrysostomus 1e0295dc65 Fix name error 6 years ago
Adriaan de Groot 84240683f5 [finished] Apply coding style 6 years ago
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
6 years ago
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.
6 years ago
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.
6 years ago
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)
6 years ago
Adriaan de Groot 17f73b1294 [partition] Test automount job in a queue 6 years ago
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
6 years ago
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
6 years ago
Adriaan de Groot aae815cf3b [partition] Add trivial test for automount management job 6 years ago
Chrysostomus fcf6e2fb25 fix typos 6 years ago
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.
6 years ago
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.
6 years ago
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)
6 years ago
benne-dee f8385d2cb8
Fix https in URL 6 years ago
benne-dee 13181a52ee
Define schema for groups in netinstall.schema.yaml 6 years ago
Chrysostomus 8c0c84f162 Create all fstab entries one way instead of having special handling 6 years ago
benne-dee 938edf5bd6
Create shellprocess.schema.yaml 6 years ago
Chrysostomus 14fbbd92dc Get configured subvolumes from the global storage 6 years ago
Chrysostomus 092374d08c Add modified list to global storage 6 years ago
Chrysostomus f53f43ad03 Remove some unnecessary bits 6 years ago
Chrysostomus 4b6718b354 Further generalize subvolume handling 6 years ago
Chrysostomus 942221c764 Generalize subvolume handling 6 years ago
Chrysostomus 945effb048 Amend subvolumes to include path 6 years ago
Chrysostomus b5cfa5109e Add schema definition 6 years ago
Chrysostomus 4ab30569c2 Add default configuration 6 years ago
Adriaan de Groot c1064c5e08
Merge pull request #1597 from Chrysostomus/btrfs-swap
[fstab][mount] Btrfs swapfile handling
6 years ago
Adriaan de Groot 6978ce3cb4 [partition] Collect more kpmcore 4.2 code 6 years ago
Adriaan de Groot 520f08bbba [partition] Fix build with legacy kpmcore 6 years ago
Adriaan de Groot 31bf38977e [partition] Refactor partition-labeling 6 years ago
Adriaan de Groot 9482935034
Merge pull request #1572 from gportay/partition-output-more-things-in-overiew
[partition] output more things in overiew
6 years ago
Adriaan de Groot 478af25cec
Merge pull request #1571 from gportay/unpackfs-skip-overlay-extended-attributes
[unpackfs] Skip overlay extended attributes
6 years ago
Gaël PORTAY af5c57a713 [partition] Output filesystem features in overview 6 years ago
Gaël PORTAY c045af1975 [partition] Output GPT entries in overview 6 years ago
Gaël PORTAY bf9c9a64f1 [libcalamares] Introduce new function getPartitionTable 6 years ago
Adriaan de Groot c963d8905f [netinstall] Merge the two descriptions of *immutable* 6 years ago
Chrysostomus 271122865f define global storage 6 years ago
Adriaan de Groot 2ccd5a2043 Docs: explain about loadmodule
The Python-specific `testmodule.py` was replaced by the more
general `loadmodule`.

FIXES #1596
6 years ago
Chrysostomus 727f7859b7 Mount @swap to /swap when needed 6 years ago
Chrysostomus b180cbd47d Generate a subvolume for swap if swapfile is used 6 years ago
Chrysostomus 97eb32bf5c Correct the path of swapfile on btrfs 6 years ago
Chrysostomus 80a538665e Generate entry for subvolume @swap 6 years ago
Chrysostomus 3f0612b4ad Use different location for swapfile on btrfs root 6 years ago
Chrysostomus 59cfdcccdf Use variable instead of a function 6 years ago
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 6 years ago
Adriaan de Groot 06c6ea04c0 [users] Make status message consistent (no .) 6 years ago
Calamares CI 3c14d7092a i18n: [dummypythonqt] Automatic merge of Transifex translations 6 years ago
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.
6 years ago
Adriaan de Groot 1f0aec5f87 [dracutlukscfg] Job-internal constant data doesn't need to be a member 6 years ago
Adriaan de Groot d2c7c42aec [dracutlukscfg] More static methods -> free functions 6 years ago
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.
6 years ago
Adriaan de Groot 6df3c023c8 [luksbootkeyfile] Free functions that really are static (TU-local) 6 years ago
Adriaan de Groot b82da569d5 [plasmalnf] Remove unused (widget) files 6 years ago
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`.
6 years ago
Adriaan de Groot ff66eacd0d Merge branch 'issue-1573' into calamares 6 years ago
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).
6 years ago
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.
6 years ago
Adriaan de Groot da4f8fffcf [plasmalnf] Give the theme list plenty of space 6 years ago
Adriaan de Groot cf538fb837 [plasmalnf] Implement a delegate for drawing the list of themes 6 years ago
Adriaan de Groot cc6611bac4 [plasmalnf] Make 'the size of screenshots' available outside ThemeInfo 6 years ago
Adriaan de Groot dac590a094 [plasmalnf] Rip out the intermediate model again, in prep for a delegate 6 years ago
Adriaan de Groot 61a2335909 [users] Stray space in message (reported by Transifex user Moo) 6 years ago
Adriaan de Groot ccfbd6b972
Merge pull request #1566 from Chrysostomus/calamares
Don't use a keyfile for encrypted partitions if /boot in unecrypted
6 years ago
Adriaan de Groot 2a30ae1e25 [unpackfs] Log failure during unpackfs more clearly 6 years ago
Adriaan de Groot 66da5f2fa4 [netinstall] Removing the last package should clear it out.
FIXES #1577
6 years ago
Adriaan de Groot 06cbabd189 [plasmalnf] Simplify (warnings--, debug--) 6 years ago
Adriaan de Groot faa1cb6b65 [plasmalnf] Demand-load image for a theme 6 years ago
Adriaan de Groot 58ea40c14d [plasmalnf] Add a description
- add a role for description
- change view to a table view
6 years ago
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)
6 years ago
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.
6 years ago
Adriaan de Groot 0a88273e0d [plasmalnf] Replace combobox with a view 6 years ago
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.
6 years ago
Adriaan de Groot f93cec031b [plasmalnf] Introduce an index-lookup function
- for signalling model changes, also need to know indexes / row
6 years ago
Adriaan de Groot f9e99da468 [plasmalnf] Improve lnf model
- remove useless widget pointer from themeinfo
- notify when data changes in the model
6 years ago
Adriaan de Groot 1f57a0ddda [plasmalnf] Very basic combo-box based UI 6 years ago
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
6 years ago
Adriaan de Groot d4887426e2 [plasmalnf] Set screenshots on themes, filtering
- while here reorder the config so the effect of *showAll* is clearer
6 years ago
Adriaan de Groot 254933a488 [plasmalnf] Prep-work for loading the themes into the model 6 years ago
Adriaan de Groot 57907ca992 [plasmalnf] Move model to ThemeInfo files 6 years ago
Calamares CI 9bf0a3414f i18n: [dummypythonqt] Automatic merge of Transifex translations 6 years ago
Chrysostomus ff9f47ec83 Fix syntax errors 6 years ago
Chrysostomus 567b01eab0 call function at different scope to avoid name collision 6 years ago
Chrysostomus 09798a2a12 Use free functions (I wish I had known I can do this) 6 years ago
Chrysostomus 8676ce9a20 Simplify the generators 6 years ago
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
6 years ago
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.
6 years ago
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.
6 years ago
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.
6 years ago
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.
6 years ago
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.
6 years ago
Gaël PORTAY 2e6d632c7c [partition] Fix typo 6 years ago
Adriaan de Groot cba2733471 [plasmalnf] Move job creation to config 6 years ago
Adriaan de Groot 0af12546ef [plasmalnf] Migrate more settings to Config 6 years ago
Adriaan de Groot 00293d1111 [plasmalnf] Move the lookandfeeltool path setting to Config 6 years ago
Adriaan de Groot 0f07550006 [plasmalnf] Introduce (empty) Config object 6 years ago
Adriaan de Groot a8359696ca [plasmalnf] Remove unnecessary includes 6 years ago
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
6 years ago
Adriaan de Groot 8f590848bd [plasmalnf] Simplify code
- Look-and-Feel job has no status to speak of
- Coding style
6 years ago
Chrysostomus 543a9e1afc Remove extra static keyword 6 years ago
Adriaan de Groot b503aa645b
Merge pull request #1563 from LordTermor/calamares
[users] Full name transliteration support for user creation
6 years ago
Artem Grinev 16eca3c1be [users] Apply code format 6 years ago
Artem Grinev ca033583a4 Simplified logic a bit, made punctuation handling more correct 6 years ago
Artem Grinev da5fb2d3e1 Improved comment 6 years ago
Artem Grinev d5e678157d Changed TRANSLITERATOR_ID type to array 6 years ago
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
6 years ago
Chrysostomus e3ee3c623d Add some relevant looking stuff to header file 6 years ago
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.
6 years ago
Adriaan de Groot 43565027f5 [users] m_auxerror never set, always nullptr 6 years ago
Adriaan de Groot f3e37f3cee [users] Remove unused PWQuality method 6 years ago
Adriaan de Groot a5dfe7cd68 i18n: update english translations 6 years ago
Adriaan de Groot 4e9c18a565 [users] Translate PWQuality error messages with numbers 6 years ago
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
6 years ago
Chrysostomus adc8d7e624 Fix typo 6 years ago
Adriaan de Groot 3b152ba455 Merge branch 'fix-sudo-settings' into calamares 6 years ago
Adriaan de Groot 43e271dfec [users] Missing negation 6 years ago
Adriaan de Groot 8e53b83f9f [users] Test for setting / resetting sudo settings 6 years ago
Chrysostomus b7cc4860e0 Put the condition on a single line for prettiness sake 6 years ago
Chrysostomus 3731dfb146 Try not to create the keyfile if not necessary 6 years ago
Adriaan de Groot 6f41949bba [users] Log when sudo is skipped 6 years ago
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.
6 years ago
Matti Hyttinen 73b5c62ab8
Update main.py
typo in a comment
6 years ago
Adriaan de Groot afb4e00f92 [keyboard] Pre-select pc105 6 years ago
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.
6 years ago
Chrysostomus 741c1c5d1e Use constructor instead of a loop 6 years ago
Adriaan de Groot 59255c7a57 Changes: apply coding style 6 years ago
Adriaan de Groot be7b63051e Enable keyboard-model and layout-name translations.
SEE #1515
6 years ago
Chrysostomus 26b1c349d3 Set default value inside the relevant function 6 years ago
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.
6 years ago
Adriaan de Groot 83d2c06f68 [keyboard] Apply coding style 6 years ago
Adriaan de Groot 705e6dd8d6 [keyboard] Improve debug-logging for writing etc/default 6 years ago
Adriaan de Groot cbc376a206 [keyboard] Improve debug-logging for writing X11 config 6 years ago
Philip Müller 5191df2bde
Merge pull request #1568 from gportay/partition-fix-typo
[partition] Fix typo
6 years ago
Adriaan de Groot 57da222c72 [keyboard] Improve debug-logging for vconsole-config 6 years ago
Gaël PORTAY e2b00bc517 [partition] Fix typo 6 years ago
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 "//", "/../", "/./", ...).
6 years ago
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.
6 years ago
Adriaan de Groot 3e51d77782 [keyboard] Check for successful file-write 6 years ago
Adriaan de Groot 2c297a068f [partition] Log when an EFI problem has been solved 6 years ago
Adriaan de Groot 0f38ee624e [partition] static-assert that our shortcut makes sense 6 years ago
Artem Grinev 94f7efb89f [users] Remove ' from transliterated string 6 years ago
Artem Grinev f20d0a7593 [users] Name cleanup after transliteration 6 years ago
Artem Grinev aa5ef7a6b8 [users] New transliterator ID 6 years ago
Adriaan de Groot 15ace5202d [partition] Simplify EFI-flags checking with KPMCore 4 6 years ago
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.
6 years ago
Adriaan de Groot 949e33f1e8 [partition] Massage logging while checking for EFI boot 6 years ago
Adriaan de Groot 63964de4bd [partition] Explain underlying type for flags variant 6 years ago
Adriaan de Groot 87c77d9807 [partition] When flags are explicitly invalid, return early 6 years ago
Adriaan de Groot 356e13ae93 [partition] Improve logging readability 6 years ago
Chrysostomus fe291bc51a Write the crypttab entry still 6 years ago
Chrysostomus 9f52282e4c Don't use keyfile if there /boot is unencrypted 6 years ago
Chrysostomus 3eae98eac3 Don't enable grub password query if /boot is on unencrypted partition 6 years ago
Adriaan de Groot 72c9df67d2
Merge pull request #1565 from Chrysostomus/calamares
[initcpiocfg] Use graphical decryption prompt with plymouth
6 years ago
Adriaan de Groot f898840e16 [users] Expand schema to cover new possibilities 6 years ago
Chrysostomus 84558333bf Regular plymouth hook is also still needed 6 years ago
Chrysostomus 3bf57c7785 Use graphical decryption prompt with plymouth as adviced here: https://wiki.archlinux.org/index.php/plymouth#The_plymouth_hook 6 years ago
Adriaan de Groot 36f9fd56a3 [users] Expand the example config with new possibilities 6 years ago
Adriaan de Groot 7c268b2e4d [users] Correct terminology in configuration documentation 6 years ago
Adriaan de Groot 2516f18d1b
Merge pull request #1560 from gportay/partition-mount-make-mountPoint-and-filesystem-optionals
[partition,mount] Make mountPoint and filesystem optionals
6 years ago
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.
6 years ago
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.
6 years ago
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.
6 years ago
Artem Grinev c85d1ae1fe Explanation why ICU is needed for usersq module 6 years ago
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
6 years ago
Gaël PORTAY 6013ed52f8 [partition] Ignore unformatted filesystem 6 years ago
Gaël PORTAY db08d2db8b [partition] Make filesystem optional and default to unformatted 6 years ago
Gaël PORTAY 163351a803 [mount] Ignore empty or unformatted filesystems 6 years ago
Gaël PORTAY c6feedf923 [mount] Ignore empty mountpoints 6 years ago
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'.
6 years ago
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.
6 years ago
Adriaan de Groot 486cdaeeb6 [users] Shuffle library order to satisfy CI build 6 years ago
Adriaan de Groot 2bd3f1d8c1 Merge branch 'issue-1523' into calamares 6 years ago
Adriaan de Groot b61b5f8650 [users] Run an expected-to-fail test in creating groups 6 years ago
Adriaan de Groot 8127ae704c [users] Expand tests for groups a little 6 years ago
Adriaan de Groot e66f81f6ee CMake: comment on BUILD_AS_TEST 6 years ago
Adriaan de Groot 10991346b7
Merge pull request #1561 from gportay/partition-set-swap-partition-name
[partition] Allow a configurable swap Partition name
6 years ago
Adriaan de Groot 7578768c46
Merge pull request #1562 from gportay/partition-group-efi-things-together
[partition] Group EFI things together
6 years ago
Artem Grinev 4e54a2aefe [users] Cleaned error handling a bit 6 years ago
Artem Grinev 8e07bb00f9 [users] Construct icu::UnicodeString from QString's utf16 chars directly 6 years ago
Artem Grinev 48eae463cc [users] Full name transliteration support for user creation 6 years ago
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.
6 years ago
Adriaan de Groot 4746754344 [keyboard] Translate layouts as well 6 years ago
Adriaan de Groot 6863db0dc1 [keyboard] Use the translations if they were loaded 6 years ago
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
6 years ago
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.
6 years ago
Adriaan de Groot d26fde6647 [partition] Reduce warnings
- Add a helper header that munges the warnings-settings so that
  KPMcore headers can be included.
6 years ago
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;
6 years ago
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.
6 years ago
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
6 years ago
Gaël PORTAY 3967cfe0eb [partition] Group EFI things together 6 years ago
Gaël PORTAY a1d45122eb [partition] Update partition.conf 6 years ago
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.
6 years ago
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.
6 years ago
Adriaan de Groot 71e0081fce [keyboard] SPDX-tagging 6 years ago
Adriaan de Groot 89a180ee58 [keyboard] Initial support for translated keyboard names 6 years ago
Gaël PORTAY f03ae06deb [partition] Rename execute to createPartitions 6 years ago
Gaël PORTAY f2bfe2bd6a [partition] Fix coding style 6 years ago
Gaël PORTAY cd725fbb4b Fix missing SPDX-FileCopyrightText in header 6 years ago
Gaël PORTAY 2007335865 [partition] Rename the KPMCore Partition local to part 6 years ago
Gaël PORTAY 32c1f81fbf [partition] Rename iterator in for loop to entry 6 years ago