Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
02b35cf
fix(web): storage fetchConfig returns null instead of undefined
imobachgs Jan 21, 2025
bba0204
fix(web): usingTpm handles a null configuration
imobachgs Jan 21, 2025
c446500
docs(web): update changes file
imobachgs Jan 21, 2025
fa72f8e
fix(web): fix TPM check when using the legacy AutoYaST mode (#1927)
imobachgs Jan 21, 2025
574d8e3
fix(service): fix the return value of ListRepositories
imobachgs Jan 21, 2025
e8e5bc7
docs(service): update the changes file
imobachgs Jan 21, 2025
a2ebb64
fix(service): fix the return value of ListRepositories (#1930)
imobachgs Jan 21, 2025
9012799
fix(autoinstallation): Import the user settings sooner to avoid stuck…
lslezak Jan 22, 2025
1ea5f57
add installation labels to sle products
jreidinger Jan 23, 2025
0406a6c
changes
jreidinger Jan 23, 2025
3c73623
add installation labels to sle products (#1937)
jreidinger Jan 23, 2025
f29f4ab
feat(service): add a "kind" to the issues
imobachgs Jan 23, 2025
250cec6
feat: product registration property is a boolean
imobachgs Jan 23, 2025
5a436e2
feat: ask for registration when base product is missing
imobachgs Jan 23, 2025
9c63e86
fix(service): fix the D-Bus register method
imobachgs Jan 23, 2025
7964dcc
fix(service): fix reporting of missing registration issues
imobachgs Jan 23, 2025
d9c1bc6
fix(web): fix InstallButton tests
imobachgs Jan 23, 2025
70caa31
fix(web): fix Header tests
imobachgs Jan 23, 2025
ebe4c2a
fix(web): fix ProductRegistrationAlert test
imobachgs Jan 23, 2025
8078774
fix(web): make ESLint happy
imobachgs Jan 23, 2025
002f80e
chore(web): temporarily disable ProductRegistrationPage test
imobachgs Jan 23, 2025
d7e5108
fix(build): The number of build jobs should depend on RAM size (#1939)
lslezak Jan 23, 2025
51def98
fix(web): fix IssuesDrawer test
imobachgs Jan 23, 2025
b10d4d0
Merge branch 'master' into fix-registration-workflow
imobachgs Jan 23, 2025
dc1e38c
fix(web): fix IssuesDrawer test
imobachgs Jan 23, 2025
4448ba3
fix(rust): temporarily disable SMP fine tunning
imobachgs Jan 23, 2025
216499a
docs: update changes files
imobachgs Jan 24, 2025
648901d
fix(web): re-enable product registration page test
dgdavid Jan 24, 2025
83b53b0
doc: update copyright dates of touched files
dgdavid Jan 24, 2025
f21c18d
fix: better registration workflow (#1938)
imobachgs Jan 24, 2025
b5402e5
Fix the %_smp_mflags macro so it works in both TW and SLE16
lslezak Jan 24, 2025
881869e
feat: introduce a new "finish" phase
imobachgs Jan 24, 2025
eeaf9bf
Fix the %_smp_mflags macro so it works in both TW and SLE16 (#1943)
lslezak Jan 24, 2025
07166a0
fix(web): use the "finish" in InstallationFinished component
imobachgs Jan 24, 2025
56eadf1
docs: update changes files
imobachgs Jan 24, 2025
d26394a
fix(web): remove isBusy from InstallationProgress
imobachgs Jan 24, 2025
f9fba4f
chore(web): update from code review
imobachgs Jan 24, 2025
c17204c
fix: prevent reaching the congratulations screen during installation …
imobachgs Jan 24, 2025
003d5d7
Use the memory-constraints macro instead of our implementation
lslezak Jan 24, 2025
2ed0085
fix(build): Use the memory-constraints macro instead of our implement…
imobachgs Jan 24, 2025
3f18ba4
Merge branch 'master' into storage-config-ui-master-sync-20250128
dgdavid Jan 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions products.d/agama-products.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Jan 24 06:45:45 UTC 2025 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

- Change the registration property in a product's definition to a
boolean (gh#agama-project/agama#1938).

-------------------------------------------------------------------
Thu Jan 23 10:43:32 UTC 2025 - Josef Reidinger <jreidinger@suse.com>

- Set installation labels for SLES and SLES4SAP
(gh#agama-project/agama#1937)

-------------------------------------------------------------------
Mon Jan 20 10:36:19 UTC 2025 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

Expand Down
11 changes: 10 additions & 1 deletion products.d/sles_160.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id: SLES
name: SUSE Linux Enterprise Server 16.0 Beta
registration: "mandatory"
registration: true
version: "16-0"
license: "license.beta"
# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -54,6 +54,15 @@ translations:
bulutta ve uçta iş açısından kritik iş yüklerini çalıştırır.
software:
installation_repositories: []
installation_labels:
- label: SLES160-x86_64
archs: x86_64
- label: SLES160-arch64
archs: aarch64
- label: SLES160-s390x
archs: s390
- label: SLES160-ppc64
archs: ppc

mandatory_patterns:
- base_traditional
Expand Down
9 changes: 8 additions & 1 deletion products.d/sles_sap_160.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id: SLES_SAP
name: SUSE Linux Enterprise Server for SAP Applications 16.0 Beta
archs: x86_64,aarch64,ppc
registration: "mandatory"
registration: true
version: "16-0"
license: "license.beta"
# ------------------------------------------------------------------------------
Expand All @@ -19,6 +19,13 @@ translations:
description:
software:
installation_repositories: []
installation_labels:
- label: S4SAP160-x86_64
archs: x86_64
- label: S4SAP160-arch64
archs: aarch64
- label: S4SAP160-ppc64
archs: ppc

mandatory_patterns:
- base_traditional
Expand Down
3 changes: 3 additions & 0 deletions rust/agama-lib/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ pub enum InstallationPhase {
Config,
/// Installation phase.
Install,
/// Finished installation phase.
Finish,
}

impl TryFrom<u32> for InstallationPhase {
Expand All @@ -77,6 +79,7 @@ impl TryFrom<u32> for InstallationPhase {
0 => Ok(Self::Startup),
1 => Ok(Self::Config),
2 => Ok(Self::Install),
3 => Ok(Self::Finish),
_ => Err(ServiceError::UnknownInstallationPhase(value)),
}
}
Expand Down
8 changes: 3 additions & 5 deletions rust/agama-lib/src/product/client.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) [2024] SUSE LLC
// Copyright (c) [2024-2025] SUSE LLC
//
// All Rights Reserved.
//
Expand Down Expand Up @@ -43,7 +43,7 @@ pub struct Product {
/// Product icon (e.g., "default.svg")
pub icon: String,
/// Registration requirement
pub registration: RegistrationRequirement,
pub registration: bool,
/// License ID
pub license: Option<String>,
}
Expand Down Expand Up @@ -80,9 +80,7 @@ impl<'a> ProductClient<'a> {
None => "default.svg",
};

let registration = get_property::<String>(&data, "registration")
.map(|r| RegistrationRequirement::from_str(&r).unwrap_or_default())
.unwrap_or_default();
let registration = get_property::<bool>(&data, "registration").unwrap_or(false);

let license = get_optional_property::<String>(&data, "license").unwrap_or_default();

Expand Down
2 changes: 1 addition & 1 deletion rust/agama-lib/src/proxies/issues.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ use zbus::proxy;
pub trait Issues {
/// All property
#[zbus(property)]
fn all(&self) -> zbus::Result<Vec<(String, String, u32, u32)>>;
fn all(&self) -> zbus::Result<Vec<(String, String, String, u32, u32)>>;
}
8 changes: 5 additions & 3 deletions rust/agama-lib/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ impl Store {
}
}

// import the users (esp. the root password) before initializing software,
// if software fails the Web UI would be stuck in the root password dialog
if let Some(user) = &settings.user {
self.users.store(user).await?;
}
if let Some(network) = &settings.network {
self.network.store(network).await?;
}
Expand All @@ -119,9 +124,6 @@ impl Store {
if let Some(software) = &settings.software {
self.software.store(software).await?;
}
if let Some(user) = &settings.user {
self.users.store(user).await?;
}
if settings.storage.is_some() || settings.storage_autoyast.is_some() {
self.storage.store(&settings.into()).await?
}
Expand Down
6 changes: 4 additions & 2 deletions rust/agama-server/src/web/common.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) [2024] SUSE LLC
// Copyright (c) [2024-2025] SUSE LLC
//
// All Rights Reserved.
//
Expand Down Expand Up @@ -325,11 +325,12 @@ pub struct Issue {
details: Option<String>,
source: u32,
severity: u32,
kind: String,
}

impl Issue {
pub fn from_tuple(
(description, details, source, severity): (String, String, u32, u32),
(description, kind, details, source, severity): (String, String, String, u32, u32),
) -> Self {
let details = if details.is_empty() {
None
Expand All @@ -339,6 +340,7 @@ impl Issue {

Self {
description,
kind,
details,
source,
severity,
Expand Down
19 changes: 19 additions & 0 deletions rust/package/agama.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
-------------------------------------------------------------------
Fri Jan 24 09:33:31 UTC 2025 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

- Introduce a new installation phase "finish"
(gh#agama-project/agama#1616).

-------------------------------------------------------------------
Fri Jan 24 06:43:05 UTC 2025 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

- Change the registration property in a product's definition to a
boolean (gh#agama-project/agama#1938).

-------------------------------------------------------------------
Wed Jan 22 14:49:56 UTC 2025 - Ladislav Slezák <lslezak@suse.com>

- Added a workaround for stuck web UI when importing auto
installation profile with unreachable software repository
(gh#agama-project/agama#1933)

-------------------------------------------------------------------
Mon Jan 20 16:44:02 UTC 2025 - Ladislav Slezák <lslezak@suse.com>

Expand Down
14 changes: 10 additions & 4 deletions rust/package/agama.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# spec file for package agama
#
# Copyright (c) 2023-2024 SUSE LLC
# Copyright (c) 2023-2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
Expand All @@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#

Name: agama
Expand All @@ -23,10 +23,12 @@ Summary: Agama Installer
# If you know the license, put it's SPDX string here.
# Alternately, you can use cargo lock2rpmprovides to help generate this.
License: GPL-2.0-or-later
Url: https://github.com/opensuse/agama
Url: https://github.com/agama-project/agama
Source0: agama.tar
Source1: vendor.tar.zst

# defines the "limit_build" macro used in the "build" section below
BuildRequires: memory-constraints
BuildRequires: cargo-packaging
BuildRequires: pkgconfig(openssl)
# used in tests for dbus service
Expand Down Expand Up @@ -70,7 +72,7 @@ Version: 0
Release: 0
Summary: Agama command-line interface
License: GPL-2.0-only
Url: https://github.com/opensuse/agama
Url: https://github.com/agama-project/agama

%description -n agama-cli
Command line program to interact with the Agama installer.
Expand Down Expand Up @@ -129,6 +131,10 @@ package contains a systemd service to run scripts when booting the installed sys
# find vendor -type f -name \*.rs -exec chmod -x '{}' \;

%build
# Require at least 1.3GB RAM per each parallel job (the size is in MB),
# this can limit the number of parallel jobs on systems with relatively small memory.
%{limit_build -m 1300}

%{cargo_build}
cargo run --package xtask -- manpages
gzip out/man/*
Expand Down
2 changes: 2 additions & 0 deletions service/lib/agama/dbus/clients/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def current_installation_phase
InstallationPhase::CONFIG
when DBus::Manager::INSTALL_PHASE
InstallationPhase::INSTALL
when DBus::Manager::FINISH_PHASE
InstallationPhase::FINISH
end
end

Expand Down
9 changes: 5 additions & 4 deletions service/lib/agama/dbus/clients/with_issues.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# Copyright (c) [2023] SUSE LLC
# Copyright (c) [2023-2025] SUSE LLC
#
# All Rights Reserved.
#
Expand Down Expand Up @@ -52,9 +52,10 @@ def issues_from(dbus_object)

dbus_object[ISSUES_IFACE]["All"].map do |dbus_issue|
Issue.new(dbus_issue[0],
details: dbus_issue[1],
source: sources[dbus_issue[2]],
severity: severities[dbus_issue[3]])
kind: dbus_issue[1].to_sym,
details: dbus_issue[2],
source: sources[dbus_issue[3]],
severity: severities[dbus_issue[4]])
end
end
end
Expand Down
8 changes: 4 additions & 4 deletions service/lib/agama/dbus/interfaces/issues.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# Copyright (c) [2023] SUSE LLC
# Copyright (c) [2023-2025] SUSE LLC
#
# All Rights Reserved.
#
Expand Down Expand Up @@ -48,9 +48,9 @@ def dbus_issues
else
0
end
severity = issue.severity == Agama::Issue::Severity::WARN ? 0 : 1
severity = (issue.severity == Agama::Issue::Severity::WARN) ? 0 : 1

[issue.description, issue.details.to_s, source, severity]
[issue.description, issue.kind.to_s, issue.details.to_s, source, severity]
end
end

Expand All @@ -64,7 +64,7 @@ def self.included(base)
base.class_eval do
dbus_interface ISSUES_INTERFACE do
# @see {#dbus_issues}
dbus_reader :dbus_issues, "a(ssuu)", dbus_name: "All"
dbus_reader :dbus_issues, "a(sssuu)", dbus_name: "All"
end
end
end
Expand Down
5 changes: 4 additions & 1 deletion service/lib/agama/dbus/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def initialize(backend, logger)
STARTUP_PHASE = 0
CONFIG_PHASE = 1
INSTALL_PHASE = 2
FINISH_PHASE = 3

dbus_interface MANAGER_INTERFACE do
dbus_method(:Probe, "") { config_phase }
Expand Down Expand Up @@ -111,7 +112,8 @@ def installation_phases
[
{ "id" => STARTUP_PHASE, "label" => "startup" },
{ "id" => CONFIG_PHASE, "label" => "config" },
{ "id" => INSTALL_PHASE, "label" => "install" }
{ "id" => INSTALL_PHASE, "label" => "install" },
{ "id" => FINISH_PHASE, "label" => "finish" }
]
end

Expand All @@ -122,6 +124,7 @@ def current_installation_phase
return STARTUP_PHASE if backend.installation_phase.startup?
return CONFIG_PHASE if backend.installation_phase.config?
return INSTALL_PHASE if backend.installation_phase.install?
return FINISH_PHASE if backend.installation_phase.finish?
end

# States whether installation runs on iguana
Expand Down
8 changes: 4 additions & 4 deletions service/lib/agama/dbus/software/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ def issues
# array of repository properties: pkg-bindings ID, alias, name, URL, product dir, enabled
# and loaded flag
dbus_method :ListRepositories, "out Result:a(issssbb)" do
backend.repositories.repositories.map do |repo|
[
[
backend.repositories.repositories.map do |repo|
[
repo.repo_id,
repo.repo_alias,
Expand All @@ -81,8 +81,8 @@ def issues
repo.enabled?,
!!repo.loaded?
]
]
end
end
]
end

# value of result hash is category, description, icon, summary and order
Expand Down
5 changes: 3 additions & 2 deletions service/lib/agama/dbus/software/product.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# Copyright (c) [2023] SUSE LLC
# Copyright (c) [2023-2025] SUSE LLC
#
# All Rights Reserved.
#
Expand Down Expand Up @@ -180,7 +180,7 @@ def register(reg_code, email: nil)
[1, "Product not selected yet"]
elsif backend.registration.reg_code
[2, "Product already registered"]
elsif backend.registration.requirement == Agama::Registration::Requirement::NO
elsif !backend.product.registration
[3, "Product does not require registration"]
else
connect_result(first_error_code: 4) do
Expand Down Expand Up @@ -254,6 +254,7 @@ def register_callbacks
# software related issues.
backend.registration.on_change { issues_properties_changed }
backend.registration.on_change { registration_properties_changed }
backend.on_issues_change { issues_properties_changed }
end

def registration_properties_changed
Expand Down
Loading