From ceff75380cf6045955238ddffb8c5be4423217cb Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Fri, 30 Jan 2026 11:51:41 +0100 Subject: [PATCH 01/10] implement rust side of setting kernel params --- rust/agama-bootloader/src/client.rs | 30 ++++++++++++++++++++++--- rust/agama-bootloader/src/message.rs | 16 ++++++++++++- rust/agama-bootloader/src/test_utils.rs | 6 ++++- rust/agama-utils/src/api/bootloader.rs | 7 ++++++ 4 files changed, 54 insertions(+), 5 deletions(-) diff --git a/rust/agama-bootloader/src/client.rs b/rust/agama-bootloader/src/client.rs index c354848e8e..0b41824d5a 100644 --- a/rust/agama-bootloader/src/client.rs +++ b/rust/agama-bootloader/src/client.rs @@ -20,8 +20,11 @@ //! Implements a client to access Agama's D-Bus API related to Bootloader management. -use agama_utils::api::bootloader::Config; +use std::collections::HashMap; + +use agama_utils::api::bootloader::{Config, KernelArg}; use async_trait::async_trait; +use serde::{Deserialize, Serialize}; use zbus::Connection; use crate::dbus::BootloaderProxy; @@ -47,6 +50,18 @@ pub trait BootloaderClient { async fn get_config(&self) -> ClientResult; /// Sets the bootloader configuration. async fn set_config(&self, config: &Config) -> ClientResult<()>; + /// Sets the extra kernel args for given scope. + async fn set_kernel_arg(&mut self, arg: KernelArg); +} + +// full config used on dbus which beside public config passes +// also additional internal settings +#[derive(Clone, Debug, Serialize, Deserialize, Default)] +#[serde(rename_all = "camelCase")] +struct FullConfig { + #[serde(flatten)] + config: Config, + kernel_args: HashMap, } pub type ClientResult = Result; @@ -55,13 +70,14 @@ pub type ClientResult = Result; #[derive(Clone)] pub struct Client<'a> { bootloader_proxy: BootloaderProxy<'a>, + kernel_args: HashMap, } impl<'a> Client<'a> { pub async fn new(connection: Connection) -> ClientResult> { let bootloader_proxy = BootloaderProxy::new(&connection).await?; - Ok(Self { bootloader_proxy }) + Ok(Self { bootloader_proxy, kernel_args: HashMap::new()}) } } @@ -74,11 +90,19 @@ impl<'a> BootloaderClient for Client<'a> { } async fn set_config(&self, config: &Config) -> ClientResult<()> { + let full_config = FullConfig { + config: config.clone(), + kernel_args: self.kernel_args.clone(), + }; // ignore return value as currently it does not fail and who knows what future brings // but it should not be part of result and instead transformed to Issue self.bootloader_proxy - .set_config(serde_json::to_string(config)?.as_str()) + .set_config(serde_json::to_string(&full_config)?.as_str()) .await?; Ok(()) } + + async fn set_kernel_arg(&mut self, arg: KernelArg) { + self.kernel_args.insert(arg.scope, arg.value); + } } diff --git a/rust/agama-bootloader/src/message.rs b/rust/agama-bootloader/src/message.rs index ff71f6ab5b..db38b862f8 100644 --- a/rust/agama-bootloader/src/message.rs +++ b/rust/agama-bootloader/src/message.rs @@ -18,7 +18,7 @@ // To contact SUSE LLC about this file by physical or electronic mail, you may // find current contact information at www.suse.com. -use agama_utils::{actor::Message, api::bootloader::Config}; +use agama_utils::{actor::Message, api::bootloader::{Config, KernelArg}}; pub struct GetConfig; @@ -45,3 +45,17 @@ impl SetConfig { } } } + +pub struct SetKernelArg { + pub arg: KernelArg, +} + +impl Message for SetKernelArg { + type Reply = (); +} + +impl SetKernelArg { + pub fn new(arg: KernelArg) -> Self { + Self { arg } + } +} diff --git a/rust/agama-bootloader/src/test_utils.rs b/rust/agama-bootloader/src/test_utils.rs index 44cd62a767..6cf528fca1 100644 --- a/rust/agama-bootloader/src/test_utils.rs +++ b/rust/agama-bootloader/src/test_utils.rs @@ -22,7 +22,7 @@ use std::sync::Arc; -use agama_utils::{actor::Handler, api::bootloader::Config, issue}; +use agama_utils::{actor::Handler, api::bootloader::{Config, KernelArg}, issue}; use async_trait::async_trait; use tokio::sync::Mutex; @@ -82,6 +82,10 @@ impl BootloaderClient for TestClient { state.config = config.clone(); Ok(()) } + + async fn set_kernel_arg(&mut self, _arg: KernelArg) { + } + } /// Starts a testing storage service. diff --git a/rust/agama-utils/src/api/bootloader.rs b/rust/agama-utils/src/api/bootloader.rs index ba0b80879c..f1d557d3d3 100644 --- a/rust/agama-utils/src/api/bootloader.rs +++ b/rust/agama-utils/src/api/bootloader.rs @@ -47,3 +47,10 @@ impl Config { } } } + +#[derive(Clone, Debug, Serialize, Deserialize, Default)] +#[serde(rename_all = "camelCase")] +pub struct KernelArg { + pub scope: String, + pub value: String, +} \ No newline at end of file From 1108d7574b46310fb92b89ea32fb1fb05a61bdc4 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Fri, 30 Jan 2026 12:33:49 +0100 Subject: [PATCH 02/10] Add ruby part for scoped kernel params --- service/lib/agama/storage/bootloader.rb | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/service/lib/agama/storage/bootloader.rb b/service/lib/agama/storage/bootloader.rb index a847da1610..bcdad2bbf3 100644 --- a/service/lib/agama/storage/bootloader.rb +++ b/service/lib/agama/storage/bootloader.rb @@ -51,6 +51,11 @@ class Config # @return [String] attr_accessor :extra_kernel_params + # Bootloader extra kernel parameters needed for other parts of agama + # + # @return [Hash] + attr_accessor :scoped_kernel_params + # Keys to export to JSON. # # As both previous keys are conflicting, remember which one to set or none. It can be empty @@ -109,6 +114,8 @@ def load_json(serialized_config) end end + self.scoped_kernel_params = hsh[:kernelArgs] + self end end @@ -169,19 +176,22 @@ def write_config bootloader = ::Bootloader::BootloaderFactory.current write_stop_on_boot(bootloader) if @config.keys_to_export.include?(:stop_on_boot_menu) write_timeout(bootloader) if @config.keys_to_export.include?(:timeout) + kernel_params = @config.scoped_kernel_params.values.join(" ") + if @config.keys_to_export.include?(:extra_kernel_params) - write_extra_kernel_params(bootloader) + kernel_params += " " + @config.extra_kernel_params end + write_extra_kernel_params(bootloader, kernel_params) bootloader end - def write_extra_kernel_params(bootloader) + def write_extra_kernel_params(bootloader, kernel_params) # no systemd boot support for now return unless bootloader.respond_to?(:grub_default) new_bl = bootloader.class.new - new_bl.grub_default.kernel_params.replace(@config.extra_kernel_params) + new_bl.grub_default.kernel_params.replace(kernel_params) # and now just merge extra kernel params with all merge logic bootloader.merge(new_bl) end From 4959fa732c7fea4b032c277d5b8d64656903fad0 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Fri, 30 Jan 2026 12:33:56 +0100 Subject: [PATCH 03/10] rust fmt --- rust/agama-bootloader/src/client.rs | 5 ++++- rust/agama-bootloader/src/message.rs | 5 ++++- rust/agama-bootloader/src/test_utils.rs | 10 ++++++---- rust/agama-utils/src/api/bootloader.rs | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/rust/agama-bootloader/src/client.rs b/rust/agama-bootloader/src/client.rs index 0b41824d5a..4d8c15186d 100644 --- a/rust/agama-bootloader/src/client.rs +++ b/rust/agama-bootloader/src/client.rs @@ -77,7 +77,10 @@ impl<'a> Client<'a> { pub async fn new(connection: Connection) -> ClientResult> { let bootloader_proxy = BootloaderProxy::new(&connection).await?; - Ok(Self { bootloader_proxy, kernel_args: HashMap::new()}) + Ok(Self { + bootloader_proxy, + kernel_args: HashMap::new(), + }) } } diff --git a/rust/agama-bootloader/src/message.rs b/rust/agama-bootloader/src/message.rs index db38b862f8..9e11323232 100644 --- a/rust/agama-bootloader/src/message.rs +++ b/rust/agama-bootloader/src/message.rs @@ -18,7 +18,10 @@ // To contact SUSE LLC about this file by physical or electronic mail, you may // find current contact information at www.suse.com. -use agama_utils::{actor::Message, api::bootloader::{Config, KernelArg}}; +use agama_utils::{ + actor::Message, + api::bootloader::{Config, KernelArg}, +}; pub struct GetConfig; diff --git a/rust/agama-bootloader/src/test_utils.rs b/rust/agama-bootloader/src/test_utils.rs index 6cf528fca1..0beac9723a 100644 --- a/rust/agama-bootloader/src/test_utils.rs +++ b/rust/agama-bootloader/src/test_utils.rs @@ -22,7 +22,11 @@ use std::sync::Arc; -use agama_utils::{actor::Handler, api::bootloader::{Config, KernelArg}, issue}; +use agama_utils::{ + actor::Handler, + api::bootloader::{Config, KernelArg}, + issue, +}; use async_trait::async_trait; use tokio::sync::Mutex; @@ -83,9 +87,7 @@ impl BootloaderClient for TestClient { Ok(()) } - async fn set_kernel_arg(&mut self, _arg: KernelArg) { - } - + async fn set_kernel_arg(&mut self, _arg: KernelArg) {} } /// Starts a testing storage service. diff --git a/rust/agama-utils/src/api/bootloader.rs b/rust/agama-utils/src/api/bootloader.rs index f1d557d3d3..5939ead005 100644 --- a/rust/agama-utils/src/api/bootloader.rs +++ b/rust/agama-utils/src/api/bootloader.rs @@ -53,4 +53,4 @@ impl Config { pub struct KernelArg { pub scope: String, pub value: String, -} \ No newline at end of file +} From be239514926d5962b98c908c7da155764f935fb9 Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Fri, 30 Jan 2026 15:28:33 +0100 Subject: [PATCH 04/10] add final piece for proposing selinux security option --- rust/Cargo.lock | 1 + rust/agama-bootloader/src/service.rs | 8 ++++++ rust/agama-manager/src/service.rs | 1 + rust/agama-software/Cargo.toml | 1 + rust/agama-software/src/model/state.rs | 8 ++++++ rust/agama-software/src/service.rs | 36 ++++++++++++++++++++++++-- rust/agama-software/src/test_utils.rs | 6 +++-- 7 files changed, 57 insertions(+), 4 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index c8b7675e02..c290db3571 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -329,6 +329,7 @@ dependencies = [ name = "agama-software" version = "0.1.0" dependencies = [ + "agama-bootloader", "agama-l10n", "agama-locale-data", "agama-security", diff --git a/rust/agama-bootloader/src/service.rs b/rust/agama-bootloader/src/service.rs index 133c0a0fba..a1211dae07 100644 --- a/rust/agama-bootloader/src/service.rs +++ b/rust/agama-bootloader/src/service.rs @@ -122,3 +122,11 @@ impl MessageHandler> for Service { Ok(()) } } + +#[async_trait] +impl MessageHandler for Service { + async fn handle(&mut self, message: message::SetKernelArg) -> Result<(), Error> { + self.client.set_kernel_arg(message.arg).await; + Ok(()) + } +} diff --git a/rust/agama-manager/src/service.rs b/rust/agama-manager/src/service.rs index ba160e8ad6..11dd94433c 100644 --- a/rust/agama-manager/src/service.rs +++ b/rust/agama-manager/src/service.rs @@ -257,6 +257,7 @@ impl Starter { progress.clone(), self.questions.clone(), security.clone(), + bootloader.clone(), ) .start() .await? diff --git a/rust/agama-software/Cargo.toml b/rust/agama-software/Cargo.toml index 6b023f2fca..22603fa14d 100644 --- a/rust/agama-software/Cargo.toml +++ b/rust/agama-software/Cargo.toml @@ -5,6 +5,7 @@ rust-version.workspace = true edition.workspace = true [dependencies] +agama-bootloader = { path = "../agama-bootloader" } agama-l10n = { path = "../agama-l10n" } agama-locale-data = { path = "../agama-locale-data" } agama-utils = { path = "../agama-utils" } diff --git a/rust/agama-software/src/model/state.rs b/rust/agama-software/src/model/state.rs index 184e26bde5..9eeb1cb422 100644 --- a/rust/agama-software/src/model/state.rs +++ b/rust/agama-software/src/model/state.rs @@ -547,6 +547,14 @@ impl ResolvableSelection { false } + + pub fn selected(&self) -> bool { + match self { + ResolvableSelection::Selected => true, + ResolvableSelection::AutoSelected { optional: _ } => true, + _ => false, + } + } } impl From for zypp_agama::ResolvableSelected { diff --git a/rust/agama-software/src/service.rs b/rust/agama-software/src/service.rs index 57dd7af149..f9af249959 100644 --- a/rust/agama-software/src/service.rs +++ b/rust/agama-software/src/service.rs @@ -22,12 +22,14 @@ use crate::{ message, model::{software_selection::SoftwareSelection, state::SoftwareState, ModelAdapter}, zypp_server::{self, SoftwareAction, ZyppServer}, - Model, + Model, ResolvableType, }; +use agama_bootloader; use agama_security as security; use agama_utils::{ actor::{self, Actor, Handler, MessageHandler}, api::{ + bootloader::KernelArg, event::{self, Event}, software::{Config, Proposal, Repository, SystemInfo}, Issue, Scope, @@ -74,6 +76,7 @@ pub struct Starter { progress: Handler, questions: Handler, security: Handler, + bootloader: Handler, } impl Starter { @@ -83,6 +86,7 @@ impl Starter { progress: Handler, questions: Handler, security: Handler, + bootloader: Handler, ) -> Self { Self { model: None, @@ -91,6 +95,7 @@ impl Starter { progress, questions, security, + bootloader, } } @@ -135,6 +140,7 @@ impl Starter { progress: self.progress, product: None, kernel_cmdline: KernelCmdline::parse().unwrap_or_default(), + bootloader: self.bootloader, }; service.setup().await?; Ok(actor::spawn(service)) @@ -157,6 +163,7 @@ pub struct Service { product: Option>>, selection: SoftwareSelection, kernel_cmdline: KernelCmdline, + bootloader: Handler, } #[derive(Default)] @@ -173,8 +180,9 @@ impl Service { progress: Handler, questions: Handler, security: Handler, + bootloader: Handler, ) -> Starter { - Starter::new(events, issues, progress, questions, security) + Starter::new(events, issues, progress, questions, security, bootloader) } pub async fn setup(&mut self) -> Result<(), Error> { @@ -190,6 +198,28 @@ impl Service { Ok(()) } + fn update_selinux(&self, state: &SoftwareState) { + let selinux_selected = state.resolvables.to_vec().iter().any(|(name, typ, state)| { + typ == &ResolvableType::Pattern && name == "selinux" && state.selected() + }); + + let value = if selinux_selected { + "security=selinux" + } else { + "security=" + }; + let arg = KernelArg { + scope: "selinux".to_string(), + value: value.to_string(), + }; + let res = self + .bootloader + .cast(agama_bootloader::message::SetKernelArg { arg }); + if res.is_err() { + tracing::warn!("Failed to send to bootloader new selinux state: {:?}", res); + } + } + /// Updates the proposal and the service state. /// /// This function performs the following actions: @@ -214,6 +244,8 @@ impl Service { }; tracing::info!("Wanted software state: {new_state:?}"); + self.update_selinux(&new_state); + let model = self.model.clone(); let progress = self.progress.clone(); let issues = self.issues.clone(); diff --git a/rust/agama-software/src/test_utils.rs b/rust/agama-software/src/test_utils.rs index 13634e1925..7ff10930c6 100644 --- a/rust/agama-software/src/test_utils.rs +++ b/rust/agama-software/src/test_utils.rs @@ -28,7 +28,7 @@ use agama_utils::{ }, issue, products::ProductSpec, - progress, question, + progress, question, test, }; use async_trait::async_trait; @@ -91,7 +91,9 @@ pub async fn start_service( questions: Handler, ) -> Handler { let security = start_security_service(questions.clone()).await; - Service::starter(events, issues, progress, questions, security) + let dbus = test::dbus::connection().await.unwrap(); + let bootloader = agama_bootloader::test_utils::start_service(issues.clone(), dbus).await; + Service::starter(events, issues, progress, questions, security, bootloader) .with_model(TestModel {}) .start() .await From 8ebbb63332a412fef0743d56c09185c719c7f4fe Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Fri, 30 Jan 2026 22:19:28 +0100 Subject: [PATCH 05/10] add more logging --- rust/agama-bootloader/src/client.rs | 1 + service/lib/agama/storage/bootloader.rb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/rust/agama-bootloader/src/client.rs b/rust/agama-bootloader/src/client.rs index 4d8c15186d..b724616edf 100644 --- a/rust/agama-bootloader/src/client.rs +++ b/rust/agama-bootloader/src/client.rs @@ -97,6 +97,7 @@ impl<'a> BootloaderClient for Client<'a> { config: config.clone(), kernel_args: self.kernel_args.clone(), }; + tracing::info!("sending bootloader config {:?}", full_config); // ignore return value as currently it does not fail and who knows what future brings // but it should not be part of result and instead transformed to Issue self.bootloader_proxy diff --git a/service/lib/agama/storage/bootloader.rb b/service/lib/agama/storage/bootloader.rb index bcdad2bbf3..a3a4cdd557 100644 --- a/service/lib/agama/storage/bootloader.rb +++ b/service/lib/agama/storage/bootloader.rb @@ -177,10 +177,12 @@ def write_config write_stop_on_boot(bootloader) if @config.keys_to_export.include?(:stop_on_boot_menu) write_timeout(bootloader) if @config.keys_to_export.include?(:timeout) kernel_params = @config.scoped_kernel_params.values.join(" ") + @logger.info "scoped kernel params: #{kernel_params}" if @config.keys_to_export.include?(:extra_kernel_params) kernel_params += " " + @config.extra_kernel_params end + @logger.info "full kernel params: #{kernel_params}" write_extra_kernel_params(bootloader, kernel_params) bootloader From 617080a1041098b183f9a14ec7adf0898e3ad54b Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Fri, 30 Jan 2026 22:36:32 +0100 Subject: [PATCH 06/10] fix unselecting selinux pattern --- web/src/components/software/SoftwarePatternsSelection.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/src/components/software/SoftwarePatternsSelection.tsx b/web/src/components/software/SoftwarePatternsSelection.tsx index 9e9437871e..b82b6347ea 100644 --- a/web/src/components/software/SoftwarePatternsSelection.tsx +++ b/web/src/components/software/SoftwarePatternsSelection.tsx @@ -124,7 +124,10 @@ function SoftwarePatternsSelection(): React.ReactNode { } else { // add the pattern to the "remove" list only if it was autoselected by dependencies, otherwise // it was selected by user and it is enough to remove it from the "add" list above - if (selection[name] === SelectedBy.AUTO) { + // with exception of product preselected pattern which also needs to be added + const preselected = patterns.find((p) => p.name === name && p.preselected); + + if (selection[name] === SelectedBy.AUTO || preselected) { remove.push(name); } } From 136627cbcdee8ed7614d9b8d5d42b6e9a94d71fc Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 2 Feb 2026 09:06:46 +0100 Subject: [PATCH 07/10] expand KernelArg to own args --- rust/agama-bootloader/src/client.rs | 11 +++++++---- rust/agama-bootloader/src/message.rs | 9 +++++---- rust/agama-bootloader/src/service.rs | 2 +- rust/agama-bootloader/src/test_utils.rs | 4 ++-- rust/agama-software/src/service.rs | 9 +++------ rust/agama-utils/src/api/bootloader.rs | 7 ------- 6 files changed, 18 insertions(+), 24 deletions(-) diff --git a/rust/agama-bootloader/src/client.rs b/rust/agama-bootloader/src/client.rs index b724616edf..a238b2b494 100644 --- a/rust/agama-bootloader/src/client.rs +++ b/rust/agama-bootloader/src/client.rs @@ -22,7 +22,7 @@ use std::collections::HashMap; -use agama_utils::api::bootloader::{Config, KernelArg}; +use agama_utils::api::bootloader::Config; use async_trait::async_trait; use serde::{Deserialize, Serialize}; use zbus::Connection; @@ -51,7 +51,10 @@ pub trait BootloaderClient { /// Sets the bootloader configuration. async fn set_config(&self, config: &Config) -> ClientResult<()>; /// Sets the extra kernel args for given scope. - async fn set_kernel_arg(&mut self, arg: KernelArg); + /// + /// * `id`: identifier of the kernel argument so it can be later changed. + /// * `value`: plaintext value that will be appended to kernel commandline. + async fn set_kernel_arg(&mut self, id: String, value: String); } // full config used on dbus which beside public config passes @@ -106,7 +109,7 @@ impl<'a> BootloaderClient for Client<'a> { Ok(()) } - async fn set_kernel_arg(&mut self, arg: KernelArg) { - self.kernel_args.insert(arg.scope, arg.value); + async fn set_kernel_arg(&mut self, id: String, value: String) { + self.kernel_args.insert(id, value); } } diff --git a/rust/agama-bootloader/src/message.rs b/rust/agama-bootloader/src/message.rs index 9e11323232..9e91f9e160 100644 --- a/rust/agama-bootloader/src/message.rs +++ b/rust/agama-bootloader/src/message.rs @@ -20,7 +20,7 @@ use agama_utils::{ actor::Message, - api::bootloader::{Config, KernelArg}, + api::bootloader::Config, }; pub struct GetConfig; @@ -50,7 +50,8 @@ impl SetConfig { } pub struct SetKernelArg { - pub arg: KernelArg, + pub id: String, + pub value: String, } impl Message for SetKernelArg { @@ -58,7 +59,7 @@ impl Message for SetKernelArg { } impl SetKernelArg { - pub fn new(arg: KernelArg) -> Self { - Self { arg } + pub fn new(id: String, value: String) -> Self { + Self { id, value } } } diff --git a/rust/agama-bootloader/src/service.rs b/rust/agama-bootloader/src/service.rs index a1211dae07..b45847b832 100644 --- a/rust/agama-bootloader/src/service.rs +++ b/rust/agama-bootloader/src/service.rs @@ -126,7 +126,7 @@ impl MessageHandler> for Service { #[async_trait] impl MessageHandler for Service { async fn handle(&mut self, message: message::SetKernelArg) -> Result<(), Error> { - self.client.set_kernel_arg(message.arg).await; + self.client.set_kernel_arg(message.id, message.value).await; Ok(()) } } diff --git a/rust/agama-bootloader/src/test_utils.rs b/rust/agama-bootloader/src/test_utils.rs index 0beac9723a..92b1092ac8 100644 --- a/rust/agama-bootloader/src/test_utils.rs +++ b/rust/agama-bootloader/src/test_utils.rs @@ -24,7 +24,7 @@ use std::sync::Arc; use agama_utils::{ actor::Handler, - api::bootloader::{Config, KernelArg}, + api::bootloader::Config, issue, }; use async_trait::async_trait; @@ -87,7 +87,7 @@ impl BootloaderClient for TestClient { Ok(()) } - async fn set_kernel_arg(&mut self, _arg: KernelArg) {} + async fn set_kernel_arg(&mut self, _id: String, _value: String) {} } /// Starts a testing storage service. diff --git a/rust/agama-software/src/service.rs b/rust/agama-software/src/service.rs index f9af249959..50d529d818 100644 --- a/rust/agama-software/src/service.rs +++ b/rust/agama-software/src/service.rs @@ -29,7 +29,6 @@ use agama_security as security; use agama_utils::{ actor::{self, Actor, Handler, MessageHandler}, api::{ - bootloader::KernelArg, event::{self, Event}, software::{Config, Proposal, Repository, SystemInfo}, Issue, Scope, @@ -208,13 +207,11 @@ impl Service { } else { "security=" }; - let arg = KernelArg { - scope: "selinux".to_string(), + let message = agama_bootloader::message::SetKernelArg { + id: "selinux".to_string(), value: value.to_string(), }; - let res = self - .bootloader - .cast(agama_bootloader::message::SetKernelArg { arg }); + let res = self.bootloader.cast(message); if res.is_err() { tracing::warn!("Failed to send to bootloader new selinux state: {:?}", res); } diff --git a/rust/agama-utils/src/api/bootloader.rs b/rust/agama-utils/src/api/bootloader.rs index 5939ead005..ba0b80879c 100644 --- a/rust/agama-utils/src/api/bootloader.rs +++ b/rust/agama-utils/src/api/bootloader.rs @@ -47,10 +47,3 @@ impl Config { } } } - -#[derive(Clone, Debug, Serialize, Deserialize, Default)] -#[serde(rename_all = "camelCase")] -pub struct KernelArg { - pub scope: String, - pub value: String, -} From f4f6ba1fbd6d1bc6c9456b4814db88f807623fbf Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 2 Feb 2026 09:14:23 +0100 Subject: [PATCH 08/10] changes --- rust/package/agama.changes | 6 ++++++ service/package/rubygem-agama-yast.changes | 6 ++++++ web/package/agama-web-ui.changes | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/rust/package/agama.changes b/rust/package/agama.changes index 5e899a1448..780d67efbd 100644 --- a/rust/package/agama.changes +++ b/rust/package/agama.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 2 08:13:10 UTC 2026 - Josef Reidinger + +- Implement modification of kernel parameters when selinux pattern + is selected (gh#agama-project/agama#3103) + ------------------------------------------------------------------- Fri Jan 30 16:27:35 UTC 2026 - Ancor Gonzalez Sosa diff --git a/service/package/rubygem-agama-yast.changes b/service/package/rubygem-agama-yast.changes index 317df1ea3a..54c5e1616c 100644 --- a/service/package/rubygem-agama-yast.changes +++ b/service/package/rubygem-agama-yast.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 2 08:13:48 UTC 2026 - Josef Reidinger + +- Allow other parts to define in bootloader its proposed kernel + parameters (gh#agama-project/agama#3103) + ------------------------------------------------------------------- Fri Jan 30 16:21:23 UTC 2026 - Ancor Gonzalez Sosa diff --git a/web/package/agama-web-ui.changes b/web/package/agama-web-ui.changes index 4f2a2f0c3b..def0ed537e 100644 --- a/web/package/agama-web-ui.changes +++ b/web/package/agama-web-ui.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Feb 2 08:08:26 UTC 2026 - Josef Reidinger + +- Fix unselecting product preselected patterns + (gh#agama-project/agama#3103) + ------------------------------------------------------------------- Fri Jan 30 16:28:39 UTC 2026 - Ancor Gonzalez Sosa From 136b30bd04b11763a35299f6df941d87fa899c2c Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 2 Feb 2026 09:28:26 +0100 Subject: [PATCH 09/10] cargo fmt --- rust/agama-bootloader/src/message.rs | 7 ++----- rust/agama-bootloader/src/test_utils.rs | 6 +----- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/rust/agama-bootloader/src/message.rs b/rust/agama-bootloader/src/message.rs index 9e91f9e160..837a8492ee 100644 --- a/rust/agama-bootloader/src/message.rs +++ b/rust/agama-bootloader/src/message.rs @@ -18,10 +18,7 @@ // To contact SUSE LLC about this file by physical or electronic mail, you may // find current contact information at www.suse.com. -use agama_utils::{ - actor::Message, - api::bootloader::Config, -}; +use agama_utils::{actor::Message, api::bootloader::Config}; pub struct GetConfig; @@ -51,7 +48,7 @@ impl SetConfig { pub struct SetKernelArg { pub id: String, - pub value: String, + pub value: String, } impl Message for SetKernelArg { diff --git a/rust/agama-bootloader/src/test_utils.rs b/rust/agama-bootloader/src/test_utils.rs index 92b1092ac8..f0ddb0c9e5 100644 --- a/rust/agama-bootloader/src/test_utils.rs +++ b/rust/agama-bootloader/src/test_utils.rs @@ -22,11 +22,7 @@ use std::sync::Arc; -use agama_utils::{ - actor::Handler, - api::bootloader::Config, - issue, -}; +use agama_utils::{actor::Handler, api::bootloader::Config, issue}; use async_trait::async_trait; use tokio::sync::Mutex; From 7f38b0974f61d3f6f1bc73105525643704a2579b Mon Sep 17 00:00:00 2001 From: Josef Reidinger Date: Mon, 2 Feb 2026 13:04:30 +0100 Subject: [PATCH 10/10] Update rust/package/agama.changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Imobach González Sosa --- rust/package/agama.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/package/agama.changes b/rust/package/agama.changes index 780d67efbd..ee691dfba9 100644 --- a/rust/package/agama.changes +++ b/rust/package/agama.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Mon Feb 2 08:13:10 UTC 2026 - Josef Reidinger -- Implement modification of kernel parameters when selinux pattern +- Implement modification of kernel parameters when SELinux pattern is selected (gh#agama-project/agama#3103) -------------------------------------------------------------------