Skip to content

Commit cb7a925

Browse files
committed
Merge branch 'master' into agama_config_return_codes
2 parents 4de4c7e + de76056 commit cb7a925

File tree

22 files changed

+99
-63
lines changed

22 files changed

+99
-63
lines changed

live/src/agama-installer.changes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
-------------------------------------------------------------------
2+
Fri Mar 20 07:25:55 UTC 2026 - Josef Reidinger <jreidinger@suse.com>
3+
4+
- Replace plymouth with blog-plymouth on s390x (bsc#1254326)
5+
16
-------------------------------------------------------------------
27
Wed Mar 18 15:30:54 UTC 2026 - Josef Reidinger <jreidinger@suse.com>
38

live/src/agama-installer.kiwi

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,11 @@
128128
<!-- image cleanup tool -->
129129
<package name="image-janitor"/>
130130
<!-- plymouth bsc#1248507 -->
131-
<package name="plymouth" />
132-
<package name="plymouth-dracut" />
131+
<package name="plymouth" arch="aarch64,x86_64,ppc64le" />
132+
<package name="plymouth-dracut" arch="aarch64,x86_64,ppc64le" />
133+
<!-- and s390 specific plymouth bsc#1248507 -->
134+
<package name="blog-plymouth" arch="s390x" />
135+
133136
</packages>
134137

135138
<!-- packages for local installation (desktop, browser, etc.) -->
@@ -155,7 +158,7 @@
155158
<package name="openSUSE-build-key"/>
156159
<package name="patterns-openSUSE-base"/>
157160
<package name="staging-build-key"/>
158-
<package name="plymouth-branding-openSUSE" />
161+
<package name="plymouth-branding-openSUSE" arch="aarch64,x86_64,ppc64le" />
159162
</packages>
160163
<!-- additional packages for the Leap distributions -->
161164
<packages type="image" profiles="Leap_16.1">

rust/agama-manager/src/actions.rs

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,12 +294,9 @@ impl SetConfigAction {
294294
.await?;
295295
}
296296

297-
if let Some(network) = config.network.clone() {
298-
self.progress
299-
.call(progress::message::Next::new(Scope::Manager))
300-
.await?;
301-
self.network.update_config(network).await?;
302-
self.network.apply().await?;
297+
// FIXME: report the error in a proper way.
298+
if let Err(error) = self.set_network(&config).await {
299+
tracing::error!("Failed to set up the network: {error}");
303300
}
304301

305302
match &product {
@@ -345,6 +342,20 @@ impl SetConfigAction {
345342

346343
Ok(())
347344
}
345+
346+
async fn set_network(&self, config: &Config) -> Result<(), service::Error> {
347+
let Some(network) = config.network.clone() else {
348+
return Ok(());
349+
};
350+
351+
self.progress
352+
.call(progress::message::Next::new(Scope::Manager))
353+
.await?;
354+
self.network.update_config(network).await?;
355+
self.network.apply().await?;
356+
357+
Ok(())
358+
}
348359
}
349360

350361
/// Implements the finish action.

rust/agama-manager/src/service.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,6 @@ impl MessageHandler<message::SetConfig> for Service {
730730
/// Sets the user configuration with the given values.
731731
async fn handle(&mut self, message: message::SetConfig) -> Result<(), Error> {
732732
checks::check_stage(&self.progress, Stage::Configuring).await?;
733-
tracing::debug!("DEBUG: SetConfig handler (calling set_config)");
734733
self.set_config(message.config).await
735734
}
736735
}

rust/agama-server/src/server/web.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,10 @@ async fn get_config(State(state): State<ServerState>) -> ServerResult<Json<Confi
210210
put,
211211
path = "/config",
212212
context_path = "/api/v2",
213+
request_body(content = Value, description = "Configuration to apply."),
213214
responses(
214215
(status = 200, description = "The configuration was replaced. Other operations can be running in background."),
215216
(status = 400, description = "Not possible to replace the configuration.")
216-
),
217-
params(
218-
("config" = Value, description = "Configuration to apply.")
219217
)
220218
)]
221219
async fn put_config(State(state): State<ServerState>, Json(json): Json<Value>) -> ServerResult<()> {
@@ -232,12 +230,10 @@ async fn put_config(State(state): State<ServerState>, Json(json): Json<Value>) -
232230
patch,
233231
path = "/config",
234232
context_path = "/api/v2",
233+
request_body(content = Patch, description = "Changes in the configuration."),
235234
responses(
236235
(status = 200, description = "The configuration was patched. Other operations can be running in background."),
237236
(status = 400, description = "Not possible to patch the configuration.")
238-
),
239-
params(
240-
("patch" = Patch, description = "Changes in the configuration.")
241237
)
242238
)]
243239
async fn patch_config(
@@ -410,13 +406,11 @@ async fn get_license(
410406
post,
411407
path = "/action",
412408
context_path = "/api/v2",
409+
request_body(content = Action, description = "Description of the action to run."),
413410
responses(
414411
(status = 200, description = "Action successfully ran."),
415412
(status = 400, description = "Not possible to run the action.", body = Object),
416413
(status = 422, description = "Action blocked by backend state", body = Object)
417-
),
418-
params(
419-
("action" = Action, description = "Description of the action to run."),
420414
)
421415
)]
422416
async fn run_action(

rust/package/agama.changes

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
-------------------------------------------------------------------
2-
Thu Mar 19 15:46:19 UTC 2026 - Knut Anderssen <kanderssen@suse.com>
2+
Fri Mar 20 08:46:19 UTC 2026 - Knut Anderssen <kanderssen@suse.com>
33

44
- Return error code when using "agama config generate",
55
"agama config load" or "agama config validate" does not validate
66
the given profile (bsc#1256951, gh#agama-project/agama#3304).
77

8+
-------------------------------------------------------------------
9+
Fri Mar 20 07:54:46 UTC 2026 - Knut Anderssen <kanderssen@suse.com>
10+
11+
- Fix incorrect openAPI parameters (gh#agama-project/agama#3299).
12+
- Do not define params for POST '/api/v2/action'
13+
- Do not define params for PUT and PATCH '/api/v2/config
14+
15+
-------------------------------------------------------------------
16+
Thu Mar 19 21:11:29 UTC 2026 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>
17+
18+
- Continue loading the configuration even if there is a network setup
19+
error (gh#agama-project/agama#3306).
20+
821
-------------------------------------------------------------------
922
Wed Mar 18 22:29:10 UTC 2026 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>
1023

service/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
agama-yast (19.devel14.752a116e9)
4+
agama-yast (19.devel25.2db95cd44)
55
cfa (~> 1.0.2)
66
cfa_grub2 (~> 2.0.0)
77
cheetah (~> 1.0.0)

service/lib/agama/autoyast/connections_reader.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,11 @@ def ipv6?
6363
# @return [Hash]
6464
def read_connection(interface)
6565
conn = {}
66-
conn["interface"] = interface.device unless interface.device.to_s.empty?
67-
conn["id"] = interface.name if interface.name
66+
if !interface.device.to_s.empty?
67+
conn["interface"] = interface.device
68+
conn["id"] = interface.device
69+
end
70+
conn["id"] = interface.name unless interface.name.to_s.empty?
6871

6972
addresses = read_addresses(interface)
7073
method4, method6 = read_methods(interface)

service/package/rubygem-agama-yast.changes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
-------------------------------------------------------------------
2+
Thu Mar 19 21:12:15 UTC 2026 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>
3+
4+
- AutoYaST support: use the connection "device" as fallback for network
5+
connections with no "name" (gh#agama-project/agama#3306).
6+
17
-------------------------------------------------------------------
28
Wed Mar 18 23:44:14 UTC 2026 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>
39

service/test/agama/autoyast/connections_reader_test.rb

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,32 @@
4949
end
5050
end
5151

52+
context "when the connection has a \"device\"" do
53+
let(:interfaces) do
54+
[{ "device" => "eth1" }]
55+
end
56+
57+
it "uses the \"device\" as \"id\" and \"interface\"" do
58+
connections = subject.read["connections"]
59+
conn = connections.first
60+
expect(conn["id"]).to eq("eth1")
61+
expect(conn["interface"]).to eq("eth1")
62+
end
63+
end
64+
65+
context "when the connection has a \"name\"" do
66+
let(:interfaces) do
67+
[{ "name" => "eth0" }]
68+
end
69+
70+
it "uses the \"name\" as \"id\"" do
71+
connections = subject.read["connections"]
72+
conn = connections.first
73+
expect(conn["id"]).to eq("eth0")
74+
expect(conn["interface"]).to be_nil
75+
end
76+
end
77+
5278
context "when bootproto is set to DHCP" do
5379
it "sets method4 to 'auto'" do
5480
connections = subject.read["connections"]

0 commit comments

Comments
 (0)