Compare commits

...

15 Commits

Author SHA1 Message Date
Adriaan de Groot
ba2ef08bfa Changes: pre-release housekeeping 2024-01-15 19:54:01 +01:00
Adriaan de Groot
881347b9c2 [locale,packagechooser] (Auto-)Tests should not require GUI 2024-01-15 00:14:56 +01:00
Adriaan de Groot
94cb026ad8 i18n: update English source texts 2024-01-14 21:35:17 +01:00
Adriaan de Groot
f8245ebb6e CMake: add missing includes
-extensions won't build unless the CMake modules are (somewhat) self-contained.
2024-01-12 23:15:01 +01:00
Adriaan de Groot
1b655c26ef [libcalamares] Remove TMP-related environment variables
When running a command in the chroot, don't set TMP (and similar)
variables because those directories might nog make sense in the
target (yet).

FIXES #2269
2024-01-12 23:04:26 +01:00
Adriaan de Groot
5583c15291 CI: ubuntu needs to explicitly install Ninja 2024-01-09 22:53:48 +01:00
Adriaan de Groot
437a30fdcf Merge pull request #2267 from udeved/headers-install-fix
libcalamares: add compat and packages headers to be installed;
2024-01-02 23:07:10 +01:00
78eeb963a3 libcalamares: add compat and packages headers to be installed;
Use case would be customization of default modules, eg packagechooser requires compat/Variant.h and packages/Globals.h to compile in the calamares-extension repo

Signed-off-by: artoo <artoo@artixlinux.org>
2024-01-02 22:57:08 +01:00
Adriaan de Groot
db4730107d Changes: document recent contributions 2024-01-02 22:40:10 +01:00
Adriaan de Groot
58117de3e3 CI: enable AppStream for those CIs that have it in their deps 2024-01-02 22:40:10 +01:00
Adriaan de Groot
d38a48e900 [packagechooser] Make AppData and AppStream optional default OFF
If set to *ON*, then the dependencies for these two are required
(e.g. QtXml and/or AppStreamQt).
2024-01-02 22:40:10 +01:00
Adriaan de Groot
2798dee036 Merge pull request #2266 from lubuntu-team/calamares
Add an Ubuntu devel CI
2024-01-02 21:02:15 +01:00
Simon Quigley
76a0b00550 Add an Ubuntu devel CI. 2024-01-02 11:52:22 -06:00
Adriaan de Groot
062171a2f0 [packagechooser] Use the found-directory for AppStream headers 2024-01-01 21:45:48 +01:00
Adriaan de Groot
94bc244965 CMake: also help find where the AppStream headers are 2024-01-01 21:45:34 +01:00
20 changed files with 674 additions and 409 deletions

View File

@@ -11,6 +11,8 @@ env:
CMAKE_ARGS: |
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
-DCMAKE_BUILD_TYPE=Debug
-DBUILD_APPSTREAM=ON
-DBUILD_APPDATA=ON
jobs:
build:

View File

@@ -12,6 +12,8 @@ env:
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
-DCMAKE_BUILD_TYPE=Debug
-DWITH_QT6=ON
-DBUILD_APPSTREAM=ON
-DBUILD_APPDATA=ON
jobs:
build:

View File

@@ -13,6 +13,8 @@ env:
-DCMAKE_BUILD_TYPE=Debug
-DBUILD_SCHEMA_TESTING=ON
-DBUILD_TESTING=ON
-DBUILD_APPSTREAM=ON
-DBUILD_APPDATA=ON
jobs:
build:

36
.github/workflows/nightly-ubuntu.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: nightly-ubuntu
on:
schedule:
- cron: "12 23 * * *"
workflow_dispatch:
env:
BUILDDIR: /build
SRCDIR: ${{ github.workspace }}
CMAKE_ARGS: |
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
-DCMAKE_BUILD_TYPE=Debug
-DBUILD_APPSTREAM=ON
-DBUILD_APPDATA=ON
jobs:
build:
runs-on: ubuntu-latest
container:
image: docker://ubuntu:devel
options: --tmpfs /build:rw --user 0:0
steps:
- name: "prepare git"
shell: bash
run: |
apt-get update
apt-get -y install git-core jq curl ninja-build
- name: "prepare source"
uses: calamares/actions/generic-checkout@v5
- name: "install dependencies"
shell: bash
run: ./ci/deps-ubuntu.sh
- name: "build"
shell: bash
run: ./ci/build.sh

View File

@@ -8,15 +8,29 @@ 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.1 (unreleased)
# 3.3.1 (2024-01-15)
This release sets `BUILD_APPDATA` and `BUILD_APSTREAM` to default to **OFF**,
where previously they defaulted to **ON**. When enabled, the dependencies for
both features are required -- previously they would silently switch off if
the dependencies were not found. Distributions are strongly advised to check
their package-building instructions.
This release contains contributions from (alphabetically by first name):
- Adriaan de Groot
- Aleksey Samoilov
- Emir Sari
- Simon Quigley
## Core ##
- No changes of note.
- There has been internal code re-organization (e.g. not using functions
named `tr()`) to help translation tools.
- Strings everywhere have been given more context. (thanks Emir)
- In CMake, "view" is no longer accepted as an alias of the module
type "viewmodule" in function `calamares_add_plugin()`.
- Plain Ubuntu builds have been added to the CI roster. (thanks Simon)
- Commands that run in the target system (in the chroot) no longer
use the TMP-related environment variables from the host. #2269
## Modules ##
- The *displaymanager* module configuration for `greetd` has some more

View File

@@ -48,7 +48,7 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
set(CALAMARES_VERSION 3.3.1)
set(CALAMARES_RELEASE_MODE OFF) # Set to ON during a release
set(CALAMARES_RELEASE_MODE ON) # Set to ON during a release
if(CMAKE_SCRIPT_MODE_FILE)
include(${CMAKE_CURRENT_LIST_DIR}/CMakeModules/ExtendedVersion.cmake)

View File

