From efc5058815bd326a7b5d2dfc8b3dda5222e150c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Thu, 19 Dec 2024 11:28:24 +0000 Subject: [PATCH 1/2] fix(rust): several schema validation fixes --- rust/agama-lib/share/profile.schema.json | 22 +++++++++++++++++++--- rust/agama-lib/src/product/settings.rs | 2 ++ rust/agama-lib/src/users/settings.rs | 1 + 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/rust/agama-lib/share/profile.schema.json b/rust/agama-lib/share/profile.schema.json index d71f7576d0..0327410ee5 100644 --- a/rust/agama-lib/share/profile.schema.json +++ b/rust/agama-lib/share/profile.schema.json @@ -96,8 +96,8 @@ "title": "The name of the network interface bound to this connection", "type": "string" }, - "mac-address": { - "title": "Custom mac-address", + "macAddress": { + "title": "Custom MAC address", "description": "Can also be 'preserve', 'permanent', 'random' or 'stable'.", "type": "string" }, @@ -149,10 +149,21 @@ "additionalProperties": false } }, - "ignore_auto_dns": { + "ignoreAutoDns": { "description": "Whether DNS options provided via DHCP are used or not", "type": "boolean" }, + "status": { + "title": "Connection status", + "description": "The status of the connection", + "type": "string", + "enum": ["up", "down", "removed"] + }, + "autoconnect": { + "title": "Auto-connected", + "description": "Whether the connection should be automatically connected", + "type": "boolean" + }, "wireless": { "type": "object", "title": "Wireless configuration", @@ -389,6 +400,11 @@ "hashedPassword": { "title": "Flag for hashed password (true) or plain text password (false or not defined)", "type": "boolean" + }, + "autologin": { + "title": "Automatic user login", + "description": "Whether the user should be automatically logged in (only relevant in desktop systems)", + "type": "boolean" } }, "required": ["fullName", "userName", "password"] diff --git a/rust/agama-lib/src/product/settings.rs b/rust/agama-lib/src/product/settings.rs index d7a050941f..10c6b23569 100644 --- a/rust/agama-lib/src/product/settings.rs +++ b/rust/agama-lib/src/product/settings.rs @@ -28,6 +28,8 @@ use serde::{Deserialize, Serialize}; pub struct ProductSettings { /// ID of the product to install (e.g., "ALP", "Tumbleweed", etc.) pub id: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub registration_code: Option, + #[serde(skip_serializing_if = "Option::is_none")] pub registration_email: Option, } diff --git a/rust/agama-lib/src/users/settings.rs b/rust/agama-lib/src/users/settings.rs index 546e5de193..18da06a493 100644 --- a/rust/agama-lib/src/users/settings.rs +++ b/rust/agama-lib/src/users/settings.rs @@ -62,5 +62,6 @@ pub struct RootUserSettings { #[serde(skip_serializing)] pub hashed_password: Option, /// Root SSH public key + #[serde(skip_serializing_if = "Option::is_none")] pub ssh_public_key: Option, } From f218f491eb5744c8c81146ccabda20294467fa11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Thu, 19 Dec 2024 11:39:20 +0000 Subject: [PATCH 2/2] doc(rust): update changes file --- rust/package/agama.changes | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rust/package/agama.changes b/rust/package/agama.changes index 7206b9c89f..13aa7307a3 100644 --- a/rust/package/agama.changes +++ b/rust/package/agama.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Dec 19 11:39:14 UTC 2024 - Imobach Gonzalez Sosa + +- Fix several validation issues (gh#agama-project/agama#1845). + ------------------------------------------------------------------- Wed Dec 18 12:32:00 UTC 2024 - Imobach Gonzalez Sosa