[pbs-devel] [PATCH proxmox-backup v5 2/5] acme: include proxmox-acme-api dependency

Samuel Rufinatscha s.rufinatscha at proxmox.com
Tue Jan 13 17:41:32 CET 2026


On 1/13/26 2:45 PM, Fabian Grünbichler wrote:
> On January 8, 2026 12:26 pm, Samuel Rufinatscha wrote:
>> PBS currently uses its own ACME client and API logic, while PDM uses the
>> factored out proxmox-acme and proxmox-acme-api crates. This duplication
>> risks differences in behaviour and requires ACME maintenance in two
>> places. This patch is part of a series to move PBS over to the shared
>> ACME stack.
> 
> this doesn't need to be in nearly every commit here.

Makes sense, will remove!

> 
> adding the dependency and initializing things without using them also
> has no stand-alone value, so this doesn't need to be its own commit.
> 

I thought about this - I decided to add it as a dedicated commit to
improve visibility for review, to make sure call/init sites with params
are clear / to avoid it isn't going overlooked in the refactor.

But I see what you mean, it fits better with the changes from next
patch. Will adjust to this!

> we could have two commits:
> - add proxmox-acme-api and use it for client and API
> - remove src/acme since it is now unused
> 
> or three or more if you want to split out some of the API replacement where
> there isn't a 1:1 relation between old and new code..
>

I think the 2 commits approach fits, and would hold the API
changes well together - so let's go with this!

I will try to extract the src/api2 changes from 5/5 which should work.
And then probably is src/config/acme/plugin.rs still left, which will
be removed together with src/acme as part of patch 2.

>>
>> Changes:
>> - Add proxmox-acme-api with the "impl" feature as a dependency.
>> - Initialize proxmox_acme_api in proxmox-backup- api, manager and proxy.
>>    * Inits PBS config dir /acme as proxmox ACME directory
>>
>> Signed-off-by: Samuel Rufinatscha <s.rufinatscha at proxmox.com>
>> ---
>>   Cargo.toml                        | 3 +++
>>   src/bin/proxmox-backup-api.rs     | 2 ++
>>   src/bin/proxmox-backup-manager.rs | 2 ++
>>   src/bin/proxmox-backup-proxy.rs   | 1 +
>>   4 files changed, 8 insertions(+)
>>
>> diff --git a/Cargo.toml b/Cargo.toml
>> index 1aa57ae5..feae351d 100644
>> --- a/Cargo.toml
>> +++ b/Cargo.toml
>> @@ -101,6 +101,7 @@ pbs-api-types = "1.0.8"
>>   # other proxmox crates
>>   pathpatterns = "1"
>>   proxmox-acme = "1"
>> +proxmox-acme-api = { version = "1", features = [ "impl" ] }
>>   pxar = "1"
>>   
>>   # PBS workspace
>> @@ -251,6 +252,7 @@ pbs-api-types.workspace = true
>>   
>>   # in their respective repo
>>   proxmox-acme.workspace = true
>> +proxmox-acme-api.workspace = true
>>   pxar.workspace = true
>>   
>>   # proxmox-backup workspace/internal crates
>> @@ -269,6 +271,7 @@ proxmox-rrd-api-types.workspace = true
>>   [patch.crates-io]
>>   #pbs-api-types = { path = "../proxmox/pbs-api-types" }
>>   #proxmox-acme = { path = "../proxmox/proxmox-acme" }
>> +#proxmox-acme-api = { path = "../proxmox/proxmox-acme-api" }
>>   #proxmox-api-macro = { path = "../proxmox/proxmox-api-macro" }
>>   #proxmox-apt = { path = "../proxmox/proxmox-apt" }
>>   #proxmox-apt-api-types = { path = "../proxmox/proxmox-apt-api-types" }
>> diff --git a/src/bin/proxmox-backup-api.rs b/src/bin/proxmox-backup-api.rs
>> index 417e9e97..d0091dca 100644
>> --- a/src/bin/proxmox-backup-api.rs
>> +++ b/src/bin/proxmox-backup-api.rs
>> @@ -14,6 +14,7 @@ use proxmox_rest_server::{ApiConfig, RestServer};
>>   use proxmox_router::RpcEnvironmentType;
>>   use proxmox_sys::fs::CreateOptions;
>>   
>> +use pbs_buildcfg::configdir;
>>   use proxmox_backup::auth_helpers::*;
>>   use proxmox_backup::config;
>>   use proxmox_backup::server::auth::check_pbs_auth;
>> @@ -78,6 +79,7 @@ async fn run() -> Result<(), Error> {
>>       let mut command_sock = proxmox_daemon::command_socket::CommandSocket::new(backup_user.gid);
>>   
>>       proxmox_product_config::init(backup_user.clone(), pbs_config::priv_user()?);
>> +    proxmox_acme_api::init(configdir!("/acme"), true)?;
>>   
>>       let dir_opts = CreateOptions::new()
>>           .owner(backup_user.uid)
>> diff --git a/src/bin/proxmox-backup-manager.rs b/src/bin/proxmox-backup-manager.rs
>> index f8365070..30bc8da9 100644
>> --- a/src/bin/proxmox-backup-manager.rs
>> +++ b/src/bin/proxmox-backup-manager.rs
>> @@ -19,6 +19,7 @@ use proxmox_router::{cli::*, RpcEnvironment};
>>   use proxmox_schema::api;
>>   use proxmox_sys::fs::CreateOptions;
>>   
>> +use pbs_buildcfg::configdir;
>>   use pbs_client::{display_task_log, view_task_result};
>>   use pbs_config::sync;
>>   use pbs_tools::json::required_string_param;
>> @@ -667,6 +668,7 @@ async fn run() -> Result<(), Error> {
>>           .init()?;
>>       proxmox_backup::server::notifications::init()?;
>>       proxmox_product_config::init(pbs_config::backup_user()?, pbs_config::priv_user()?);
>> +    proxmox_acme_api::init(configdir!("/acme"), false)?;
>>   
>>       let cmd_def = CliCommandMap::new()
>>           .insert("acl", acl_commands())
>> diff --git a/src/bin/proxmox-backup-proxy.rs b/src/bin/proxmox-backup-proxy.rs
>> index 870208fe..eea44a7d 100644
>> --- a/src/bin/proxmox-backup-proxy.rs
>> +++ b/src/bin/proxmox-backup-proxy.rs
>> @@ -188,6 +188,7 @@ async fn run() -> Result<(), Error> {
>>       proxmox_backup::server::notifications::init()?;
>>       metric_collection::init()?;
>>       proxmox_product_config::init(pbs_config::backup_user()?, pbs_config::priv_user()?);
>> +    proxmox_acme_api::init(configdir!("/acme"), false)?;
>>   
>>       let mut indexpath = PathBuf::from(pbs_buildcfg::JS_DIR);
>>       indexpath.push("index.hbs");
>> -- 
>> 2.47.3
>>
>>
>>
>> _______________________________________________
>> pbs-devel mailing list
>> pbs-devel at lists.proxmox.com
>> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
>>
>>
>>
> 
> 
> _______________________________________________
> pbs-devel mailing list
> pbs-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
> 
> 





More information about the pbs-devel mailing list