@@ -11,7 +11,7 @@
# variables (e.g. might be AppStreamQt6_FOUND).
#
option(BUILD_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" ON)
option(BUILD_APPSTREAM "Support appstream: items in PackageChooser (requires libappstream-qt)" OFF)
if(TARGET calaappstream)
if(TARGET calamares::appstreamqt)
@@ -46,7 +46,19 @@ else()
endif()
endif()
if(NOT _appstream_name)
if(HAVE_APPSTREAM)
# Look for the directory name containing the headers
find_file(_appstream_header NAMES ${_appstream_name}/pool.h AppStreamQt/pool.h)
if(NOT _appstream_header)
set(HAVE_APPSTREAM OFF)
else()
if(_appstream_header MATCHES /${_appstream_name}/)
set(_appstream_header_directory ${_appstream_name})
else()
set(_appstream_header_directory AppStreamQt)
endif()
endif()
else()
# Placeholder name
set(_appstream_name AppStreamQt)
endif()
@@ -67,7 +79,7 @@ set_package_properties(
add_library(calaappstream INTERFACE) # Always, but might not be populated
if(HAVE_APPSTREAM)
target_compile_definitions(calaappstream INTERFACE HAVE_APPSTREAM_VERSION=${${_appstream_name}_VERSION_MAJOR})
target_compile_definitions(calaappstream INTERFACE HAVE_APPSTREAM_VERSION=${${_appstream_name}_VERSION_MAJOR} HAVE_APPSTREAM_HEADERS=${_appstream_header_directory})
target_link_libraries(calaappstream INTERFACE ${_appstream_name})
add_library(calamares::appstreamqt ALIAS calaappstream)
endif()

View File

@@ -10,7 +10,8 @@
#
# This file has not yet been documented for use outside of Calamares itself.
include( CMakeParseArguments )
include(CMakeParseArguments)
include(FeatureSummary)
# The Gettext module is still old-fashioned, ALLCAPS variables
find_package( Gettext )

47
ci/deps-ubuntu.sh Executable file
View File

@@ -0,0 +1,47 @@
#! /bin/sh
#
# Install dependencies for the nightly-ubuntu (devel) build
# These build dependencies are grabbed directly from the Debian package
#
apt-get update
apt-get -y install git-core jq curl ninja
apt-get -y install \
build-essential \
cmake \
extra-cmake-modules \
gettext \
libappstreamqt5-dev \
libkf5config-dev \
libkf5coreaddons-dev \
libkf5crash-dev \
libkf5i18n-dev \
libkf5iconthemes-dev \
libkf5kio-dev \
libkf5parts-dev \
libkf5plasma-dev \
libkf5service-dev \
libkf5solid-dev \
libkpmcore-dev \
libparted-dev \
libpolkit-qt5-1-dev \
libpwquality-dev \
libqt5svg5-dev \
libqt5webkit5-dev \
libyaml-cpp-dev \
os-prober \
pkg-config \
pkg-kde-tools \
polkitd \
python3-dev \
python3-jsonschema \
python3-yaml \
qml-module-qtquick-layouts \
qml-module-qtquick-privatewidgets \
qml-module-qtquick-window2 \
qml-module-qtquick2 \
qtbase5-dev \
qtdeclarative5-dev \
qtlocation5-dev \
qttools5-dev \
qttools5-dev-tools
true

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-27 20:44+0100\n"
"POT-Creation-Date: 2024-01-14 21:33+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -68,17 +68,17 @@ msgstr ""
msgid "SLIM config file {!s} does not exist"
msgstr ""
#: src/modules/displaymanager/main.py:935
#: src/modules/displaymanager/main.py:938
msgid "No display managers selected for the displaymanager module."
msgstr ""
#: src/modules/displaymanager/main.py:936
#: src/modules/displaymanager/main.py:939
msgid ""
"The displaymanagers list is empty or undefined in both globalstorage and "
"displaymanager.conf."
msgstr ""
#: src/modules/displaymanager/main.py:1023
#: src/modules/displaymanager/main.py:1026
msgid "Display manager configuration was incomplete"
msgstr ""

View File

@@ -190,7 +190,7 @@ install(
DESTINATION include/libcalamares
)
# Install each subdir-worth of header files
foreach(subdir geoip locale modulesystem network partition utils)
foreach(subdir geoip locale modulesystem network partition utils compat packages)
file(GLOB subdir_headers "${subdir}/*.h")
install(FILES ${subdir_headers} DESTINATION include/libcalamares/${subdir})
endforeach()

View File

@@ -128,6 +128,14 @@ Calamares::Utils::Runner::run()
{
auto env = QProcessEnvironment::systemEnvironment();
env.insert( "LC_ALL", "C" );
// No guarantees that host settings for /tmp/ make sense in target
if ( m_location == RunLocation::RunInTarget )
{
env.remove( "TEMP" );
env.remove( "TEMPDIR" );
env.remove( "TMP" );
env.remove( "TMPDIR" );
}
process.setProcessEnvironment( env );
}
process.setProcessChannelMode( QProcess::MergedChannels );

View File

@@ -66,7 +66,7 @@ private:
QStringList m_FreeBSDLocales;
};
QTEST_MAIN( LocaleTests )
QTEST_GUILESS_MAIN( LocaleTests )
LocaleTests::LocaleTests() {}

View File

@@ -10,9 +10,9 @@ set(_extra_src "")
### OPTIONAL AppData XML support in PackageModel
#
#
option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" ON)
option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" OFF)
if(BUILD_APPDATA)
find_package(${qtname} COMPONENTS Xml)
find_package(${qtname} REQUIRED COMPONENTS Xml)
if(TARGET ${qtname}::Xml)
add_definitions(-DHAVE_APPDATA)
list(APPEND _extra_libraries ${qtname}::Xml)

View File

@@ -16,7 +16,6 @@
#ifdef HAVE_APPSTREAM_VERSION
#include "ItemAppStream.h"
#include <AppStreamQt/pool.h>
#include <memory>
#endif

View File

@@ -7,20 +7,16 @@
*
*/
/** @brief Loading items from AppData XML files.
/** @brief Loading items from AppStream database.
*
* Only used if QtXML is found, implements PackageItem::fromAppData().
* Only used if AppStreamQt is found, implements PackageItem::fromAppStream().
*/
#include "PackageModel.h"
#include "ItemAppStream.h"
#include "locale/TranslationsModel.h"
#include "utils/Logger.h"
#include "utils/Variant.h"
#include <AppStreamQt/image.h>
#include <AppStreamQt/pool.h>
#include <AppStreamQt/screenshot.h>
/// @brief Return number of pixels in a size, for < ordering purposes
static inline quint64
sizeOrder( const QSize& size )

View File

@@ -12,10 +12,28 @@
#include "PackageModel.h"
namespace AppStream
{
class Pool;
} // namespace AppStream
/*
* This weird include mechanism is because an #include line is allowed
* to consist of preprocessor-tokens, which are expanded, and then
* the #include is *re*processed. But if it starts with < or ", then
* preprocessor tokens are not expanded. So we build up a #include <>
* style line with a suitable path -- if we are given a value for
* HAVE_APPSTREAM_HEADERS, that is the directory that the AppStreamQt
* headers live in.
*/
#define CALAMARES_LT <
#define CALAMARES_GT >
#ifndef HAVE_APPSTREAM_HEADERS
#define HAVE_APPSTREAM_HEADERS AppStreamQt
#endif
#include CALAMARES_LT HAVE_APPSTREAM_HEADERS/pool.h CALAMARES_GT
#include CALAMARES_LT HAVE_APPSTREAM_HEADERS/image.h CALAMARES_GT
#include CALAMARES_LT HAVE_APPSTREAM_HEADERS/screenshot.h CALAMARES_GT
#undef CALAMARES_LT
#undef CALAMARES_GT
/** @brief Loads an item from AppStream data.
*

View File

@@ -21,7 +21,7 @@
#include <QtTest/QtTest>
QTEST_MAIN( PackageChooserTests )
QTEST_GUILESS_MAIN( PackageChooserTests )
PackageChooserTests::PackageChooserTests() {}

View File

@@ -20,9 +20,9 @@ include_directories(${_packagechooser})
### OPTIONAL AppData XML support in PackageModel
#
#
option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" ON)
option(BUILD_APPDATA "Support appdata: items in PackageChooser (requires QtXml)" OFF)
if(BUILD_APPDATA)
find_package(${qtname} COMPONENTS Xml)
find_package(${qtname} REQUIRED COMPONENTS Xml)
if(TARGET ${qtname}::Xml)
add_definitions(-DHAVE_APPDATA)
list(APPEND _extra_libraries ${qtname}::Xml)