diff --git a/CHANGES-3.3 b/CHANGES-3.3 index 1dd35691fd..0c682c5bf6 100644 --- a/CHANGES-3.3 +++ b/CHANGES-3.3 @@ -9,13 +9,18 @@ the history of the 3.2 series (2018-05 - 2022-08). # 3.3.9 (unreleased) +Please note that if you are using the *luksbootkeyfile* module, +it must be placed before the *fstab* module in settings.conf. If it comes +after, then the keyfile will be missing from crypttab and the user will be +asked for their password multiple times. + This release contains contributions from (alphabetically by first name): - - You could be the one! + - Evan James ## Core ## ## Modules ## - + - Placed *luksbootkeyfile* before *fstab* in the example settings.conf # 3.3.8 (2024-07-02) diff --git a/CMakeLists.txt b/CMakeLists.txt index 97e3ad66a6..b83ea559bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,7 @@ # - SCHEMA_TESTING (requires Python, see ci/configvalidator.py) # - TESTING (standard CMake option) # DEBUG_ : special developer flags for debugging. +# PYTHONLIBS_VERSION : if set on the command-line, use a specific Python version # # Example usage: # @@ -101,6 +102,14 @@ option(BUILD_CRASH_REPORTING "Enable crash reporting with KCrash." ON) # - DEBUG_PARTITION_UNSAFE (see partition/CMakeLists.txt) # - DEBUG_PARTITION_BAIL_OUT (see partition/CMakeLists.txt) +# Special handling for Python versions: +# - If you set PYTHONLIBS_VERSION on the command-line, then +# that **exact** version will be searched for, and no other. +# - If you do not set PYTHONLIBS_VERSION on the command-line, +# any suitable version will be found -- but this can fail if +# you have multiple Python versions installed, only some of +# which include the development headers. + ### USE_* # # By convention, when there are multiple modules that implement similar @@ -176,9 +185,9 @@ set( _tx_incomplete bqi es_PR gu ie ja-Hira kk kn lo lv mk ne_NP # ci/abicheck.sh). if(NOT WITH_QT6) find_package(Qt5Core QUIET) - if (NOT TARGET Qt5::Core) + if(NOT TARGET Qt5::Core) find_package(Qt6Core QUIET) - if (TARGET Qt6::Core) + if(TARGET Qt6::Core) message(STATUS "Default Qt version (Qt5) not found, upgrading build to Qt6") set(WITH_QT6 ON) endif() @@ -209,7 +218,12 @@ else() endif() set(BOOSTPYTHON_VERSION 1.72.0) -set(PYTHONLIBS_VERSION 3.6) +if(DEFINED PYTHONLIBS_VERSION) + set(PYTHONLIBS_EXTRA "EXACT") +else() + set(PYTHONLIBS_VERSION 3.6) + set(PYTHONLIBS_EXTRA "") +endif() set(YAMLCPP_VERSION 0.5.1) ### CMAKE SETUP @@ -217,23 +231,15 @@ set(YAMLCPP_VERSION 0.5.1) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules") # Enable IN_LIST -if(POLICY CMP0057) - cmake_policy(SET CMP0057 NEW) -endif() +cmake_policy(SET CMP0057 NEW) # Let ``AUTOMOC`` and ``AUTOUIC`` process ``GENERATED`` files. -if(POLICY CMP0071) - cmake_policy(SET CMP0071 NEW) -endif() +cmake_policy(SET CMP0071 NEW) # Recognize more macros to trigger automoc -if(NOT CMAKE_VERSION VERSION_LESS "3.10.0") - list( - APPEND - CMAKE_AUTOMOC_MACRO_NAMES +list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "K_PLUGIN_FACTORY_WITH_JSON" "K_EXPORT_PLASMA_DATAENGINE_WITH_JSON" "K_EXPORT_PLASMA_RUNNER" - ) -endif() +) # CMake Modules include(CMakePackageConfigHelpers) @@ -421,7 +427,7 @@ if(NOT TARGET ${kfname}::Crash) set(BUILD_CRASH_REPORTING OFF) endif() -find_package(Python ${PYTHONLIBS_VERSION} COMPONENTS Interpreter Development) +find_package(Python ${PYTHONLIBS_VERSION} ${PYTHONLIBS_EXTRA} COMPONENTS Interpreter Development) set_package_properties( Python PROPERTIES @@ -727,7 +733,7 @@ add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_D # The module support files -- .desc files, .conf files -- are copied into the build # directory so that it is possible to run `calamares -d` from there. Copy the # top-level settings.conf as well, into the build directory. -if( settings.conf IS_NEWER_THAN ${CMAKE_BINARY_DIR}/settings.conf ) +if(settings.conf IS_NEWER_THAN ${CMAKE_BINARY_DIR}/settings.conf) configure_file(settings.conf ${CMAKE_BINARY_DIR}/settings.conf COPYONLY) endif() diff --git a/CMakeModules/KPMcoreHelper.cmake b/CMakeModules/KPMcoreHelper.cmake index 36172e85be..888b4aea4b 100644 --- a/CMakeModules/KPMcoreHelper.cmake +++ b/CMakeModules/KPMcoreHelper.cmake @@ -15,7 +15,7 @@ if(NOT TARGET calapmcore) find_package(${kfname}I18n CONFIG) find_package(${kfname}WidgetsAddons CONFIG) - if( WITH_QT6) + if(WITH_QT6) find_package(KPMcore 24.01.75) else() find_package(KPMcore 20.04.0) diff --git a/settings.conf b/settings.conf index f4cbd05ca7..d0e0860008 100644 --- a/settings.conf +++ b/settings.conf @@ -132,13 +132,13 @@ sequence: - mount - unpackfs - machineid - - fstab - locale - keyboard - localecfg # - luksbootkeyfile # - luksopenswaphookcfg # - dracutlukscfg + - fstab # - plymouthcfg # - zfshostid - initcpiocfg diff --git a/src/libcalamares/locale/Tests.cpp b/src/libcalamares/locale/Tests.cpp index 812f53d061..45e9fc0942 100644 --- a/src/libcalamares/locale/Tests.cpp +++ b/src/libcalamares/locale/Tests.cpp @@ -122,9 +122,15 @@ LocaleTests::testEsperanto() void LocaleTests::testInterlingue() { +#if CALAMARES_QT_SUPPORT_INTERLINGUE + // ie was fixed in version ... of Qt + QCOMPARE( QLocale( "ie" ).language(), QLocale::Interlingue ); + QCOMPARE( QLocale( QLocale::Interlingue ).language(), QLocale::Interlingue ); +#else // ie / Interlingue is borked (is "ie" even the right name?) QCOMPARE( QLocale( "ie" ).language(), QLocale::C ); QCOMPARE( QLocale( QLocale::Interlingue ).language(), QLocale::English ); +#endif // "ia" exists (post-war variant of Interlingue) QCOMPARE( QLocale( "ia" ).language(), QLocale::Interlingua ); diff --git a/src/libcalamares/locale/Translation.cpp b/src/libcalamares/locale/Translation.cpp index 49e4c05d23..0a73127047 100644 --- a/src/libcalamares/locale/Translation.cpp +++ b/src/libcalamares/locale/Translation.cpp @@ -94,11 +94,11 @@ static constexpr const TranslationSpecialCase special_cases[] = { QLocale::Script::AnyScript, QLocale::Country::AnyCountry, nullptr }, - // Interlingue is mapped to interlingu*a* because + // Interlingue is mapped to interlingu*a* (up until Qt version ...) because // the real Language::Interlingue acts like C locale. { "ie", nullptr, - QLocale::Language::Interlingua, + CALAMARES_QT_SUPPORT_INTERLINGUE ? QLocale::Language::Interlingue : QLocale::Language::Interlingua, QLocale::Script::AnyScript, QLocale::Country::AnyCountry, "Interlingue" }, diff --git a/src/libcalamares/locale/Translation.h b/src/libcalamares/locale/Translation.h index cec70f5257..3483a1ca2c 100644 --- a/src/libcalamares/locale/Translation.h +++ b/src/libcalamares/locale/Translation.h @@ -18,6 +18,13 @@ #include #include +///@brief Define to 1 if the Qt version being used supports Interlingue fully +#if QT_VERSION < QT_VERSION_CHECK( 6, 7, 0 ) +#define CALAMARES_QT_SUPPORT_INTERLINGUE 0 +#else +#define CALAMARES_QT_SUPPORT_INTERLINGUE 1 +#endif + namespace Calamares { namespace Locale @@ -35,6 +42,8 @@ namespace Locale * Serbian written with Latin characters (not Cyrillic). * - `ca@valencia` is the Catalan dialect spoken in Valencia. * There is no Qt code for it. + * + * (There are more special cases, not documented here) */ class DLLEXPORT Translation : public QObject { diff --git a/src/modules/initcpiocfg/initcpiocfg.schema.yaml b/src/modules/initcpiocfg/initcpiocfg.schema.yaml index b504410f15..2728f0d648 100644 --- a/src/modules/initcpiocfg/initcpiocfg.schema.yaml +++ b/src/modules/initcpiocfg/initcpiocfg.schema.yaml @@ -12,7 +12,7 @@ properties: type: object additionalProperties: false properties: - prepend: { type: array, items: string } - append: { type: array, items: string } - remove: { type: array, items: string } + prepend: { type: array, items: { type: string } } + append: { type: array, items: { type: string } } + remove: { type: array, items: { type: string } } source: { type: string } diff --git a/src/modules/netinstall/netinstall.schema.yaml b/src/modules/netinstall/netinstall.schema.yaml index 1c1c987fc6..400f25f703 100644 --- a/src/modules/netinstall/netinstall.schema.yaml +++ b/src/modules/netinstall/netinstall.schema.yaml @@ -7,7 +7,6 @@ $schema: https://json-schema.org/draft-07/schema# $id: https://calamares.io/schemas/netinstall definitions: package: - $id: 'definitions/package' oneOf: - type: string @@ -21,7 +20,6 @@ definitions: name: { type: string } description: { type: string } group: - $id: 'definitions/group' type: object description: Longer discussion in `netinstall.conf` file under 'Groups Format' properties: @@ -57,9 +55,7 @@ definitions: maxItems: 0 then: required: [name, description, packages] # bottom-most (sub)group requires some package (otherwise, why bother?) - # This should validate `netinstall.yaml` also. groups: - $id: 'definitions/groups' type: array items: { $ref: '#/definitions/group' }