all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Shannon Sterz <s.sterz@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH datacenter-manager 1/2] server: add pdmAtoB upgrade checker script
Date: Fri,  5 Sep 2025 12:04:45 +0200	[thread overview]
Message-ID: <20250905100446.207988-3-s.sterz@proxmox.com> (raw)
In-Reply-To: <20250905100446.207988-1-s.sterz@proxmox.com>

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
 Cargo.toml                                |  3 +++
 Makefile                                  |  1 +
 cli/pdmAtoB/Cargo.toml                    | 15 +++++++++++++++
 cli/pdmAtoB/src/main.rs                   | 19 +++++++++++++++++++
 debian/proxmox-datacenter-manager.install |  3 +++
 5 files changed, 41 insertions(+)
 create mode 100644 cli/pdmAtoB/Cargo.toml
 create mode 100644 cli/pdmAtoB/src/main.rs

diff --git a/Cargo.toml b/Cargo.toml
index 76c416e..33cb6bc 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -25,6 +25,7 @@ members = [
     "cli/client",
     "cli/admin",
     "cli/proxmox-fido2",
+    "cli/pdmAtoB",
 ]
 
 [workspace.dependencies]
@@ -66,6 +67,7 @@ proxmox-uuid = "1"
 # other proxmox crates
 proxmox-acme = "0.5"
 proxmox-openid = "0.10"
+proxmox-upgrade-checks = "0.1.0"
 
 # api implementation creates
 proxmox-config-digest = "1"
@@ -179,4 +181,5 @@ zstd = { version = "0.13" }
 # proxmox-time-api = { path = "../proxmox/proxmox-time-api" }
 # proxmox-time = { path = "../proxmox/proxmox-time" }
 # proxmox-uuid = { path = "../proxmox/proxmox-uuid" }
+proxmox-upgrade-checks = { path = "../proxmox/proxmox-upgrade-checks" }
 # proxmox-worker-task = { path = "../proxmox/proxmox-worker-task" }
diff --git a/Makefile b/Makefile
index d18fb0d..fb2e9bd 100644
--- a/Makefile
+++ b/Makefile
@@ -42,6 +42,7 @@ USR_BIN := \
 
 USR_SBIN := \
 	proxmox-datacenter-manager-admin \
+	pdmAtoB \
 
 SERVICE_BIN := \
 	proxmox-datacenter-api \
diff --git a/cli/pdmAtoB/Cargo.toml b/cli/pdmAtoB/Cargo.toml
new file mode 100644
index 0000000..f05d839
--- /dev/null
+++ b/cli/pdmAtoB/Cargo.toml
@@ -0,0 +1,15 @@
+[package]
+name = "pdmAtoB"
+description = "Proxmox Datacenter Upgrade Checks"
+homepage = "https://www.proxmox.com"
+version.workspace = true
+authors.workspace = true
+edition.workspace = true
+license.workspace = true
+repository.workspace = true
+exclude.workspace = true
+
+[dependencies]
+anyhow.workspace = true
+proxmox-upgrade-checks.workspace = true
+pdm-buildcfg.workspace = true
diff --git a/cli/pdmAtoB/src/main.rs b/cli/pdmAtoB/src/main.rs
new file mode 100644
index 0000000..fdb6684
--- /dev/null
+++ b/cli/pdmAtoB/src/main.rs
@@ -0,0 +1,19 @@
+use pdm_buildcfg::{PROXMOX_PKG_RELEASE, PROXMOX_PKG_VERSION};
+use proxmox_upgrade_checks::UpgradeCheckerBuilder;
+
+fn main() -> Result<(), anyhow::Error> {
+    UpgradeCheckerBuilder::new(
+        "bookworm",
+        "trixie",
+        "proxmox-datacenter-manager",
+        0,
+        1,
+        11,
+        &format!("{PROXMOX_PKG_VERSION}.{PROXMOX_PKG_RELEASE}"),
+    )
+    .with_apt_state_file_location(pdm_buildcfg::APT_PKG_STATE_FN)
+    .add_service_to_checks("proxmox-datacenter-api")
+    .add_service_to_checks("proxmox-datacenter-privileged-api")
+    .build()
+    .run()
+}
diff --git a/debian/proxmox-datacenter-manager.install b/debian/proxmox-datacenter-manager.install
index 8df450e..64aa789 100644
--- a/debian/proxmox-datacenter-manager.install
+++ b/debian/proxmox-datacenter-manager.install
@@ -10,9 +10,12 @@ usr/libexec/proxmox/proxmox-datacenter-manager-banner
 usr/libexec/proxmox/proxmox-datacenter-manager-daily-update
 usr/libexec/proxmox/proxmox-datacenter-privileged-api
 usr/sbin/proxmox-datacenter-manager-admin
+usr/sbin/pdmAtoB
 usr/share/bash-completion/completions/proxmox-datacenter-api.bc
 usr/share/bash-completion/completions/proxmox-datacenter-manager-admin.bc
 usr/share/bash-completion/completions/proxmox-datacenter-privileged-api.bc
+usr/share/bash-completion/completions/pdmAtoB.bc
 usr/share/zsh/vendor-completions/_proxmox-datacenter-api
 usr/share/zsh/vendor-completions/_proxmox-datacenter-manager-admin
 usr/share/zsh/vendor-completions/_proxmox-datacenter-privileged-api
+usr/share/zsh/vendor-completions/_pdmAtoB
-- 
2.47.2



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


  parent reply	other threads:[~2025-09-05 10:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-05 10:04 [pdm-devel] [PATCH datacenter-manager/proxmox 0/3] version command and upgrade checks for pdm Shannon Sterz
2025-09-05 10:04 ` [pdm-devel] [PATCH proxmox 1/1] upgrade-checks: add upgrade checker crate Shannon Sterz
2025-09-05 10:04 ` Shannon Sterz [this message]
2025-09-05 10:04 ` [pdm-devel] [PATCH datacenter-manager 2/2] cli/admin: add a versions command to show current package versions Shannon Sterz
  -- strict thread matches above, loose matches on Subject: below --
2025-09-05  9:59 [pdm-devel] [PATCH datacenter-manager/proxmox 0/3] version command and upgrade checks for pdm Shannon Sterz
2025-09-05  9:59 ` [pdm-devel] [PATCH datacenter-manager 1/2] server: add pdmAtoB upgrade checker script Shannon Sterz

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=20250905100446.207988-3-s.sterz@proxmox.com \
    --to=s.sterz@proxmox.com \
    --cc=pdm-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal