diff --git a/README.md b/README.md index 73d53f0..3a6f5c3 100644 --- a/README.md +++ b/README.md @@ -166,5 +166,10 @@ For more information about the upstream Calamares project, visit https://calamares.euroquis.nl/ # Release notes +## Version 1.2.0 +* Fix slideshow image display +* Add bmap support for SEAPATH Debian images +* Use the finishedq module instead the finished module + ## Version 1.1.0 Initial release diff --git a/build.sh b/build.sh index 6ec0b77..6a054d0 100755 --- a/build.sh +++ b/build.sh @@ -3,12 +3,13 @@ export DESTDIR=/tmp/sysroot-seapath-installer export BUILDDIR=./build export CMAKE_ARGS="-DWITH_QT6=OFF" -export VERSION="1.1.0" +export VERSION="1.2.0" ./ci/build.sh mkdir -p seapath-installer_${VERSION}_all/etc/calamares mkdir -p seapath-installer_${VERSION}_all/usr/share/calamares/modules cp settings.conf seapath-installer_${VERSION}_all/etc/calamares cp partition.conf seapath-installer_${VERSION}_all/usr/share/calamares/modules +cp build/src/modules/finishedq/finishedq.conf seapath-installer_${VERSION}_all/usr/share/calamares/modules cp -r ./debian/* seapath-installer_${VERSION}_all/ cp -r $DESTDIR/* seapath-installer_${VERSION}_all/ dpkg-deb --build seapath-installer_${VERSION}_all diff --git a/debian/DEBIAN/control b/debian/DEBIAN/control index ff40c5d..6ddefe9 100644 --- a/debian/DEBIAN/control +++ b/debian/DEBIAN/control @@ -1,5 +1,5 @@ Package: seapath-installer -Version: 1.1.0 +Version: 1.2.0 Architecture: all Essential: no Priority: optional @@ -34,6 +34,8 @@ Depends: os-prober, libyaml-cpp0.7 (>= 0.7.0), efibootmgr (>=17-2), qml-module-qtquick2, - qml-module-qtquick-controls + qml-module-qtquick-controls, + qml-module-qtquick-controls2, + qml-module-org-kde-kirigami2 Maintainer: Savoir-faire Linux Description: A UI installer to install SEAPATH distribution, based on the Calamares installer framework diff --git a/settings.conf b/settings.conf index 57b1372..245ebd7 100644 --- a/settings.conf +++ b/settings.conf @@ -132,7 +132,7 @@ sequence: - sshkeyselection - umount - show: - - finished + - finishedq # A branding component is a directory, either in SHARE/calamares/branding or # in /etc/calamares/branding (the latter takes precedence). The directory must diff --git a/src/branding/seapath/branding.desc b/src/branding/seapath/branding.desc index 1918698..3ac1783 100644 --- a/src/branding/seapath/branding.desc +++ b/src/branding/seapath/branding.desc @@ -123,15 +123,15 @@ navigation: widget strings: productName: "LFEnergy SEAPATH" shortProductName: "SEAPATH" - version: 1.1.0 - shortVersion: 1.1.0 - versionedName: LFEnergy SEAPATH 1.1.0 - shortVersionedName: SEAPATH 1.1.0 + version: 1.2.0 + shortVersion: 1.2.0 + versionedName: LFEnergy SEAPATH 1.2.0 + shortVersionedName: SEAPATH 1.2.0 bootloaderEntryName: SEAPATH productUrl: https://lfenergy.org/projects/seapath/ supportUrl: https://lf-energy.atlassian.net/wiki/spaces/SEAP/overview knownIssuesUrl: - releaseNotesUrl: https://lf-energy.atlassian.net/wiki/spaces/SEAP/pages/248250373/1.1.0 + releaseNotesUrl: https://lf-energy.atlassian.net/wiki/spaces/SEAP/pages/248250373/1.2.0 donateUrl: # These images are loaded from the branding module directory. diff --git a/src/modules/finishedq/finishedq.conf b/src/modules/finishedq/finishedq.conf index ee226c3..1f9af42 100644 --- a/src/modules/finishedq/finishedq.conf +++ b/src/modules/finishedq/finishedq.conf @@ -31,6 +31,6 @@ # # For the **specific** example QML included with this module, only # *user-unchecked* really makes sense. -restartNowMode: user-unchecked +restartNowMode: always restartNowCommand: "systemctl -i reboot" notifyOnFinished: false diff --git a/src/modules/imageselection/Config.cpp b/src/modules/imageselection/Config.cpp index f54b200..07fe62d 100644 --- a/src/modules/imageselection/Config.cpp +++ b/src/modules/imageselection/Config.cpp @@ -39,47 +39,6 @@ Config::Config( QObject* parent ) { } -void -Config::setRestartNowMode( Config::RestartMode m ) -{ - // Can only go "down" in state (Always > UserDefaultChecked > .. > Never) - if ( m > m_restartNowMode ) - { - return; - } - - // If changing to an unconditional mode, also set other flag - if ( m == RestartMode::Always || m == RestartMode::Never ) - { - setRestartNowWanted( m == RestartMode::Always ); - } - - if ( m != m_restartNowMode ) - { - m_restartNowMode = m; - emit restartModeChanged( m ); - } -} - -void -Config::setRestartNowWanted( bool w ) -{ - // Follow the mode which may affect @p w - if ( m_restartNowMode == RestartMode::Always ) - { - w = true; - } - if ( m_restartNowMode == RestartMode::Never ) - { - w = false; - } - - if ( w != m_userWantsRestart ) - { - m_userWantsRestart = w; - emit restartNowWantedChanged( w ); - } -} void Config::onInstallationFailed( const QString& message, const QString& details ) @@ -99,24 +58,9 @@ Config::onInstallationFailed( const QString& message, const QString& details ) if ( ( msgChange || detChange ) ) { emit failureChanged( hasFailed() ); - if ( hasFailed() ) - { - setRestartNowMode( Config::RestartMode::Never ); - } } } -void -Config::doRestart( bool restartAnyway ) -{ - cDebug() << "mode=" << restartModes().find( restartNowMode() ) << " user wants restart?" << restartNowWanted() - << "force restart?" << restartAnyway; - if ( restartNowMode() != RestartMode::Never && restartAnyway ) - { - cDebug() << Logger::SubEntry << "Running restart command" << m_restartNowCommand; - QProcess::execute( "/bin/sh", { "-c", m_restartNowCommand } ); - } -} void Config::doNotify( bool hasFailed, bool sendAnyway ) @@ -174,57 +118,3 @@ Config::doNotify( bool hasFailed, bool sendAnyway ) cWarning() << "Could not get dbus interface for notifications at end of installation." << notify.lastError(); } } - -void -Config::setConfigurationMap( const QVariantMap& configurationMap ) -{ - RestartMode mode = RestartMode::Never; - - //TODO:3.3 remove deprecated restart settings - QString restartMode = Calamares::getString( configurationMap, "restartNowMode" ); - if ( restartMode.isEmpty() ) - { - if ( configurationMap.contains( "restartNowEnabled" ) ) - { - cWarning() << "Configuring the finished module with deprecated restartNowEnabled settings"; - } - - bool restartNowEnabled = Calamares::getBool( configurationMap, "restartNowEnabled", false ); - bool restartNowChecked = Calamares::getBool( configurationMap, "restartNowChecked", false ); - - if ( !restartNowEnabled ) - { - mode = RestartMode::Never; - } - else - { - mode = restartNowChecked ? RestartMode::UserDefaultChecked : RestartMode::UserDefaultUnchecked; - } - } - else - { - bool ok = false; - mode = restartModes().find( restartMode, ok ); - if ( !ok ) - { - cWarning() << "Configuring the finished module with bad restartNowMode" << restartMode; - } - } - - m_restartNowMode = mode; - m_userWantsRestart = ( mode == RestartMode::Always || mode == RestartMode::UserDefaultChecked ); - emit restartModeChanged( m_restartNowMode ); - emit restartNowWantedChanged( m_userWantsRestart ); - - if ( mode != RestartMode::Never ) - { - QString restartNowCommand = Calamares::getString( configurationMap, "restartNowCommand" ); - if ( restartNowCommand.isEmpty() ) - { - restartNowCommand = QStringLiteral( "shutdown -r now" ); - } - m_restartNowCommand = restartNowCommand; - } - - m_notifyOnFinished = Calamares::getBool( configurationMap, "notifyOnFinished", false ); -} diff --git a/src/modules/imageselection/Config.h b/src/modules/imageselection/Config.h index 13ae2e1..551341e 100644 --- a/src/modules/imageselection/Config.h +++ b/src/modules/imageselection/Config.h @@ -18,10 +18,7 @@ class Config : public QObject { Q_OBJECT - Q_PROPERTY( RestartMode restartNowMode READ restartNowMode WRITE setRestartNowMode NOTIFY restartModeChanged ) - Q_PROPERTY( bool restartNowWanted READ restartNowWanted WRITE setRestartNowWanted NOTIFY restartNowWantedChanged ) - Q_PROPERTY( QString restartNowCommand READ restartNowCommand CONSTANT FINAL ) Q_PROPERTY( bool notifyOnFinished READ notifyOnFinished CONSTANT FINAL ) Q_PROPERTY( QString failureMessage READ failureMessage NOTIFY failureMessageChanged ) @@ -40,23 +37,8 @@ class Config : public QObject }; Q_ENUM( RestartMode ) - void setConfigurationMap( const QVariantMap& configurationMap ); public Q_SLOTS: - RestartMode restartNowMode() const { return m_restartNowMode; } - void setRestartNowMode( RestartMode m ); - - bool restartNowWanted() const - { - if ( restartNowMode() == RestartMode::Never ) - { - return false; - } - return ( restartNowMode() == RestartMode::Always ) || m_userWantsRestart; - } - void setRestartNowWanted( bool w ); - - QString restartNowCommand() const { return m_restartNowCommand; } bool notifyOnFinished() const { return m_notifyOnFinished; } QString failureMessage() const { return m_failureMessage; } @@ -64,23 +46,6 @@ public Q_SLOTS: /// Failure is if any of the failure messages is non-empty bool hasFailed() const { return !m_failureMessage.isEmpty() || !m_failureDetails.isEmpty(); } - /** @brief Run the restart command, if desired. - * - * This should generally not be called somewhere during the - * application's execution, but only in response to QApplication::quit() - * or something like that when the user expects the system to restart. - * - * The "if desired" part is: only if the restart mode allows it, - * **and** the user has checked the box (or done whatever to - * turn on restartNowWanted()). - * - * - The one-argument form ignores what the user wants and restarts - * if @p restartAnyway is @c true **unless** the mode is Never - * - The no-argument form uses the user setting - */ - void doRestart( bool restartAnyway ); - void doRestart() { doRestart( restartNowWanted() ); } - /** @brief Send DBus notification * * At the end of installation (when the FinishedViewStep is activated), @@ -106,8 +71,6 @@ public Q_SLOTS: void onInstallationFailed( const QString& message, const QString& details ); signals: - void restartModeChanged( RestartMode m ); - void restartNowWantedChanged( bool w ); void failureMessageChanged( const QString& ); void failureDetailsChanged( const QString& ); void failureChanged( bool ); @@ -115,7 +78,6 @@ public Q_SLOTS: private: // Configuration parts QString m_restartNowCommand; - RestartMode m_restartNowMode = RestartMode::Never; bool m_userWantsRestart = false; bool m_notifyOnFinished = false; diff --git a/src/modules/imageselection/ImageSelection.yaml b/src/modules/imageselection/ImageSelection.yaml deleted file mode 100644 index c7cb07a..0000000 --- a/src/modules/imageselection/ImageSelection.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-FileCopyrightText: 2020 Adriaan de Groot -# SPDX-License-Identifier: GPL-3.0-or-later ---- -$schema: https://json-schema.org/schema# -$id: https://codeberg.org/Calamares/calamares/src/branch/calamares/src/modules/finished/finished.schema.yaml -additionalProperties: false -type: object -properties: - restartNowEnabled: { type: boolean, default: true } # TODO:3.3: remove - restartNowChecked: { type: boolean, default: false } # TODO:3.3: remove - restartNowCommand: { type: string } - restartNowMode: { type: string, enum: [ never, user-unchecked, user-checked, always ] } - notifyOnFinished: { type: boolean } diff --git a/src/modules/imageselection/ImageSelectionViewStep.conf b/src/modules/imageselection/ImageSelectionViewStep.conf deleted file mode 100644 index 7abfb36..0000000 --- a/src/modules/imageselection/ImageSelectionViewStep.conf +++ /dev/null @@ -1,47 +0,0 @@ -# SPDX-FileCopyrightText: no -# SPDX-License-Identifier: CC0-1.0 -# -# Configuration for the "finished" page, which is usually shown only at -# the end of the installation (successful or not). ---- -# DEPRECATED -# -# The finished page can hold a "restart system now" checkbox. -# If this is false, no checkbox is shown and the system is not restarted -# when Calamares exits. -# restartNowEnabled: true - -# DEPRECATED -# -# Initial state of the checkbox "restart now". Only relevant when the -# checkbox is shown by restartNowEnabled. -# restartNowChecked: false - -# Behavior of the "restart system now" button. -# -# There are four usable values: -# - never -# Does not show the button and does not restart. -# This matches the old behavior with restartNowEnabled=false. -# - user-unchecked -# Shows the button, defaults to unchecked, restarts if it is checked. -# This matches the old behavior with restartNowEnabled=true and restartNowChecked=false. -# - user-checked -# Shows the button, defaults to checked, restarts if it is checked. -# This matches the old behavior with restartNowEnabled=true and restartNowChecked=true. -# - always -# Shows the button, checked, but the user cannot change it. -# This is new behavior. -# -# The three combinations of legacy values are still supported. -restartNowMode: user-unchecked - -# If the checkbox is shown, and the checkbox is checked, then when -# Calamares exits from the finished-page it will run this command. -# If not set, falls back to "shutdown -r now". -restartNowCommand: "systemctl -i reboot" - -# When the last page is (successfully) reached, send a DBus notification -# to the desktop that the installation is done. This works only if the -# user as whom Calamares is run, can reach the regular desktop session bus. -notifyOnFinished: false diff --git a/src/modules/imageselection/ImageSelectionViewStep.cpp b/src/modules/imageselection/ImageSelectionViewStep.cpp index 82ef390..813bbf1 100644 --- a/src/modules/imageselection/ImageSelectionViewStep.cpp +++ b/src/modules/imageselection/ImageSelectionViewStep.cpp @@ -96,8 +96,6 @@ ImageSelectionViewStep::isAtEnd() const void ImageSelectionViewStep::onActivate() { - m_config->doNotify(); - connect( qApp, &QApplication::aboutToQuit, m_config, qOverload<>( &Config::doRestart ) ); } void @@ -221,10 +219,4 @@ ImageSelectionViewStep::jobs() const return Calamares::JobList(); } -void -ImageSelectionViewStep::setConfigurationMap( const QVariantMap& configurationMap ) -{ - m_config->setConfigurationMap( configurationMap ); -} - CALAMARES_PLUGIN_FACTORY_DEFINITION( ImageSelectionViewStepFactory, registerPlugin< ImageSelectionViewStep >(); ) diff --git a/src/modules/imageselection/ImageSelectionViewStep.h b/src/modules/imageselection/ImageSelectionViewStep.h index 887ddaf..787837a 100644 --- a/src/modules/imageselection/ImageSelectionViewStep.h +++ b/src/modules/imageselection/ImageSelectionViewStep.h @@ -41,7 +41,6 @@ class PLUGINDLLEXPORT ImageSelectionViewStep : public Calamares::ViewStep Calamares::JobList jobs() const override; - void setConfigurationMap( const QVariantMap& configurationMap ) override; private: Config* m_config; diff --git a/src/modules/imageselection/imageselection.conf b/src/modules/imageselection/imageselection.conf deleted file mode 100644 index 7abfb36..0000000 --- a/src/modules/imageselection/imageselection.conf +++ /dev/null @@ -1,47 +0,0 @@ -# SPDX-FileCopyrightText: no -# SPDX-License-Identifier: CC0-1.0 -# -# Configuration for the "finished" page, which is usually shown only at -# the end of the installation (successful or not). ---- -# DEPRECATED -# -# The finished page can hold a "restart system now" checkbox. -# If this is false, no checkbox is shown and the system is not restarted -# when Calamares exits. -# restartNowEnabled: true - -# DEPRECATED -# -# Initial state of the checkbox "restart now". Only relevant when the -# checkbox is shown by restartNowEnabled. -# restartNowChecked: false - -# Behavior of the "restart system now" button. -# -# There are four usable values: -# - never -# Does not show the button and does not restart. -# This matches the old behavior with restartNowEnabled=false. -# - user-unchecked -# Shows the button, defaults to unchecked, restarts if it is checked. -# This matches the old behavior with restartNowEnabled=true and restartNowChecked=false. -# - user-checked -# Shows the button, defaults to checked, restarts if it is checked. -# This matches the old behavior with restartNowEnabled=true and restartNowChecked=true. -# - always -# Shows the button, checked, but the user cannot change it. -# This is new behavior. -# -# The three combinations of legacy values are still supported. -restartNowMode: user-unchecked - -# If the checkbox is shown, and the checkbox is checked, then when -# Calamares exits from the finished-page it will run this command. -# If not set, falls back to "shutdown -r now". -restartNowCommand: "systemctl -i reboot" - -# When the last page is (successfully) reached, send a DBus notification -# to the desktop that the installation is done. This works only if the -# user as whom Calamares is run, can reach the regular desktop session bus. -notifyOnFinished: false diff --git a/src/modules/rawimage/main.py b/src/modules/rawimage/main.py index d7a0e57..1f2ad6a 100644 --- a/src/modules/rawimage/main.py +++ b/src/modules/rawimage/main.py @@ -226,8 +226,6 @@ def output_cb(line: str): # Run the script on the host; switch to target_env_process_output(), # if it must run in target chroot. bmaptool_cmd = ["bmaptool", "--debug", "copy"] - if gs.value("seapathFlavor") == "debian": - bmaptool_cmd.append("--nobmap") bmaptool_cmd.extend([image, target_device]) host_env_process_output(