diff options
author | Oliver Smith <ollieparanoid@postmarketos.org> | 2021-06-11 00:01:06 +0200 |
---|---|---|
committer | Bart Ribbers <bribbers@disroot.org> | 2021-06-11 12:35:14 +0000 |
commit | d02076e9047a026a6a9f76f9fda7d2032246322f (patch) | |
tree | 61511b4f4bcdbd631921262aa5597aefc112d240 | |
parent | 431a6c24a1f2ac44500987c306964704c7078d0e (diff) |
community/calamares-extensions: upgrade to 1.1.2
Removed patches are merged and part of the release.
6 files changed, 3 insertions, 479 deletions
diff --git a/community/calamares-extensions/0001-mobile-add-option-builtinVirtualKeyboard.patch b/community/calamares-extensions/0001-mobile-add-option-builtinVirtualKeyboard.patch deleted file mode 100644 index 9de374dc1be..00000000000 --- a/community/calamares-extensions/0001-mobile-add-option-builtinVirtualKeyboard.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 2bf5706f73b06ce89a85aa37dcd0e9ded8d59c03 Mon Sep 17 00:00:00 2001 -From: Oliver Smith <ollieparanoid@postmarketos.org> -Date: Sun, 2 May 2021 13:20:46 +0200 -Subject: [PATCH] [mobile] add option builtinVirtualKeyboard - -Allow to always hide the built-in qtvirtualkeyboard to support using a -different keyboard. - -Related: https://gitlab.com/postmarketOS/postmarketos-ondev/-/issues/47 ---- - modules/mobile/Config.cpp | 2 ++ - modules/mobile/Config.h | 9 +++++++++ - modules/mobile/mobile.conf | 4 ++++ - modules/mobile/mobile.qml | 1 + - 4 files changed, 16 insertions(+) - -diff --git a/modules/mobile/Config.cpp b/modules/mobile/Config.cpp -index 772f8d4..e6078b7 100644 ---- a/modules/mobile/Config.cpp -+++ b/modules/mobile/Config.cpp -@@ -26,6 +26,8 @@ Config::setConfigurationMap( const QVariantMap& cfgMap ) - m_version = getString( cfgMap, "version", "(unknown)" ); - m_username = getString( cfgMap, "username", "user" ); - -+ m_builtinVirtualKeyboard = getBool( cfgMap, "builtinVirtualKeyboard", true ); -+ - m_featureSshd = getBool( cfgMap, "featureSshd", true ); - m_featureFsType = getBool( cfgMap, "featureFsType", false ); - -diff --git a/modules/mobile/Config.h b/modules/mobile/Config.h -index ea304ec..5c39c77 100644 ---- a/modules/mobile/Config.h -+++ b/modules/mobile/Config.h -@@ -10,6 +10,9 @@ - class Config : public QObject - { - Q_OBJECT -+ /* installer UI */ -+ Q_PROPERTY( bool builtinVirtualKeyboard READ builtinVirtualKeyboard CONSTANT FINAL ) -+ - /* welcome */ - Q_PROPERTY( QString osName READ osName CONSTANT FINAL ) - Q_PROPERTY( QString arch READ arch CONSTANT FINAL ) -@@ -58,6 +61,9 @@ public: - void setConfigurationMap( const QVariantMap& ); - Calamares::JobList createJobs(); - -+ /* installer UI */ -+ bool builtinVirtualKeyboard() { return m_builtinVirtualKeyboard; } -+ - /* welcome */ - QString osName() const { return m_osName; } - QString arch() const { return m_arch; } -@@ -117,6 +123,9 @@ public: - QString cmdSshdUseradd() const { return m_cmdSshdUseradd; } - - private: -+ /* installer UI */ -+ bool m_builtinVirtualKeyboard; -+ - /* welcome */ - QString m_osName; - QString m_arch; -diff --git a/modules/mobile/mobile.conf b/modules/mobile/mobile.conf -index dbae56c..7b9dbd5 100644 ---- a/modules/mobile/mobile.conf -+++ b/modules/mobile/mobile.conf -@@ -64,6 +64,10 @@ - ## this gets used without asking the user. - # defaultFs: ext4 - -+## Start Qt's virtual keyboard within the mobile module. Disable if you bring -+## your own virtual keyboard (e.g. svkbd). -+# builtinVirtualKeyboard: true -+ - ####### - ### Commands running in the installer OS - ####### -diff --git a/modules/mobile/mobile.qml b/modules/mobile/mobile.qml -index 8411a39..3821345 100644 ---- a/modules/mobile/mobile.qml -+++ b/modules/mobile/mobile.qml -@@ -142,6 +142,7 @@ Page - InputPanel { - id: inputPanel - y: Qt.inputMethod.visible ? parent.height - inputPanel.height : parent.height -+ visible: config.builtinVirtualKeyboard - anchors.left: parent.left - anchors.right: parent.right - } --- -2.26.3 - diff --git a/community/calamares-extensions/0002-mobile-rename-default_pin-user_pass.patch b/community/calamares-extensions/0002-mobile-rename-default_pin-user_pass.patch deleted file mode 100644 index 0b090a94a71..00000000000 --- a/community/calamares-extensions/0002-mobile-rename-default_pin-user_pass.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 3eb3e9c98da6d431e3b38d82f9601db7deb8b2a5 Mon Sep 17 00:00:00 2001 -From: Oliver Smith <ollieparanoid@postmarketos.org> -Date: Sun, 2 May 2021 14:56:58 +0200 -Subject: [PATCH] [mobile] rename default_pin -> user_pass - -Prepare to add a config option to allow non-numeric passwords, by giving -the existing default_pin screen the more generic name user_pass. -Adjust the title of the screen too. - -"default" in the file name was referring to configuring the default -user's PIN/password as opposed to the SSH user. However, I think -replacing it with "user" makes it more intuitive. ---- - modules/mobile/mobile.qml | 10 +++++----- - modules/mobile/mobile.qrc | 2 +- - .../mobile/{default_pin.qml => user_pass.qml} | 16 ++++++++-------- - 3 files changed, 14 insertions(+), 14 deletions(-) - rename modules/mobile/{default_pin.qml => user_pass.qml} (85%) - -diff --git a/modules/mobile/mobile.qml b/modules/mobile/mobile.qml -index 3821345..6977061 100644 ---- a/modules/mobile/mobile.qml -+++ b/modules/mobile/mobile.qml -@@ -19,7 +19,7 @@ Page - "welcome": null, /* titlebar disabled */ - "install_target": "Installation target", - "install_target_confirm": "Warning", -- "default_pin": "Lockscreen PIN", -+ "user_pass": "User password", - "ssh_confirm": "SSH server", - "ssh_credentials": "SSH credentials", - "fs_selection": "Root filesystem", -@@ -33,8 +33,8 @@ Page - "screens": ["welcome"]}, - {"name": "installTarget", - "screens": ["install_target", "install_target_confirm"]}, -- {"name": "userPin", -- "screens": ["default_pin"]}, -+ {"name": "userPassword", -+ "screens": ["user_pass"]}, - {"name": "sshd", - "screens": ["ssh_confirm", "ssh_credentials"]}, - {"name": "fsType", -@@ -46,7 +46,7 @@ Page - ] - property var featureIdByScreen: (function() { - /* Put "features" above into an index of screen name -> feature id: -- * featureIdByScreen = {"welcome": 0, "default_pin": 1, ...} */ -+ * featureIdByScreen = {"welcome": 0, "user_pass": 1, ...} */ - var ret = {}; - for (var i=0; i<features.length; i++) { - for (var j=0; j<features[i]["screens"].length; j++) { -@@ -253,7 +253,7 @@ Page - return true; - } - -- /* Input validation: user-screens (default_pin, ssh_credentials) */ -+ /* Input validation: user-screens (user_pass, ssh_credentials) */ - function validatePin(userPin, userPinRepeat, errorText) { - var pin = userPin.text; - var repeat = userPinRepeat.text; -diff --git a/modules/mobile/mobile.qrc b/modules/mobile/mobile.qrc -index a35eed6..27e592a 100644 ---- a/modules/mobile/mobile.qrc -+++ b/modules/mobile/mobile.qrc -@@ -7,7 +7,7 @@ - <file>install_target.qml</file> <!-- install from external to internal? --> - <file>install_target_confirm.qml</file> <!-- overwrite internal storage? --> - -- <file>default_pin.qml</file> <!-- default user: pin --> -+ <file>user_pass.qml</file> <!-- default user: password --> - <file>ssh_confirm.qml</file> <!-- sshd: enable or not? --> - <file>ssh_credentials.qml</file> <!-- sshd user: username, password --> - <file>fs_selection.qml</file> <!-- filesystem selection --> -diff --git a/modules/mobile/default_pin.qml b/modules/mobile/user_pass.qml -similarity index 85% -rename from modules/mobile/default_pin.qml -rename to modules/mobile/user_pass.qml -index f8e8487..a6bfba0 100644 ---- a/modules/mobile/default_pin.qml -+++ b/modules/mobile/user_pass.qml -@@ -33,11 +33,11 @@ Item { - } - - TextField { -- id: userPin -+ id: userPass - anchors.top: description.bottom - placeholderText: qsTr("PIN") - echoMode: TextInput.Password -- onTextChanged: validatePin(userPin, userPinRepeat, errorText) -+ onTextChanged: validatePin(userPass, userPassRepeat, errorText) - text: config.userPassword - - /* Let the virtual keyboard change to digits only */ -@@ -54,12 +54,12 @@ Item { - } - - TextField { -- id: userPinRepeat -- anchors.top: userPin.bottom -+ id: userPassRepeat -+ anchors.top: userPass.bottom - placeholderText: qsTr("PIN (repeat)") - inputMethodHints: Qt.ImhDigitsOnly - echoMode: TextInput.Password -- onTextChanged: validatePin(userPin, userPinRepeat, errorText) -+ onTextChanged: validatePin(userPass, userPassRepeat, errorText) - text: config.userPassword - - anchors.horizontalCenter: parent.horizontalCenter -@@ -68,7 +68,7 @@ Item { - } - - Text { -- anchors.top: userPinRepeat.bottom -+ anchors.top: userPassRepeat.bottom - id: errorText - visible: false - wrapMode: Text.WordWrap -@@ -86,8 +86,8 @@ Item { - - text: qsTr("Continue") - onClicked: { -- if (validatePin(userPin, userPinRepeat, errorText)) { -- config.userPassword = userPin.text; -+ if (validatePin(userPass, userPassRepeat, errorText)) { -+ config.userPassword = userPass.text; - navNext(); - } - } --- -2.26.3 - diff --git a/community/calamares-extensions/0003-mobile-add-option-userPasswordNumeric.patch b/community/calamares-extensions/0003-mobile-add-option-userPasswordNumeric.patch deleted file mode 100644 index f632803b6d6..00000000000 --- a/community/calamares-extensions/0003-mobile-add-option-userPasswordNumeric.patch +++ /dev/null @@ -1,154 +0,0 @@ -From e71eb01feb4d169719470d0551d5ccd6d616e43b Mon Sep 17 00:00:00 2001 -From: Oliver Smith <ollieparanoid@postmarketos.org> -Date: Sun, 2 May 2021 14:38:00 +0200 -Subject: [PATCH] [mobile] add option userPasswordNumeric - -Related: https://gitlab.com/postmarketOS/postmarketos-ondev/-/issues/46 ---- - modules/mobile/Config.cpp | 1 + - modules/mobile/Config.h | 3 +++ - modules/mobile/mobile.conf | 4 ++++ - modules/mobile/user_pass.qml | 39 +++++++++++++++++++++++++++--------- - 4 files changed, 37 insertions(+), 10 deletions(-) - -diff --git a/modules/mobile/Config.cpp b/modules/mobile/Config.cpp -index e6078b7..c2683e1 100644 ---- a/modules/mobile/Config.cpp -+++ b/modules/mobile/Config.cpp -@@ -25,6 +25,7 @@ Config::setConfigurationMap( const QVariantMap& cfgMap ) - m_userInterface = getString( cfgMap, "userInterface", "(unknown)" ); - m_version = getString( cfgMap, "version", "(unknown)" ); - m_username = getString( cfgMap, "username", "user" ); -+ m_userPasswordNumeric = getBool( cfgMap, "userPasswordNumeric", true ); - - m_builtinVirtualKeyboard = getBool( cfgMap, "builtinVirtualKeyboard", true ); - -diff --git a/modules/mobile/Config.h b/modules/mobile/Config.h -index 5c39c77..5dc2ca4 100644 ---- a/modules/mobile/Config.h -+++ b/modules/mobile/Config.h -@@ -23,6 +23,7 @@ class Config : public QObject - /* default user */ - Q_PROPERTY( QString username READ username CONSTANT FINAL ) - Q_PROPERTY( QString userPassword READ userPassword WRITE setUserPassword NOTIFY userPasswordChanged ) -+ Q_PROPERTY( bool userPasswordNumeric READ userPasswordNumeric CONSTANT FINAL ) - - /* ssh server + credentials */ - Q_PROPERTY( bool featureSshd READ featureSshd CONSTANT FINAL ) -@@ -75,6 +76,7 @@ public: - QString username() const { return m_username; } - QString userPassword() const { return m_userPassword; } - void setUserPassword( const QString& userPassword ); -+ bool userPasswordNumeric() const { return m_userPasswordNumeric; } - - /* ssh server + credetials */ - bool featureSshd() { return m_featureSshd; } -@@ -136,6 +138,7 @@ private: - /* default user */ - QString m_username; - QString m_userPassword; -+ bool m_userPasswordNumeric; - - /* ssh server + credetials */ - bool m_featureSshd; -diff --git a/modules/mobile/mobile.conf b/modules/mobile/mobile.conf -index 7b9dbd5..59424fb 100644 ---- a/modules/mobile/mobile.conf -+++ b/modules/mobile/mobile.conf -@@ -11,6 +11,10 @@ - ## User Interface name (e.g. Plasma Mobile) - # userInterface: "(unknown)" - -+## User Interface assumes that the password is numeric (as of writing, this is -+## the case with Plasma Mobile and Phosh) -+# userPasswordNumeric: true -+ - ## OS version - # version: "(unknown)" - -diff --git a/modules/mobile/user_pass.qml b/modules/mobile/user_pass.qml -index a6bfba0..366fda3 100644 ---- a/modules/mobile/user_pass.qml -+++ b/modules/mobile/user_pass.qml -@@ -12,6 +12,17 @@ import QtQuick.Window 2.3 - import QtQuick.VirtualKeyboard 2.1 - - Item { -+ property var placeholder: (config.userPasswordNumeric -+ ? "PIN" -+ : "Password") -+ property var hints: (config.userPasswordNumeric -+ ? Qt.ImhDigitsOnly -+ : Qt.ImhPreferLowercase) -+ property var validateFunc: (config.userPasswordNumeric -+ ? validatePin -+ : validatePassword); -+ -+ - anchors.left: parent.left - anchors.top: parent.top - anchors.right: parent.right -@@ -25,9 +36,17 @@ Item { - anchors.topMargin: 30 - wrapMode: Text.WordWrap - -- text: "Set the numeric password of your user. The lockscreen will" + -- " ask for this PIN. This is <i>not</i> the PIN of your SIM" + -- " card. Make sure to remember it." -+ text: (function() { -+ if (config.userPasswordNumeric) { -+ return "Set the numeric password of your user. The" + -+ " lockscreen will ask for this PIN. This is" + -+ " <i>not</i> the PIN of your SIM card. Make sure to" + -+ " remember it."; -+ } else { -+ return "Set the password of your user. The lockscreen will" + -+ " ask for this password. Make sure to remember it."; -+ } -+ }()) - - width: 500 - } -@@ -35,13 +54,13 @@ Item { - TextField { - id: userPass - anchors.top: description.bottom -- placeholderText: qsTr("PIN") -+ placeholderText: qsTr(placeholder) - echoMode: TextInput.Password -- onTextChanged: validatePin(userPass, userPassRepeat, errorText) -+ onTextChanged: validateFunc(userPass, userPassRepeat, errorText) - text: config.userPassword - - /* Let the virtual keyboard change to digits only */ -- inputMethodHints: Qt.ImhDigitsOnly -+ inputMethodHints: hints - onActiveFocusChanged: { - if(activeFocus) { - Qt.inputMethod.update(Qt.ImQueryInput) -@@ -56,10 +75,10 @@ Item { - TextField { - id: userPassRepeat - anchors.top: userPass.bottom -- placeholderText: qsTr("PIN (repeat)") -- inputMethodHints: Qt.ImhDigitsOnly -+ placeholderText: qsTr(placeholder + " (repeat)") -+ inputMethodHints: hints - echoMode: TextInput.Password -- onTextChanged: validatePin(userPass, userPassRepeat, errorText) -+ onTextChanged: validateFunc(userPass, userPassRepeat, errorText) - text: config.userPassword - - anchors.horizontalCenter: parent.horizontalCenter -@@ -86,7 +105,7 @@ Item { - - text: qsTr("Continue") - onClicked: { -- if (validatePin(userPass, userPassRepeat, errorText)) { -+ if (validateFunc(userPass, userPassRepeat, errorText)) { - config.userPassword = userPass.text; - navNext(); - } --- -2.26.3 - diff --git a/community/calamares-extensions/0004-mobile-tweak-invalid-chars-msg-related-comments.patch b/community/calamares-extensions/0004-mobile-tweak-invalid-chars-msg-related-comments.patch deleted file mode 100644 index a7ecd185563..00000000000 --- a/community/calamares-extensions/0004-mobile-tweak-invalid-chars-msg-related-comments.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 85586293c8a79884f1b61a2aa2873e9a914adf4f Mon Sep 17 00:00:00 2001 -From: Oliver Smith <ollieparanoid@postmarketos.org> -Date: Sun, 2 May 2021 15:45:12 +0200 -Subject: [PATCH] [mobile] tweak invalid chars msg/related comments - -Change "cannot be typed in at boot time" to "can possibly not be typed -in after installation" and explain that the same check is now used for -the user password too. ---- - modules/mobile/mobile.qml | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -diff --git a/modules/mobile/mobile.qml b/modules/mobile/mobile.qml -index 6977061..3397263 100644 ---- a/modules/mobile/mobile.qml -+++ b/modules/mobile/mobile.qml -@@ -55,8 +55,8 @@ Page - } - return ret; - }()) -- /* Only allow characters, that can be typed in with the initramfs on-screen keyboard -- * (osk-sdl: see src/keyboard.cpp). FIXME: make configurable, but keep this as default? */ -+ /* Only allow characters, that can be typed in with osk-sdl -+ * (src/keyboard.cpp). Details in big comment in validatePassword(). */ - property var allowed_chars: - /* layer 0 */ "abcdefghijklmnopqrstuvwxyz" + - /* layer 1 */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + -@@ -389,11 +389,21 @@ Page - if (pass == "") - return validationFailure(errorText); - -+ /* This function gets called for the FDE password and for the user -+ * password. As of writing, all distributions shipping the mobile -+ * module are using osk-sdl to type in the FDE password after the -+ * installation, and another keyboard after booting up, to type in the -+ * user password. The osk-sdl password has the same keys as -+ * squeekboard's default layout, and other keyboards should be able to -+ * type these characters in as well. For now, verify that the password -+ * only contains characters that can be typed in by osk-sdl. If you -+ * need this to be more sophisticated, feel free to submit patches to -+ * make this more configurable. */ - if (!check_chars(pass)) - return validationFailure(errorText, - "The password must only contain" + -- " these characters, others cannot be" + -- " typed in at boot time:\n" + -+ " these characters, others can possibly" + -+ " not be typed in after installation:\n" + - "\n" + - allowed_chars_multiline()); - --- -2.26.3 - diff --git a/community/calamares-extensions/0005-mobile-navNextFeature-fix-skipping-1-feature.patch b/community/calamares-extensions/0005-mobile-navNextFeature-fix-skipping-1-feature.patch deleted file mode 100644 index def333a05ba..00000000000 --- a/community/calamares-extensions/0005-mobile-navNextFeature-fix-skipping-1-feature.patch +++ /dev/null @@ -1,31 +0,0 @@ -From bcacab531f57b701053629b72b96b1ecf1e2336d Mon Sep 17 00:00:00 2001 -From: Oliver Smith <ollieparanoid@postmarketos.org> -Date: Sun, 2 May 2021 17:19:11 +0200 -Subject: [PATCH] [mobile] navNextFeature: fix skipping > 1 feature - -Fix the condition in the while loop, so that it can actually continue -with the "continue" keyword. Without this patch, having the sshd -feature disabled would result in the fsType feature getting displayed, -even if it was disabled. ---- - modules/mobile/mobile.qml | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/modules/mobile/mobile.qml b/modules/mobile/mobile.qml -index 3397263..0343884 100644 ---- a/modules/mobile/mobile.qml -+++ b/modules/mobile/mobile.qml -@@ -208,7 +208,9 @@ Page - id += 1; - continue; - } -- } while(false); -+ -+ break; -+ } while (id < features.length); - - console.log("Navigating to feature: " + features[id]["name"]); - return navTo(features[id]["screens"][0]); --- -2.26.3 - diff --git a/community/calamares-extensions/APKBUILD b/community/calamares-extensions/APKBUILD index 14c0c4ea6ab..710fd344817 100644 --- a/community/calamares-extensions/APKBUILD +++ b/community/calamares-extensions/APKBUILD @@ -3,8 +3,8 @@ # Do not change arch to noarch, until this bug is resolved: # https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10022 pkgname=calamares-extensions -pkgver=1.1.1 -pkgrel=1 +pkgver=1.1.2 +pkgrel=0 # armhf blocked by qt5-qtdeclarative # ppc64le, s390x and mips64 blocked by calamares arch="all !armhf !ppc64le !s390x !mips64" @@ -19,11 +19,6 @@ makedepends=" # Patches from: https://github.com/calamares/calamares-extensions/pull/14 # Needed by postmarketos-ondev 0.5.0 source="https://github.com/calamares/calamares-extensions/releases/download/v$pkgver/calamares-extensions-$pkgver.tar.gz - 0001-mobile-add-option-builtinVirtualKeyboard.patch - 0002-mobile-rename-default_pin-user_pass.patch - 0003-mobile-add-option-userPasswordNumeric.patch - 0004-mobile-tweak-invalid-chars-msg-related-comments.patch - 0005-mobile-navNextFeature-fix-skipping-1-feature.patch " options="!check" # has no tests @@ -115,10 +110,5 @@ package() { } sha512sums=" -319ce29a809f7d21b6ae56577899949a5e6625612e36bc727c734d00de837be8ee6cebd2bd3ec4ea5f1e0faf300e674516d10a52d0747629ba0202e2e19f356b calamares-extensions-1.1.1.tar.gz -6f5de42ba2e287a558368d427fb1981cdd7e26399005400b75d68de682c3ad0c9e502b402ec0b4e8936cae730191538c1c7742b44dde7de85a49b132236144a0 0001-mobile-add-option-builtinVirtualKeyboard.patch -22a0d67322c9f4a4b45e51f1eb693b223e141a77fea215148bae7b62932648187f37b25ef0f3396a790cd0aeedd59f73706a079067b45f1b4232d4092a158cf1 0002-mobile-rename-default_pin-user_pass.patch -d898c1992e4aee60f8a348d1f7b65a48c10694021417c656479b4a1899729006072319964ab7db6ce5e2f5bad98fb64f431a762390a2aa6d77cadfedac08de46 0003-mobile-add-option-userPasswordNumeric.patch -b6e45e9c32b9efbaf2f48ec8eb87768898a1b6314f99cbce84d3bfca5cf5c579b8642b916bd2f1ad259c3629dca958c8950fe30eaa1f77c7ba027fa7b5890c5e 0004-mobile-tweak-invalid-chars-msg-related-comments.patch -7b8cd7296a7222dfe79808345182de3a4bf4ec6c879aa802da884f1e05424dca077c39167776de383ee469679abc2b2897f877baf9ad26a4dfba1caa988f9e37 0005-mobile-navNextFeature-fix-skipping-1-feature.patch +d1820e94c5a7036003216d12f77a63fbffb6a73bc6c0a0cdf7b8c2be9a80bc9ee2a9f952fe9f1e84f6b22756a3f48e00b3ce7eb56b9abfe014786181f99b4138 calamares-extensions-1.1.2.tar.gz " |