From ae36e6fd775a09c1f590ef8cc73591d2340dc370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Tue, 5 Mar 2024 16:07:11 +0000 Subject: [PATCH] rust: fix the agama-server crate name --- rust/Cargo.lock | 86 +++++++++++----------- rust/agama-server/Cargo.toml | 2 +- rust/agama-server/src/agama-dbus-server.rs | 2 +- rust/agama-server/src/agama-web-server.rs | 4 +- rust/agama-server/tests/l10n.rs | 2 +- rust/agama-server/tests/network.rs | 10 +-- rust/agama-server/tests/service.rs | 2 +- 7 files changed, 54 insertions(+), 54 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index cc576c6eaf..7d48a4957c 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -41,49 +41,6 @@ dependencies = [ "zbus", ] -[[package]] -name = "agama-dbus-server" -version = "0.1.0" -dependencies = [ - "agama-lib", - "agama-locale-data", - "anyhow", - "async-trait", - "axum", - "axum-extra", - "chrono", - "cidr", - "clap", - "config", - "gettext-rs", - "http-body-util", - "jsonwebtoken", - "log", - "macaddr", - "once_cell", - "pam", - "rand", - "regex", - "serde", - "serde_json", - "serde_with", - "serde_yaml", - "simplelog", - "systemd-journal-logger", - "thiserror", - "tokio", - "tokio-stream", - "tower", - "tower-http", - "tracing", - "tracing-journald", - "tracing-subscriber", - "utoipa", - "uuid", - "zbus", - "zbus_macros", -] - [[package]] name = "agama-derive" version = "1.0.0" @@ -129,6 +86,49 @@ dependencies = [ "thiserror", ] +[[package]] +name = "agama-server" +version = "0.1.0" +dependencies = [ + "agama-lib", + "agama-locale-data", + "anyhow", + "async-trait", + "axum", + "axum-extra", + "chrono", + "cidr", + "clap", + "config", + "gettext-rs", + "http-body-util", + "jsonwebtoken", + "log", + "macaddr", + "once_cell", + "pam", + "rand", + "regex", + "serde", + "serde_json", + "serde_with", + "serde_yaml", + "simplelog", + "systemd-journal-logger", + "thiserror", + "tokio", + "tokio-stream", + "tower", + "tower-http", + "tracing", + "tracing-journald", + "tracing-subscriber", + "utoipa", + "uuid", + "zbus", + "zbus_macros", +] + [[package]] name = "agama-settings" version = "1.0.0" diff --git a/rust/agama-server/Cargo.toml b/rust/agama-server/Cargo.toml index 25cc8ccba5..def882c4a2 100644 --- a/rust/agama-server/Cargo.toml +++ b/rust/agama-server/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "agama-dbus-server" +name = "agama-server" version = "0.1.0" edition = "2021" rust-version.workspace = true diff --git a/rust/agama-server/src/agama-dbus-server.rs b/rust/agama-server/src/agama-dbus-server.rs index 3145228fd3..7643d6e0ec 100644 --- a/rust/agama-server/src/agama-dbus-server.rs +++ b/rust/agama-server/src/agama-dbus-server.rs @@ -1,4 +1,4 @@ -use agama_dbus_server::{ +use agama_server::{ l10n::{self, helpers}, network, questions, }; diff --git a/rust/agama-server/src/agama-web-server.rs b/rust/agama-server/src/agama-web-server.rs index af96034b34..53f1e217c1 100644 --- a/rust/agama-server/src/agama-web-server.rs +++ b/rust/agama-server/src/agama-web-server.rs @@ -1,10 +1,10 @@ use std::process::{ExitCode, Termination}; -use agama_dbus_server::{ +use agama_lib::connection_to; +use agama_server::{ l10n::helpers, web::{self, run_monitor}, }; -use agama_lib::connection_to; use clap::{Args, Parser, Subcommand}; use tokio::sync::broadcast::channel; use tracing_subscriber::prelude::*; diff --git a/rust/agama-server/tests/l10n.rs b/rust/agama-server/tests/l10n.rs index f2d0291c29..75d0e76109 100644 --- a/rust/agama-server/tests/l10n.rs +++ b/rust/agama-server/tests/l10n.rs @@ -1,6 +1,6 @@ pub mod common; -use agama_dbus_server::l10n::web::l10n_service; +use agama_server::l10n::web::l10n_service; use axum::{ body::Body, http::{Request, StatusCode}, diff --git a/rust/agama-server/tests/network.rs b/rust/agama-server/tests/network.rs index ed4b0037b2..e437331d9d 100644 --- a/rust/agama-server/tests/network.rs +++ b/rust/agama-server/tests/network.rs @@ -1,16 +1,16 @@ pub mod common; use self::common::{async_retry, DBusServer}; -use agama_dbus_server::network::{ - self, - model::{self, Ipv4Method, Ipv6Method}, - Adapter, NetworkAdapterError, NetworkService, NetworkState, -}; use agama_lib::network::{ settings::{self}, types::DeviceType, NetworkClient, }; +use agama_server::network::{ + self, + model::{self, Ipv4Method, Ipv6Method}, + Adapter, NetworkAdapterError, NetworkService, NetworkState, +}; use async_trait::async_trait; use cidr::IpInet; use std::error::Error; diff --git a/rust/agama-server/tests/service.rs b/rust/agama-server/tests/service.rs index 14c5c4ae0d..daa453af02 100644 --- a/rust/agama-server/tests/service.rs +++ b/rust/agama-server/tests/service.rs @@ -1,6 +1,6 @@ pub mod common; -use agama_dbus_server::{ +use agama_server::{ service, web::{generate_token, MainServiceBuilder, ServiceConfig}, };