-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
calamares: 3.3.13 -> 3.4.0, qt6-ize, clean up #430636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Probably happened due to copy/paste mistake or something
[kaos branding] Fix broken link
Create a new module and branding targeted at the smartphone and tablet use case. The installation process is significantly different from your typical PC install: * The UI must fit mobile screens, the amount of inputs visible on one screen must be reduced. * Every input must be controllable with an on screen keyboard. * Full disk encryption is done with GRUB in Calamares, but mobile devices use other bootloaders (u-boot, lk). * Complex partitioning screens are not useful for most users, as the expectation is not that multiple OS can be installed next to each other. It would be nice if the regular Calamares modules worked with mobile devices eventually. But this can't be done in one step (and before that, the QML <> QWidgets related refactoring should probably be completed?), therefore let's add it to calamares-extensions first. This initial version is far from perfect, but what is there works reliably. It should give a good shared base to iterate upon. Implemented screens: * Welcome * Lockscreen PIN Set the user password, but as numeric PIN. Because that is what the current generation of mobile friendly Linux DEs expects (Plasma Mobile and Phosh). * SSH server: enable or disable To debug Linux distributions on phones, SSH is essential. Give advanced users the opportunity to enable it and casual users the option to skip this. * Credentials for SSH server The SSH server has a dedicated user account with a stronger password. Users are encouraged to replace password auth with SSH key auth after the installation. * Full disk encryption: enable or disable * Full disk encryption password Screenshots: https://postmarketos.org/blog/2020/07/15/pinephone-ce-preorder/#installer-with-optional-ssh-server-and-encryption There is no partitioning screen. The target partition, which will be formatted and optionally encrypted is defined in mobile.conf as targetDeviceRoot. It is expected that the installer OS will use this to install to an empty partition on the same medium as the installer (SD card or eMMC) as explained here: https://wiki.postmarketos.org/wiki/On-device_installer I ended up throwing everything into one module instead of several, because of a Qt Virtual Keyboard bug: https://gitlab.com/postmarketOS/postmarketos-ondev/-/issues/18 Based on, but adjusted to be distro-agnostic: https://gitlab.com/postmarketOS/postmarketos-ondev/-/releases/0.2.1
[mobile] add mobile friendly module and branding
Find yamlcpp, even if it is named libyaml-cpp.so (with a dash) as it is the case in Alpine Linux.
[mobile] use SPDX-FileCopyrightText
CMakeLists: add find_package YAMLCPP
Depending on compiler version and Qt version, this may or may not compile; typical errors look like this: /usr/include/qt5/QtCore/qlist.h:471:35: error: use of deleted function 'QPair<const QStringList, const QString>& QPair<const QStringList, const QString>::operator=(const QPair<const QStringList, const QString>&)' 471 | else *reinterpret_cast<T*>(n) = t; | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/qt5/QtCore/qpair.h:49:8: note: 'QPair<const QStringList, const QString>& QPair<const QStringList, const QString>::operator=(const QPair<const QStringList, const QString>&)' is implicitly deleted because the default definition would be ill-formed: 49 | struct QPair | ^~~~~
There's no need to name calamaresui -- viewmodules get that automatically -- and if it *did* need to be named, it would be Calamares::calamaresui
Organize the screens into features and replace all navTo() calls with hardcoded screen names with new navNext() and navNextFeature() functions.
Skip whole features if a featureSshd (example for feature "sshd") or smilar config key exists and is set to false.
Add featureSshd config key to hide related UI screens and skip related logic in UsersJob.
[mobile] make sshd feature optional and related navigation refactoring
Fix a typo and make the "booleans we don't read from QML don't need a signal" message generic with one example, but not with a listing of all these booleans. Then we won't need to adjust this comment with each new one.
Rename "enableButton" to "firstButton" and "welcomeText" to "mainText".
Don't create the user's job in MobileQmlViewStep::onLeave() anymore. Instead, have Config::createJobs() and call that from MobileQmlViewStep::jobs(), as suggested by Adriaan, and that's also how it's done in the keyboard module in calamares.git. This allows getting rid of m_jobs, and makes it less awkward to pass parameters to the job. Related: calamares/calamares-extensions#6 (comment)
- remove inline comments from upstream, link to upstream files instead - remove settings that match upstream defaults - reformat
There's really no chance of 1GB of RAM being able to eval a NixOS config.
OK, so the portal trick doesn't actually work on GNOME, but I think we can combine the sudo trick with the portal trick to get a combined good trick. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Only thing not working now is keyboard changes on plasma6, but that's a harder issue to solve and probably needs better upstream support.
- locale1 doesn't work because
Failed to set keymap: Changing system settings via systemd is not supported on NixOS.
- calamares kwin doesn't work because the kwin keyboard apply function checks root dirs (
/root/.config
) (and regardless~/.config/kxkbrc
doesn't exist by default)
We should probably make the systemd side checks smarter for this, to be honest. |
The icons are a qtsvg bug, there should be a fix in 6.9.2. The unfree page I rewrote entirely, it can definitely be made to look nicer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as we don't think those icons are a problem, LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hate the browser pkexec
thing but otherwise this seems good.
This PR causes the size of the nixpkgs tarball to grow by 10MB.
In particular, it's commit 917eb19 that does so. |
It's the assets, presumably. We might want to JPEG those. |
TODO:
TODO (later):
Things done
passthru.tests
.nixpkgs-review
on this PR. See nixpkgs-review usage../result/bin/
.Add a 👍 reaction to pull requests you find important.