From: Samuel Rufinatscha <s.rufinatscha@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup v5 1/5] acme: clean up ACME-related imports
Date: Thu, 8 Jan 2026 12:26:25 +0100 [thread overview]
Message-ID: <20260108112629.189670-6-s.rufinatscha@proxmox.com> (raw)
In-Reply-To: <20260108112629.189670-1-s.rufinatscha@proxmox.com>
Clean up ACME-related imports to make it easier to switch to
the factored out proxmox/ ACME implementation later.
Signed-off-by: Samuel Rufinatscha <s.rufinatscha@proxmox.com>
---
src/acme/plugin.rs | 3 +--
src/api2/config/acme.rs | 10 ++++------
src/api2/node/certificates.rs | 7 +++----
src/api2/types/acme.rs | 3 +--
src/bin/proxmox-backup-manager.rs | 12 +++++-------
src/bin/proxmox-backup-proxy.rs | 14 ++++++--------
src/config/acme/mod.rs | 3 +--
src/config/acme/plugin.rs | 2 +-
src/config/node.rs | 6 ++----
9 files changed, 24 insertions(+), 36 deletions(-)
diff --git a/src/acme/plugin.rs b/src/acme/plugin.rs
index f756e9b5..993d729b 100644
--- a/src/acme/plugin.rs
+++ b/src/acme/plugin.rs
@@ -19,11 +19,10 @@ use tokio::net::TcpListener;
use tokio::process::Command;
use proxmox_acme::{Authorization, Challenge};
+use proxmox_rest_server::WorkerTask;
use crate::acme::AcmeClient;
use crate::api2::types::AcmeDomain;
-use proxmox_rest_server::WorkerTask;
-
use crate::config::acme::plugin::{DnsPlugin, PluginData};
const PROXMOX_ACME_SH_PATH: &str = "/usr/share/proxmox-acme/proxmox-acme";
diff --git a/src/api2/config/acme.rs b/src/api2/config/acme.rs
index 35c3fb77..18671639 100644
--- a/src/api2/config/acme.rs
+++ b/src/api2/config/acme.rs
@@ -10,22 +10,20 @@ use serde::{Deserialize, Serialize};
use serde_json::{json, Value};
use tracing::{info, warn};
+use pbs_api_types::{Authid, PRIV_SYS_MODIFY};
+use proxmox_acme::types::AccountData as AcmeAccountData;
+use proxmox_acme::Account;
+use proxmox_rest_server::WorkerTask;
use proxmox_router::{
http_bail, list_subdirs_api_method, Permission, Router, RpcEnvironment, SubdirMap,
};
use proxmox_schema::{api, param_bail};
-use proxmox_acme::types::AccountData as AcmeAccountData;
-use proxmox_acme::Account;
-
-use pbs_api_types::{Authid, PRIV_SYS_MODIFY};
-
use crate::acme::AcmeClient;
use crate::api2::types::{AcmeAccountName, AcmeChallengeSchema, KnownAcmeDirectory};
use crate::config::acme::plugin::{
self, DnsPlugin, DnsPluginCore, DnsPluginCoreUpdater, PLUGIN_ID_SCHEMA,
};
-use proxmox_rest_server::WorkerTask;
pub(crate) const ROUTER: Router = Router::new()
.get(&list_subdirs_api_method!(SUBDIRS))
diff --git a/src/api2/node/certificates.rs b/src/api2/node/certificates.rs
index 61ef910e..6b1d87d2 100644
--- a/src/api2/node/certificates.rs
+++ b/src/api2/node/certificates.rs
@@ -5,23 +5,22 @@ use anyhow::{bail, format_err, Error};
use openssl::pkey::PKey;
use openssl::x509::X509;
use serde::{Deserialize, Serialize};
-use tracing::info;
+use tracing::{info, warn};
+use pbs_api_types::{NODE_SCHEMA, PRIV_SYS_MODIFY};
+use proxmox_rest_server::WorkerTask;
use proxmox_router::list_subdirs_api_method;
use proxmox_router::SubdirMap;
use proxmox_router::{Permission, Router, RpcEnvironment};
use proxmox_schema::api;
-use pbs_api_types::{NODE_SCHEMA, PRIV_SYS_MODIFY};
use pbs_buildcfg::configdir;
use pbs_tools::cert;
-use tracing::warn;
use crate::acme::AcmeClient;
use crate::api2::types::AcmeDomain;
use crate::config::node::NodeConfig;
use crate::server::send_certificate_renewal_mail;
-use proxmox_rest_server::WorkerTask;
pub const ROUTER: Router = Router::new()
.get(&list_subdirs_api_method!(SUBDIRS))
diff --git a/src/api2/types/acme.rs b/src/api2/types/acme.rs
index 210ebdbc..8661f9e8 100644
--- a/src/api2/types/acme.rs
+++ b/src/api2/types/acme.rs
@@ -1,9 +1,8 @@
use serde::{Deserialize, Serialize};
use serde_json::Value;
-use proxmox_schema::{api, ApiStringFormat, ApiType, Schema, StringSchema};
-
use pbs_api_types::{DNS_ALIAS_FORMAT, DNS_NAME_FORMAT, PROXMOX_SAFE_ID_FORMAT};
+use proxmox_schema::{api, ApiStringFormat, ApiType, Schema, StringSchema};
#[api(
properties: {
diff --git a/src/bin/proxmox-backup-manager.rs b/src/bin/proxmox-backup-manager.rs
index d9f41353..f8365070 100644
--- a/src/bin/proxmox-backup-manager.rs
+++ b/src/bin/proxmox-backup-manager.rs
@@ -5,10 +5,6 @@ use std::str::FromStr;
use anyhow::{format_err, Error};
use serde_json::{json, Value};
-use proxmox_router::{cli::*, RpcEnvironment};
-use proxmox_schema::api;
-use proxmox_sys::fs::CreateOptions;
-
use pbs_api_types::percent_encoding::percent_encode_component;
use pbs_api_types::{
BackupNamespace, GroupFilter, RateLimitConfig, SyncDirection, SyncJobConfig, DATASTORE_SCHEMA,
@@ -18,12 +14,14 @@ use pbs_api_types::{
VERIFICATION_OUTDATED_AFTER_SCHEMA, VERIFY_JOB_READ_THREADS_SCHEMA,
VERIFY_JOB_VERIFY_THREADS_SCHEMA,
};
+use proxmox_rest_server::wait_for_local_worker;
+use proxmox_router::{cli::*, RpcEnvironment};
+use proxmox_schema::api;
+use proxmox_sys::fs::CreateOptions;
+
use pbs_client::{display_task_log, view_task_result};
use pbs_config::sync;
use pbs_tools::json::required_string_param;
-
-use proxmox_rest_server::wait_for_local_worker;
-
use proxmox_backup::api2;
use proxmox_backup::client_helpers::connect_to_localhost;
use proxmox_backup::config;
diff --git a/src/bin/proxmox-backup-proxy.rs b/src/bin/proxmox-backup-proxy.rs
index 92a8cb3c..870208fe 100644
--- a/src/bin/proxmox-backup-proxy.rs
+++ b/src/bin/proxmox-backup-proxy.rs
@@ -9,27 +9,25 @@ use hyper::http::request::Parts;
use hyper::http::Response;
use hyper::StatusCode;
use hyper_util::server::graceful::GracefulShutdown;
+use openssl::ssl::SslAcceptor;
+use serde_json::{json, Value};
use tracing::level_filters::LevelFilter;
use tracing::{info, warn};
use url::form_urlencoded;
-use openssl::ssl::SslAcceptor;
-use serde_json::{json, Value};
-
use proxmox_http::Body;
use proxmox_http::RateLimiterTag;
use proxmox_lang::try_block;
+use proxmox_rest_server::{
+ cleanup_old_tasks, cookie_from_header, rotate_task_log_archive, ApiConfig, Redirector,
+ RestEnvironment, RestServer, WorkerTask,
+};
use proxmox_router::{RpcEnvironment, RpcEnvironmentType};
use proxmox_sys::fs::CreateOptions;
use proxmox_sys::logrotate::LogRotate;
use pbs_datastore::DataStore;
-use proxmox_rest_server::{
- cleanup_old_tasks, cookie_from_header, rotate_task_log_archive, ApiConfig, Redirector,
- RestEnvironment, RestServer, WorkerTask,
-};
-
use proxmox_backup::{
server::{
auth::check_pbs_auth,
diff --git a/src/config/acme/mod.rs b/src/config/acme/mod.rs
index 274a23fd..ac89ae5e 100644
--- a/src/config/acme/mod.rs
+++ b/src/config/acme/mod.rs
@@ -5,11 +5,10 @@ use std::path::Path;
use anyhow::{bail, format_err, Error};
use serde_json::Value;
+use pbs_api_types::PROXMOX_SAFE_ID_REGEX;
use proxmox_sys::error::SysError;
use proxmox_sys::fs::{file_read_string, CreateOptions};
-use pbs_api_types::PROXMOX_SAFE_ID_REGEX;
-
use crate::api2::types::{AcmeAccountName, AcmeChallengeSchema, KnownAcmeDirectory};
pub(crate) const ACME_DIR: &str = pbs_buildcfg::configdir!("/acme");
diff --git a/src/config/acme/plugin.rs b/src/config/acme/plugin.rs
index 18e71199..8ce852ec 100644
--- a/src/config/acme/plugin.rs
+++ b/src/config/acme/plugin.rs
@@ -4,10 +4,10 @@ use anyhow::Error;
use serde::{Deserialize, Serialize};
use serde_json::Value;
+use pbs_api_types::PROXMOX_SAFE_ID_FORMAT;
use proxmox_schema::{api, ApiType, Schema, StringSchema, Updater};
use proxmox_section_config::{SectionConfig, SectionConfigData, SectionConfigPlugin};
-use pbs_api_types::PROXMOX_SAFE_ID_FORMAT;
use pbs_config::{open_backup_lockfile, BackupLockGuard};
pub const PLUGIN_ID_SCHEMA: Schema = StringSchema::new("ACME Challenge Plugin ID.")
diff --git a/src/config/node.rs b/src/config/node.rs
index d2d6e383..253b2e36 100644
--- a/src/config/node.rs
+++ b/src/config/node.rs
@@ -4,14 +4,12 @@ use anyhow::{bail, Error};
use openssl::ssl::{SslAcceptor, SslMethod};
use serde::{Deserialize, Serialize};
-use proxmox_schema::{api, ApiStringFormat, ApiType, Updater};
-
-use proxmox_http::ProxyConfig;
-
use pbs_api_types::{
EMAIL_SCHEMA, MULTI_LINE_COMMENT_SCHEMA, OPENSSL_CIPHERS_TLS_1_2_SCHEMA,
OPENSSL_CIPHERS_TLS_1_3_SCHEMA,
};
+use proxmox_http::ProxyConfig;
+use proxmox_schema::{api, ApiStringFormat, ApiType, Updater};
use pbs_buildcfg::configdir;
use pbs_config::{open_backup_lockfile, BackupLockGuard};
--
2.47.3
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2026-01-08 11:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 11:26 [pbs-devel] [PATCH proxmox{, -backup} v5 0/9] fix #6939: acme: support servers returning 204 for nonce requests Samuel Rufinatscha
2026-01-08 11:26 ` [pbs-devel] [PATCH proxmox v5 1/4] acme: reduce visibility of Request type Samuel Rufinatscha
2026-01-08 11:26 ` [pbs-devel] [PATCH proxmox v5 2/4] acme: introduce http_status module Samuel Rufinatscha
2026-01-08 11:26 ` [pbs-devel] [PATCH proxmox v5 3/4] fix #6939: acme: support servers returning 204 for nonce requests Samuel Rufinatscha
2026-01-08 11:26 ` [pbs-devel] [PATCH proxmox v5 4/4] acme-api: add helper to load client for an account Samuel Rufinatscha
2026-01-08 11:26 ` Samuel Rufinatscha [this message]
2026-01-08 11:26 ` [pbs-devel] [PATCH proxmox-backup v5 2/5] acme: include proxmox-acme-api dependency Samuel Rufinatscha
2026-01-08 11:26 ` [pbs-devel] [PATCH proxmox-backup v5 3/5] acme: drop local AcmeClient Samuel Rufinatscha
2026-01-08 11:26 ` [pbs-devel] [PATCH proxmox-backup v5 4/5] acme: change API impls to use proxmox-acme-api handlers Samuel Rufinatscha
2026-01-08 11:26 ` [pbs-devel] [PATCH proxmox-backup v5 5/5] acme: certificate ordering through proxmox-acme-api Samuel Rufinatscha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260108112629.189670-6-s.rufinatscha@proxmox.com \
--to=s.rufinatscha@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox