From 26f03f9e53b0ade01b2f9067e4e88a750534c561 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 1 Mar 2023 13:44:44 +0100 Subject: [PATCH] use proxmox-sortable-macro directly instead of via proxmox-sys Signed-off-by: Wolfgang Bumiller --- Cargo.toml | 4 +++- proxmox-backup-client/Cargo.toml | 3 ++- proxmox-backup-client/src/mount.rs | 2 +- proxmox-restore-daemon/Cargo.toml | 3 ++- proxmox-restore-daemon/src/proxmox_restore_daemon/api.rs | 2 +- src/api2/access/mod.rs | 2 +- src/api2/access/openid.rs | 2 +- src/api2/admin/datastore.rs | 2 +- src/api2/admin/mod.rs | 2 +- src/api2/admin/prune.rs | 2 +- src/api2/admin/sync.rs | 2 +- src/api2/admin/verify.rs | 2 +- src/api2/backup/mod.rs | 2 +- src/api2/backup/upload_chunk.rs | 2 +- src/api2/config/access/mod.rs | 2 +- src/api2/config/metrics/mod.rs | 2 +- src/api2/config/mod.rs | 2 +- src/api2/config/remote.rs | 2 +- src/api2/mod.rs | 2 +- src/api2/node/disks/mod.rs | 3 ++- src/api2/node/mod.rs | 2 +- src/api2/node/services.rs | 2 +- src/api2/node/tasks.rs | 2 +- src/api2/reader/mod.rs | 2 +- src/api2/tape/drive.rs | 2 +- 25 files changed, 30 insertions(+), 25 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2c3ed6c11..6fca3c4ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -72,6 +72,7 @@ proxmox-schema = "1.3.6" proxmox-section-config = "1" proxmox-serde = "0.1.1" proxmox-shared-memory = "0.2.3" +proxmox-sortable-macro = "0.1.2" proxmox-subscription = { version = "0.3", features = [ "api-types" ] } proxmox-sys = "0.4.2" proxmox-tfa = { version = "2.1", features = [ "api", "api-types" ] } @@ -214,8 +215,9 @@ proxmox-schema = { workspace = true, features = [ "api-macro" ] } proxmox-section-config.workspace = true proxmox-serde = { workspace = true, features = [ "serde_json" ] } proxmox-shared-memory.workspace = true +proxmox-sortable-macro.workspace = true proxmox-subscription.workspace = true -proxmox-sys = { workspace = true, features = [ "sortable-macro", "timer" ] } +proxmox-sys = { workspace = true, features = [ "timer" ] } proxmox-tfa.workspace = true proxmox-time.workspace = true proxmox-uuid.workspace = true diff --git a/proxmox-backup-client/Cargo.toml b/proxmox-backup-client/Cargo.toml index 0d8783f8e..89a47111d 100644 --- a/proxmox-backup-client/Cargo.toml +++ b/proxmox-backup-client/Cargo.toml @@ -28,7 +28,8 @@ proxmox-fuse.workspace = true proxmox-io.workspace = true proxmox-router = { workspace = true, features = [ "cli" ] } proxmox-schema = { workspace = true, features = [ "api-macro" ] } -proxmox-sys = { workspace = true, features = [ "sortable-macro" ] } +proxmox-sortable-macro.workspace = true +proxmox-sys.workspace = true proxmox-time.workspace = true pbs-api-types.workspace = true diff --git a/proxmox-backup-client/src/mount.rs b/proxmox-backup-client/src/mount.rs index 6810c19cd..242556d04 100644 --- a/proxmox-backup-client/src/mount.rs +++ b/proxmox-backup-client/src/mount.rs @@ -15,7 +15,7 @@ use tokio::signal::unix::{signal, SignalKind}; use proxmox_router::{cli::*, ApiHandler, ApiMethod, RpcEnvironment}; use proxmox_schema::*; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; use pbs_api_types::BackupNamespace; use pbs_client::tools::key_source::get_encryption_key_password; diff --git a/proxmox-restore-daemon/Cargo.toml b/proxmox-restore-daemon/Cargo.toml index 08f77d886..161b371d3 100644 --- a/proxmox-restore-daemon/Cargo.toml +++ b/proxmox-restore-daemon/Cargo.toml @@ -31,7 +31,8 @@ proxmox-compression.workspace = true proxmox-rest-server.workspace = true proxmox-router = { workspace = true, features = [ "cli", "server" ] } proxmox-schema = { workspace = true, features = [ "api-macro" ] } -proxmox-sys = { workspace = true, features = [ "sortable-macro" ] } +proxmox-sortable-macro.workspace = true +proxmox-sys.workspace = true proxmox-time.workspace = true pbs-api-types.workspace = true diff --git a/proxmox-restore-daemon/src/proxmox_restore_daemon/api.rs b/proxmox-restore-daemon/src/proxmox_restore_daemon/api.rs index dd2a13cfe..fef7ba9b7 100644 --- a/proxmox-restore-daemon/src/proxmox_restore_daemon/api.rs +++ b/proxmox-restore-daemon/src/proxmox_restore_daemon/api.rs @@ -20,7 +20,7 @@ use proxmox_router::{ }; use proxmox_schema::*; use proxmox_sys::fs::read_subdir; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; use pbs_api_types::file_restore::{FileRestoreFormat, RestoreDaemonStatus}; use pbs_client::pxar::{create_archive, Flags, PxarCreateOptions, ENCODER_MAX_ENTRIES}; diff --git a/src/api2/access/mod.rs b/src/api2/access/mod.rs index d3e21763b..820853760 100644 --- a/src/api2/access/mod.rs +++ b/src/api2/access/mod.rs @@ -10,7 +10,7 @@ use proxmox_router::{ http_err, list_subdirs_api_method, Permission, Router, RpcEnvironment, SubdirMap, }; use proxmox_schema::api; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; use pbs_api_types::{ Authid, Userid, ACL_PATH_SCHEMA, PASSWORD_SCHEMA, PRIVILEGES, PRIV_PERMISSIONS_MODIFY, diff --git a/src/api2/access/openid.rs b/src/api2/access/openid.rs index 095726fd1..7154b0862 100644 --- a/src/api2/access/openid.rs +++ b/src/api2/access/openid.rs @@ -6,7 +6,7 @@ use proxmox_router::{ http_err, list_subdirs_api_method, Permission, Router, RpcEnvironment, SubdirMap, }; use proxmox_schema::api; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; use proxmox_openid::{OpenIdAuthenticator, OpenIdConfig}; diff --git a/src/api2/admin/datastore.rs b/src/api2/admin/datastore.rs index 8d3a61462..2fdef99e4 100644 --- a/src/api2/admin/datastore.rs +++ b/src/api2/admin/datastore.rs @@ -25,7 +25,7 @@ use proxmox_schema::*; use proxmox_sys::fs::{ file_read_firstline, file_read_optional_string, replace_file, CreateOptions, }; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; use proxmox_sys::{task_log, task_warn}; use pxar::accessor::aio::Accessor; diff --git a/src/api2/admin/mod.rs b/src/api2/admin/mod.rs index 9b6fc9add..168dc038d 100644 --- a/src/api2/admin/mod.rs +++ b/src/api2/admin/mod.rs @@ -2,7 +2,7 @@ use proxmox_router::list_subdirs_api_method; use proxmox_router::{Router, SubdirMap}; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; pub mod datastore; pub mod metrics; diff --git a/src/api2/admin/prune.rs b/src/api2/admin/prune.rs index 2edf52f44..a5ebf2975 100644 --- a/src/api2/admin/prune.rs +++ b/src/api2/admin/prune.rs @@ -7,7 +7,7 @@ use proxmox_router::{ list_subdirs_api_method, ApiMethod, Permission, Router, RpcEnvironment, SubdirMap, }; use proxmox_schema::api; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; use pbs_api_types::{ Authid, PruneJobConfig, PruneJobStatus, DATASTORE_SCHEMA, JOB_ID_SCHEMA, PRIV_DATASTORE_AUDIT, diff --git a/src/api2/admin/sync.rs b/src/api2/admin/sync.rs index e2a7e7a6b..4e2ba0be8 100644 --- a/src/api2/admin/sync.rs +++ b/src/api2/admin/sync.rs @@ -8,7 +8,7 @@ use proxmox_router::{ SubdirMap, }; use proxmox_schema::api; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; use pbs_api_types::{Authid, SyncJobConfig, SyncJobStatus, DATASTORE_SCHEMA, JOB_ID_SCHEMA}; use pbs_config::sync; diff --git a/src/api2/admin/verify.rs b/src/api2/admin/verify.rs index 52635bed4..66695236c 100644 --- a/src/api2/admin/verify.rs +++ b/src/api2/admin/verify.rs @@ -8,7 +8,7 @@ use proxmox_router::{ SubdirMap, }; use proxmox_schema::api; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; use pbs_api_types::{ Authid, VerificationJobConfig, VerificationJobStatus, DATASTORE_SCHEMA, JOB_ID_SCHEMA, diff --git a/src/api2/backup/mod.rs b/src/api2/backup/mod.rs index 0ebadaa5a..652d5baa5 100644 --- a/src/api2/backup/mod.rs +++ b/src/api2/backup/mod.rs @@ -14,7 +14,7 @@ use proxmox_router::{ ApiHandler, ApiMethod, ApiResponseFuture, Permission, Router, RpcEnvironment, SubdirMap, }; use proxmox_schema::*; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; use pbs_api_types::{ Authid, BackupNamespace, BackupType, Operation, SnapshotVerifyState, VerifyState, diff --git a/src/api2/backup/upload_chunk.rs b/src/api2/backup/upload_chunk.rs index 78d695371..20259660a 100644 --- a/src/api2/backup/upload_chunk.rs +++ b/src/api2/backup/upload_chunk.rs @@ -11,7 +11,7 @@ use serde_json::{json, Value}; use proxmox_router::{ApiHandler, ApiMethod, ApiResponseFuture, RpcEnvironment}; use proxmox_schema::*; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; use pbs_api_types::{BACKUP_ARCHIVE_NAME_SCHEMA, CHUNK_DIGEST_SCHEMA}; use pbs_datastore::file_formats::{DataBlobHeader, EncryptedDataBlobHeader}; diff --git a/src/api2/config/access/mod.rs b/src/api2/config/access/mod.rs index a75d89b4e..614bd5e6c 100644 --- a/src/api2/config/access/mod.rs +++ b/src/api2/config/access/mod.rs @@ -1,6 +1,6 @@ use proxmox_router::list_subdirs_api_method; use proxmox_router::{Router, SubdirMap}; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; pub mod ldap; pub mod openid; diff --git a/src/api2/config/metrics/mod.rs b/src/api2/config/metrics/mod.rs index 6af04f930..98904660c 100644 --- a/src/api2/config/metrics/mod.rs +++ b/src/api2/config/metrics/mod.rs @@ -1,6 +1,6 @@ use proxmox_router::list_subdirs_api_method; use proxmox_router::{Router, SubdirMap}; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; pub mod influxdbhttp; pub mod influxdbudp; diff --git a/src/api2/config/mod.rs b/src/api2/config/mod.rs index 265b6fc86..6cfeaea10 100644 --- a/src/api2/config/mod.rs +++ b/src/api2/config/mod.rs @@ -2,7 +2,7 @@ use proxmox_router::list_subdirs_api_method; use proxmox_router::{Router, SubdirMap}; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; pub mod access; pub mod acme; diff --git a/src/api2/config/remote.rs b/src/api2/config/remote.rs index 2f02d1215..76dd3b899 100644 --- a/src/api2/config/remote.rs +++ b/src/api2/config/remote.rs @@ -5,7 +5,7 @@ use pbs_api_types::BackupNamespace; use pbs_api_types::NamespaceListItem; use proxmox_router::list_subdirs_api_method; use proxmox_router::SubdirMap; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; use serde_json::Value; use proxmox_router::{http_bail, http_err, ApiMethod, Permission, Router, RpcEnvironment}; diff --git a/src/api2/mod.rs b/src/api2/mod.rs index 2a83020cc..b404bbdb9 100644 --- a/src/api2/mod.rs +++ b/src/api2/mod.rs @@ -1,6 +1,6 @@ //! The Proxmox Backup Server API -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; pub mod access; pub mod admin; diff --git a/src/api2/node/disks/mod.rs b/src/api2/node/disks/mod.rs index c16be46aa..5ee959cd3 100644 --- a/src/api2/node/disks/mod.rs +++ b/src/api2/node/disks/mod.rs @@ -5,7 +5,8 @@ use proxmox_router::{ list_subdirs_api_method, Permission, Router, RpcEnvironment, RpcEnvironmentType, SubdirMap, }; use proxmox_schema::api; -use proxmox_sys::{sortable, task_log}; +use proxmox_sortable_macro::sortable; +use proxmox_sys::task_log; use pbs_api_types::{ BLOCKDEVICE_NAME_SCHEMA, NODE_SCHEMA, PRIV_SYS_AUDIT, PRIV_SYS_MODIFY, UPID_SCHEMA, diff --git a/src/api2/node/mod.rs b/src/api2/node/mod.rs index 763e6ea9e..339aadff1 100644 --- a/src/api2/node/mod.rs +++ b/src/api2/node/mod.rs @@ -13,7 +13,7 @@ use serde_json::{json, Value}; use tokio::io::{AsyncBufReadExt, BufReader}; use proxmox_sys::fd::fd_change_cloexec; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; use proxmox_http::websocket::WebSocket; use proxmox_router::list_subdirs_api_method; diff --git a/src/api2/node/services.rs b/src/api2/node/services.rs index 3d3b8501f..4a73b42d7 100644 --- a/src/api2/node/services.rs +++ b/src/api2/node/services.rs @@ -5,7 +5,7 @@ use serde_json::{json, Value}; use proxmox_router::{list_subdirs_api_method, Permission, Router, RpcEnvironment, SubdirMap}; use proxmox_schema::api; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; use pbs_api_types::{Authid, NODE_SCHEMA, PRIV_SYS_AUDIT, PRIV_SYS_MODIFY, SERVICE_ID_SCHEMA}; diff --git a/src/api2/node/tasks.rs b/src/api2/node/tasks.rs index d386f805f..0f43aaf40 100644 --- a/src/api2/node/tasks.rs +++ b/src/api2/node/tasks.rs @@ -14,7 +14,7 @@ use proxmox_router::{ RpcEnvironment, SubdirMap, }; use proxmox_schema::{api, BooleanSchema, IntegerSchema, ObjectSchema, Schema}; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; use pbs_api_types::{ Authid, TaskListItem, TaskStateType, Tokenname, Userid, DATASTORE_SCHEMA, NODE_SCHEMA, diff --git a/src/api2/reader/mod.rs b/src/api2/reader/mod.rs index 1ac4ac402..b1a5612b0 100644 --- a/src/api2/reader/mod.rs +++ b/src/api2/reader/mod.rs @@ -14,7 +14,7 @@ use proxmox_router::{ Router, RpcEnvironment, SubdirMap, }; use proxmox_schema::{BooleanSchema, ObjectSchema}; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; use pbs_api_types::{ Authid, Operation, BACKUP_ARCHIVE_NAME_SCHEMA, BACKUP_ID_SCHEMA, BACKUP_NAMESPACE_SCHEMA, diff --git a/src/api2/tape/drive.rs b/src/api2/tape/drive.rs index 2d4655376..020dd492b 100644 --- a/src/api2/tape/drive.rs +++ b/src/api2/tape/drive.rs @@ -10,7 +10,7 @@ use proxmox_router::{ }; use proxmox_schema::api; use proxmox_section_config::SectionConfigData; -use proxmox_sys::sortable; +use proxmox_sortable_macro::sortable; use proxmox_sys::{task_log, task_warn}; use proxmox_uuid::Uuid;