From 65e0740c495946a343223a84714f91b57f580901 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 13 Nov 2023 21:57:45 +0100 Subject: [PATCH 1/7] Changes: post-release housekeeping --- CHANGES-3.3 | 10 ++++++++++ CMakeLists.txt | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGES-3.3 b/CHANGES-3.3 index f39c6bda8..2e3911b32 100644 --- a/CHANGES-3.3 +++ b/CHANGES-3.3 @@ -8,6 +8,16 @@ changelog -- this log starts with version 3.3.0. See CHANGES-3.2 for the history of the 3.2 series (2018-05 - 2022-08). +# 3.3.0 (unreleased) + +This release contains contributions from (alphabetically by first name): + - Nobody, yet + +## Core ## + +## Modules ## + + # 3.3.0-alpha5 (2023-11-13) This release contains contributions from (alphabetically by first name): diff --git a/CMakeLists.txt b/CMakeLists.txt index c3285897e..589b134a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,8 +47,8 @@ cmake_minimum_required(VERSION 3.16 FATAL_ERROR) -set(CALAMARES_VERSION 3.3.0-alpha5) -set(CALAMARES_RELEASE_MODE ON) # Set to ON during a release +set(CALAMARES_VERSION 3.3.0) +set(CALAMARES_RELEASE_MODE OFF) # Set to ON during a release if(CMAKE_SCRIPT_MODE_FILE) include(${CMAKE_CURRENT_LIST_DIR}/CMakeModules/ExtendedVersion.cmake) From 8868ae956ac2c620082d6fae7ac251c92ce91c9a Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 14 Nov 2023 13:50:08 +0100 Subject: [PATCH 2/7] [partition] Repair comparison --- src/modules/partition/Config.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/partition/Config.cpp b/src/modules/partition/Config.cpp index b1230e32b..2010fecdd 100644 --- a/src/modules/partition/Config.cpp +++ b/src/modules/partition/Config.cpp @@ -320,7 +320,7 @@ fillGSConfigurationEFI( Calamares::GlobalStorage* gs, const QVariantMap& configu Calamares::Partition::PartitionSize part_size = Calamares::Partition::PartitionSize( efiMinimumSize ); if ( part_size.isValid() ) { - if ( part_size > PartUtils::efiFilesystemRecommendedSize() ) + if ( part_size.toBytes() > PartUtils::efiFilesystemRecommendedSize() ) { cWarning() << "EFI minimum size" << efiMinimumSize << "is larger than the recommended size" << efiRecommendedSize << ", ignored."; From de85a02f747983fdd496e66fe0cc5d4491e3ebc0 Mon Sep 17 00:00:00 2001 From: demmm Date: Wed, 15 Nov 2023 14:19:15 +0100 Subject: [PATCH 3/7] [partition] make the tests also build with Qt6 --- src/modules/partition/tests/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/partition/tests/CMakeLists.txt b/src/modules/partition/tests/CMakeLists.txt index 17b79265f..1cb4ff7a1 100644 --- a/src/modules/partition/tests/CMakeLists.txt +++ b/src/modules/partition/tests/CMakeLists.txt @@ -3,12 +3,12 @@ # SPDX-FileCopyrightText: 2020 Adriaan de Groot # SPDX-License-Identifier: BSD-2-Clause # -find_package(Qt5 COMPONENTS Gui REQUIRED) +find_package(${qtname} COMPONENTS Gui REQUIRED) set(PartitionModule_SOURCE_DIR ..) include_directories( - ${Qt5Gui_INCLUDE_DIRS} + ${${qtname}Gui_INCLUDE_DIRS} ${PartitionModule_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} From 51a1d06c5179022e3927f50cb141a2bd82495fa1 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 16 Nov 2023 22:54:17 +0100 Subject: [PATCH 4/7] Changes: pre-release housekeeping --- CHANGES-3.3 | 10 ++++++++++ CMakeLists.txt | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGES-3.3 b/CHANGES-3.3 index 2e3911b32..815ef893f 100644 --- a/CHANGES-3.3 +++ b/CHANGES-3.3 @@ -18,6 +18,16 @@ This release contains contributions from (alphabetically by first name): ## Modules ## +# 3.3.0-alpha6 (2023-11-16) + +This release contains contributions from (alphabetically by first name): + - Adriaan de Groot + - Anke Boersma + + This is a hotfix release because -alpha5 didn't compile, + and Anke repaired the partition unit-tests when building with Qt6. + + # 3.3.0-alpha5 (2023-11-13) This release contains contributions from (alphabetically by first name): diff --git a/CMakeLists.txt b/CMakeLists.txt index 589b134a5..b7af98fed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,8 +47,8 @@ cmake_minimum_required(VERSION 3.16 FATAL_ERROR) -set(CALAMARES_VERSION 3.3.0) -set(CALAMARES_RELEASE_MODE OFF) # Set to ON during a release +set(CALAMARES_VERSION 3.3.0-alpha6) +set(CALAMARES_RELEASE_MODE ON) # Set to ON during a release if(CMAKE_SCRIPT_MODE_FILE) include(${CMAKE_CURRENT_LIST_DIR}/CMakeModules/ExtendedVersion.cmake) From 8305b6cb1a5417f794d9a59f1c230725d8227436 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 16 Nov 2023 23:10:53 +0100 Subject: [PATCH 5/7] [dummypython] Demonstrator for #2237 --- src/modules/dummypython/main.py | 13 +++++++++++++ src/modules/dummypython/tests/1.global | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 src/modules/dummypython/tests/1.global diff --git a/src/modules/dummypython/main.py b/src/modules/dummypython/main.py index 0dbbd8934..65621dd1d 100644 --- a/src/modules/dummypython/main.py +++ b/src/modules/dummypython/main.py @@ -58,6 +58,19 @@ def run(): for k in libcalamares.globalstorage.keys(): libcalamares.utils.debug(f" {k}={libcalamares.globalstorage.value(k)}") + libcalamares.utils.debug("*** GLOBAL STORAGE BOGUS KEYS ***") + # + # This is a demonstration of issue #2237, load this module + # with the dummypython/tests/1.global configuration, e.g. + # ./loadmodule -g ../src/modules/dummypython/tests/1.global dummypython + # in the build directory. + # + for k in ("nonexistent", "empty", "numeric", "boolvalue"): + if libcalamares.globalstorage.value(k) is None: + libcalamares.utils.debug(f"NONE {k}={libcalamares.globalstorage.value(k)}") + else: + libcalamares.utils.debug(f" {k}={libcalamares.globalstorage.value(k)}") + libcalamares.utils.debug("*** GLOBAL STORAGE MODIFICATION ***") libcalamares.globalstorage.insert("item2", "value2") libcalamares.globalstorage.insert("item3", 3) diff --git a/src/modules/dummypython/tests/1.global b/src/modules/dummypython/tests/1.global new file mode 100644 index 000000000..d0d194e6b --- /dev/null +++ b/src/modules/dummypython/tests/1.global @@ -0,0 +1,6 @@ +# SPDX-FileCopyrightText: no +# SPDX-License-Identifier: CC0-1.0 +--- +firmwareType: bios +bootLoader: grub +empty: From 146f5495522f1cfde45766d0ff127619b707d92a Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 16 Nov 2023 23:16:41 +0100 Subject: [PATCH 6/7] [libcalamares] Return None for empty GS keys All unknown-variants return None, but this only happens in practice with an empty variant (e.g. a configuration key that is empty in the YAML). FIXES #2237 --- src/libcalamares/python/Api.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcalamares/python/Api.cpp b/src/libcalamares/python/Api.cpp index 077677911..bc5b05381 100644 --- a/src/libcalamares/python/Api.cpp +++ b/src/libcalamares/python/Api.cpp @@ -95,7 +95,7 @@ variantToPyObject( const QVariant& variant ) case QVariant::Invalid: #endif default: - return py::object(); + return py::none(); } #ifdef __clang__ #pragma clang diagnostic pop From 5f06b321b2072792d656e7ae5a7533a80019cfc2 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 16 Nov 2023 23:23:58 +0100 Subject: [PATCH 7/7] CMake: correct copy-paste-o for destination of config files --- CMakeModules/CalamaresAddModuleSubdirectory.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeModules/CalamaresAddModuleSubdirectory.cmake b/CMakeModules/CalamaresAddModuleSubdirectory.cmake index 61f3a1154..964dac02b 100644 --- a/CMakeModules/CalamaresAddModuleSubdirectory.cmake +++ b/CMakeModules/CalamaresAddModuleSubdirectory.cmake @@ -170,7 +170,7 @@ function( _calamares_add_module_subdirectory_impl ) if (INSTALL_CONFIG) message(" ${Green}CONFIGURATION_FILES:${ColorReset} ${MODULE_CONFIG_FILES} => [Build directory and ${MODULE_DATA_DESTINATION}]") foreach(_cf ${MODULE_CONFIG_FILES}) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${_cf} DESTINATION ${MODULE_DESTINATION}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SUBDIRECTORY}/${_cf} DESTINATION ${MODULE_DATA_DESTINATION}) endforeach() else() message(" ${Green}CONFIGURATION_FILES:${ColorReset} ${MODULE_CONFIG_FILES} => [Build directory only]")