From 8949b079e1d88ecfeddc420a17b63140ae2ba01a Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 2 Apr 2021 13:11:16 +0200 Subject: [PATCH 1/6] [users] Fix autologin-setting from config file SEE #1668 --- src/modules/users/Config.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/modules/users/Config.cpp b/src/modules/users/Config.cpp index be87ad93b..2954b0381 100644 --- a/src/modules/users/Config.cpp +++ b/src/modules/users/Config.cpp @@ -820,7 +820,19 @@ Config::setConfigurationMap( const QVariantMap& configurationMap ) m_hostNameActions = getHostNameActions( configurationMap ); setConfigurationDefaultGroups( configurationMap, m_defaultGroups ); - m_doAutoLogin = CalamaresUtils::getBool( configurationMap, "doAutoLogin", false ); + + // Renaming of Autologin -> AutoLogin in 4ffa79d4cf also affected + // configuration keys, which was not intended. Accept both. + const auto oldKey = QStringLiteral( "doAutologin" ); + const auto newKey = QStringLiteral( "doAutoLogin" ); + if ( configurationMap.contains( oldKey ) ) + { + m_doAutoLogin = CalamaresUtils::getBool( configurationMap, oldKey, false ); + } + else + { + m_doAutoLogin = CalamaresUtils::getBool( configurationMap, newKey, false ); + } m_writeRootPassword = CalamaresUtils::getBool( configurationMap, "setRootPassword", true ); Calamares::JobQueue::instance()->globalStorage()->insert( "setRootPassword", m_writeRootPassword ); From e7b39303e4880408e8ae9f219023d5bc9be9378f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 2 Apr 2021 13:13:36 +0200 Subject: [PATCH 2/6] Changes: pre-release housekeeping --- CHANGES | 7 +++++++ CMakeLists.txt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index a62ff0f19..50eb23f8e 100644 --- a/CHANGES +++ b/CHANGES @@ -19,6 +19,13 @@ This release contains contributions from (alphabetically by first name): - No module changes yet +# 3.2.39.2 (2021-04-02) # + +This is **another** hotfix release for issues around autologin .. +autoLogin, really, since the whole problem is that internal capitalization +changed. (Reported by pcrepix, #1668) + + # 3.2.39.1 (2021-03-30) # This hotfix release corrects a regression in the *displaymanager* diff --git a/CMakeLists.txt b/CMakeLists.txt index db098644d..92ea86845 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ # TODO:3.3: Require CMake 3.12 cmake_minimum_required( VERSION 3.3 FATAL_ERROR ) project( CALAMARES - VERSION 3.2.39.1 + VERSION 3.2.39.2 LANGUAGES C CXX ) From b191f39bdf6085a83896d132d6a6af5ca0f386d2 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 2 Apr 2021 15:38:41 +0200 Subject: [PATCH 3/6] [keyboard] Simplify config-loading The machinery in `setConfigurationMap()` was just duplicating checks already in place in the `getString()` and `getBool()` methods, and there's no special need for efficiency here, so prefer the more readable and short code. ("efficiency" here means "we're saving one method call in case the configuration is not set") --- src/modules/keyboard/Config.cpp | 35 ++++++--------------------------- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index a2f200a52..5140021ef 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -528,37 +528,14 @@ Config::setConfigurationMap( const QVariantMap& configurationMap ) { using namespace CalamaresUtils; - if ( configurationMap.contains( "xOrgConfFileName" ) - && configurationMap.value( "xOrgConfFileName" ).type() == QVariant::String - && !getString( configurationMap, "xOrgConfFileName" ).isEmpty() ) + const auto xorgConfDefault = QStringLiteral( "00-keyboard.conf" ); + m_xOrgConfFileName = getString( configurationMap, "xOrgConfFileName", xorgConfDefault ); + if ( m_xOrgConfFileName.isEmpty() ) { - m_xOrgConfFileName = getString( configurationMap, "xOrgConfFileName" ); - } - else - { - m_xOrgConfFileName = "00-keyboard.conf"; - } - - if ( configurationMap.contains( "convertedKeymapPath" ) - && configurationMap.value( "convertedKeymapPath" ).type() == QVariant::String - && !getString( configurationMap, "convertedKeymapPath" ).isEmpty() ) - { - m_convertedKeymapPath = getString( configurationMap, "convertedKeymapPath" ); - } - else - { - m_convertedKeymapPath = QString(); - } - - if ( configurationMap.contains( "writeEtcDefaultKeyboard" ) - && configurationMap.value( "writeEtcDefaultKeyboard" ).type() == QVariant::Bool ) - { - m_writeEtcDefaultKeyboard = getBool( configurationMap, "writeEtcDefaultKeyboard", true ); - } - else - { - m_writeEtcDefaultKeyboard = true; + m_xOrgConfFileName = xorgConfDefault; } + m_convertedKeymapPath = getString( configurationMap, "convertedKeymapPath" ); + m_writeEtcDefaultKeyboard = getBool( configurationMap, "writeEtcDefaultKeyboard", true ); } void From 18b805d43f4bd1a48a22bc6d87a932035b0e3343 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 2 Apr 2021 15:51:24 +0200 Subject: [PATCH 4/6] [keyboard] Set initial values for model, layout, variant When loading the lists, no initial string-value was being set for the model, layout and variant; the configuration could pass right through and pick up empty strings instead. If the user does not change the model, the UI would show "pc105" but the internal setting would still be empty. FIXES #1668 --- src/modules/keyboard/Config.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/keyboard/Config.cpp b/src/modules/keyboard/Config.cpp index 5140021ef..d286e26fd 100644 --- a/src/modules/keyboard/Config.cpp +++ b/src/modules/keyboard/Config.cpp @@ -210,6 +210,10 @@ Config::Config( QObject* parent ) m_setxkbmapTimer.start( QApplication::keyboardInputInterval() ); emit prettyStatusChanged(); } ); + + m_selectedModel = m_keyboardModelsModel->key( m_keyboardModelsModel->currentIndex() ); + m_selectedLayout = m_keyboardLayoutsModel->item( m_keyboardLayoutsModel->currentIndex() ).first; + m_selectedVariant = m_keyboardVariantsModel->key( m_keyboardVariantsModel->currentIndex() ); } KeyboardModelsModel* From 21f52f9dc19a9df5f8ff6805231d71373e8266b4 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 2 Apr 2021 15:56:42 +0200 Subject: [PATCH 5/6] [calamares] Remove overly-spaced debug (SubEntry does the right thing) --- src/calamares/CalamaresApplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calamares/CalamaresApplication.cpp b/src/calamares/CalamaresApplication.cpp index 164b3ed5c..88d2e9a85 100644 --- a/src/calamares/CalamaresApplication.cpp +++ b/src/calamares/CalamaresApplication.cpp @@ -68,7 +68,7 @@ CalamaresApplication::init() Logger::setupLogfile(); cDebug() << "Calamares version:" << CALAMARES_VERSION; cDebug() << Logger::SubEntry - << " languages:" << QString( CALAMARES_TRANSLATION_LANGUAGES ).replace( ";", ", " ); + << "languages:" << QString( CALAMARES_TRANSLATION_LANGUAGES ).replace( ";", ", " ); if ( !Calamares::Settings::instance() ) { From 8a413866a1c8c77bc2f737dd1e06e4b6c4cd75cc Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 2 Apr 2021 16:05:26 +0200 Subject: [PATCH 6/6] [calamares] Make --version print extended versioning information --- src/calamares/CalamaresApplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calamares/CalamaresApplication.cpp b/src/calamares/CalamaresApplication.cpp index 164b3ed5c..d9645db5e 100644 --- a/src/calamares/CalamaresApplication.cpp +++ b/src/calamares/CalamaresApplication.cpp @@ -10,7 +10,7 @@ #include "CalamaresApplication.h" #include "CalamaresConfig.h" -#include "CalamaresVersion.h" +#include "CalamaresVersionX.h" #include "CalamaresWindow.h" #include "progresstree/ProgressTreeView.h"