public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox-offline-mirror] fix #7762: wizard: add PDM support
@ 2026-07-23  9:24 Erik Fastermann
  0 siblings, 0 replies; only message in thread
From: Erik Fastermann @ 2026-07-23  9:24 UTC (permalink / raw)
  To: pve-devel; +Cc: Erik Fastermann

Offer Proxmox Datacenter Manager as a distro in the interactive
setup so its repositories can be mirrored offline.

Signed-off-by: Erik Fastermann <e.fastermann@proxmox.com>
---
 src/bin/proxmox-offline-mirror.rs | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/src/bin/proxmox-offline-mirror.rs b/src/bin/proxmox-offline-mirror.rs
index 90a14a9..7b7a506 100644
--- a/src/bin/proxmox-offline-mirror.rs
+++ b/src/bin/proxmox-offline-mirror.rs
@@ -27,6 +27,7 @@ use proxmox_offline_mirror_cmds::*;
 enum Distro {
     Debian,
     Pbs,
+    Pdm,
     Pmg,
     Pve,
     PveCeph,
@@ -37,6 +38,7 @@ impl Display for Distro {
         match self {
             Distro::Debian => write!(f, "debian"),
             Distro::Pbs => write!(f, "pbs"),
+            Distro::Pdm => write!(f, "pdm"),
             Distro::Pmg => write!(f, "pmg"),
             Distro::Pve => write!(f, "pve"),
             Distro::PveCeph => write!(f, "ceph"),
@@ -212,6 +214,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
         let distros = &[
             (Distro::Pve, "Proxmox VE"),
             (Distro::Pbs, "Proxmox Backup Server"),
+            (Distro::Pdm, "Proxmox Datacenter Manager"),
             (Distro::Pmg, "Proxmox Mail Gateway"),
             (Distro::PveCeph, "Proxmox Ceph"),
             (Distro::Debian, "Debian"),
@@ -223,7 +226,12 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
             (Release::Bookworm, "Bookworm"),
             (Release::Bullseye, "Bullseye"),
         ];
-        let release = read_selection_from_tty("Select release", releases, Some(0))?;
+        let release = match dist {
+            // PDM (version 1.0 or higher) is only published for Trixie, so
+            // there is nothing to select.
+            Distro::Pdm => &Release::Trixie,
+            _ => read_selection_from_tty("Select release", releases, Some(0))?,
+        };
 
         let mut add_debian_repo = false;
 
@@ -354,6 +362,21 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
                     (Distro::Pbs, &ProxmoxVariant::Enterprise) => Some(ProductType::Pbs),
                     (Distro::Pmg, &ProxmoxVariant::Enterprise) => Some(ProductType::Pmg),
                     (Distro::Pve, &ProxmoxVariant::Enterprise) => Some(ProductType::Pve),
+                    (Distro::Pdm, &ProxmoxVariant::Enterprise) => {
+                        // PDM has no dedicated subscription of its own; its enterprise
+                        // repository is unlocked by any Basic (or higher) PVE or PBS
+                        // subscription key.
+                        let products = &[(ProductType::Pve, "PVE"), (ProductType::Pbs, "PBS")];
+                        Some(
+                            read_selection_from_tty(
+                                "Select subscription (Basic or higher) to use \
+                                    for the PDM enterprise repository",
+                                products,
+                                Some(0),
+                            )?
+                            .clone(),
+                        )
+                    }
                     _ => None,
                 };
 
-- 
2.47.3




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-23  9:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23  9:24 [PATCH proxmox-offline-mirror] fix #7762: wizard: add PDM support Erik Fastermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal