Skip to content

Commit

Permalink
Merge branch '_calamares'
Browse files Browse the repository at this point in the history
  • Loading branch information
pvshvp-oss committed Jul 23, 2024
2 parents a7b2361 + 8f9c26e commit 1de731d
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 30 deletions.
9 changes: 7 additions & 2 deletions CHANGES-3.3
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
40 changes: 23 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
# - SCHEMA_TESTING (requires Python, see ci/configvalidator.py)
# - TESTING (standard CMake option)
# DEBUG_<foo> : special developer flags for debugging.
# PYTHONLIBS_VERSION : if set on the command-line, use a specific Python version
#
# Example usage:
#
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -209,31 +218,28 @@ 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
#
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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion CMakeModules/KPMcoreHelper.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion settings.conf
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ sequence:
- mount
- unpackfs
- machineid
- fstab
- locale
- keyboard
- localecfg
# - luksbootkeyfile
# - luksopenswaphookcfg
# - dracutlukscfg
- fstab
# - plymouthcfg
# - zfshostid
- initcpiocfg
Expand Down
6 changes: 6 additions & 0 deletions src/libcalamares/locale/Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
4 changes: 2 additions & 2 deletions src/libcalamares/locale/Translation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down
9 changes: 9 additions & 0 deletions src/libcalamares/locale/Translation.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
#include <QObject>
#include <QString>

///@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
Expand All @@ -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
{
Expand Down
6 changes: 3 additions & 3 deletions src/modules/initcpiocfg/initcpiocfg.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
4 changes: 0 additions & 4 deletions src/modules/netinstall/netinstall.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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' }

Expand Down

0 comments on commit 1de731d

Please sign in to comment.