Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/agama-lib/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ pub enum ProfileError {
Unreachable(#[from] TransferError),
#[error("Jsonnet evaluation failed:\n{0}")]
EvaluationError(String),
#[error("I/O error")]
#[error("I/O error: {0}")]
InputOutputError(#[from] io::Error),
#[error("The profile is not a well-formed JSON file")]
FormatError(#[from] serde_json::Error),
Expand Down
1 change: 1 addition & 0 deletions rust/agama-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ serde_yaml = "0.9.34"
uuid = { version = "1.10.0", features = ["v4"] }
cidr = { version = "0.3.1", features = ["serde"] }
macaddr = { version = "1.0.1", features = ["serde_std"] }
fs-err = "3.2.0"

[dev-dependencies]
test-context = "0.4.1"
Expand Down
6 changes: 3 additions & 3 deletions rust/agama-utils/src/licenses.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

use crate::api::manager::{InvalidLanguageCode, LanguageTag, License, LicenseContent};
use agama_locale_data::get_territories;
use fs_err::read_dir;
use std::{
collections::HashMap,
fs::read_dir,
path::{Path, PathBuf},
};
use thiserror::Error;
Expand All @@ -33,7 +33,7 @@ use thiserror::Error;
pub enum Error {
#[error("Not a valid language code: {0}")]
InvalidLanguageCode(#[from] InvalidLanguageCode),
#[error("I/O error")]
#[error("I/O error: {0}")]
IO(#[from] std::io::Error),
}

Expand Down Expand Up @@ -117,7 +117,7 @@ impl Registry {
///
/// * `path`: directory to search translations.
fn find_translations(path: &PathBuf) -> Result<Vec<LanguageTag>, std::io::Error> {
let entries = read_dir(path).unwrap().filter_map(|entry| entry.ok());
let entries = read_dir(path)?.filter_map(|entry| entry.ok());

let files = entries
.filter(|entry| entry.file_type().is_ok_and(|f| f.is_file()))
Expand Down
3 changes: 3 additions & 0 deletions rust/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ install6 -D -t "${DESTDIR}${unitdir}" "${SRCDIR}"/share/agama-autoinstall.servic
install6 -D -t "${DESTDIR}${unitdir}" "${SRCDIR}"/share/agama-scripts.service
install6 -D -t "${DESTDIR}${unitdir}" "${SRCDIR}"/share/agama-web-server.service

# instal licenses
install6 -D -t "${DESTDIR}${datadir}"/agama/eula/license.final "${SRCDIR}"/share/eula/license.final/*
Copy link
Contributor Author

@mvidner mvidner Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does look a bit suspicious, more like testing data than the real thing, but we can improve upon that while we have a not-crashing agama-web-server.

$ ls /usr/share/agama/eula/license.final/
license.es.txt  license.txt  license.zh_CN.txt


# install manpages
install6 -D -t "${DESTDIR}${mandir}"/man1 "${SRCDIR}"/out/man/*

Expand Down
Loading