## Problem - When manually injecting an autoinstallatino profile into the installation medium it is not used automatically. Agama should support autoloading the profile from this location. ## Solution - Autoload the installation profile from the medium root - Use journal logging with more details in the autoinstallation CLI tool (log to stdout when running manually) - Not finding any profile in the predefined locations is not reported as an error - I refactored the code to share the part for initializing the logger ## Testing - Tested manually - You can inject an installation profile using this command: ``` xorriso -indev agama.iso -outdev agama-auto.iso -boot_image any replay -map profile.json /autoinst.json ``` Where `agama.iso` is the input ISO, `agama-auto.iso` is the new modified ISO and the `profile.json` is the autoinstallation profile copied to the` /autoinst.json` location in the new ISO. ## Screenshots When running the autoinstallation manually from the terminal the log is printed on the console. When running from the systemd service the logging is redirected to the journal. The example journal output below contains two service runs, the initial one with the original client, the second one is started after patching the client with this pull request. The new log contains more details (source code locations) and can distinguish between info, warnings and errors (not shown in this case). <img width="1280" height="800" alt="agama-autoinst-logging" src="https://github.com/user-attachments/assets/4ea300d6-3db3-4325-bbc8-c1c7ef1006be" /> ## Notes If we want to have a less verbose output on CLI we could modify the logger to be quiet when the output goes to the terminal and add `--verbose` option to have it verbose always. But I think it is OK to have those details by default, it will be useful for debugging later.
45 lines
1.4 KiB
TOML
45 lines
1.4 KiB
TOML
[package]
|
|
name = "agama-lib"
|
|
version = "1.0.0"
|
|
edition = "2021"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[dependencies]
|
|
anyhow = "1.0"
|
|
agama-utils = { path = "../agama-utils" }
|
|
agama-transfer = { path = "../agama-transfer" }
|
|
jsonschema = { version = "0.30.0", default-features = false, features = [
|
|
"resolve-file",
|
|
] }
|
|
log = "0.4"
|
|
reqwest = { version = "0.12.8", features = ["json", "cookies"] }
|
|
serde = { version = "1.0.210", features = ["derive"] }
|
|
serde_json = { version = "1.0.128", features = ["raw_value"] }
|
|
tempfile = "3.13.0"
|
|
thiserror = "2.0.12"
|
|
tokio = { version = "1.40.0", features = ["macros", "rt-multi-thread"] }
|
|
tokio-stream = "0.1.16"
|
|
tracing = "0.1.44"
|
|
url = { version = "2.5.2", features = ["serde"] }
|
|
utoipa = { version = "5.2.0", features = ["url"] }
|
|
zbus = { version = "5", default-features = false, features = ["tokio"] }
|
|
jsonwebtoken = "9.3.0"
|
|
chrono = { version = "0.4.38", default-features = false, features = [
|
|
"now",
|
|
"std",
|
|
"alloc",
|
|
"clock",
|
|
] }
|
|
home = "0.5.9"
|
|
fs_extra = "1.3.0"
|
|
fluent-uri = { version = "0.4.1", features = ["serde"] }
|
|
tokio-tungstenite = { version = "0.26.2", features = ["native-tls"] }
|
|
tokio-native-tls = "0.3.1"
|
|
percent-encoding = "2.3.1"
|
|
uuid = { version = "1.17.0", features = ["serde", "v4"] }
|
|
zypp-agama = { path = "../zypp-agama" }
|
|
|
|
[dev-dependencies]
|
|
httpmock = "0.7.0"
|
|
env_logger = "0.11.5"
|