all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-offline-mirror] mirror: add support for trixie repositories
@ 2025-08-27 14:24 Shannon Sterz
  2025-08-27 14:35 ` Shannon Sterz
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Shannon Sterz @ 2025-08-27 14:24 UTC (permalink / raw)
  To: pbs-devel

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
 src/bin/proxmox-offline-mirror.rs | 99 +++++++++++++++++++++----------
 1 file changed, 69 insertions(+), 30 deletions(-)

diff --git a/src/bin/proxmox-offline-mirror.rs b/src/bin/proxmox-offline-mirror.rs
index 6a5063a..9aaf058 100644
--- a/src/bin/proxmox-offline-mirror.rs
+++ b/src/bin/proxmox-offline-mirror.rs
@@ -46,6 +46,7 @@ impl Display for Distro {
 }
 
 enum Release {
+    Trixie,
     Bookworm,
     Bullseye,
     Buster,
@@ -54,6 +55,7 @@ enum Release {
 impl Display for Release {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         match self {
+            Release::Trixie => write!(f, "trixie"),
             Release::Bookworm => write!(f, "bookworm"),
             Release::Bullseye => write!(f, "bullseye"),
             Release::Buster => write!(f, "buster"),
@@ -135,6 +137,17 @@ fn derive_debian_repo(
         skip_sections,
     };
     let url = match (release, variant) {
+        (Release::Trixie, DebianVariant::Main) => "http://deb.debian.org/debian trixie",
+        (Release::Trixie, DebianVariant::Security) => {
+            "http://deb.debian.org/debian-security trixie-security"
+        }
+        (Release::Trixie, DebianVariant::Updates) => "http://deb.debian.org/debian trixie-updates",
+        (Release::Trixie, DebianVariant::Backports) => {
+            "http://deb.debian.org/debian trixie-backports"
+        }
+        (Release::Trixie, DebianVariant::Debug) => {
+            "http://deb.debian.org/debian-debug trixie-debug"
+        }
         (Release::Bookworm, DebianVariant::Main) => "http://deb.debian.org/debian bookworm",
         (Release::Bookworm, DebianVariant::Security) => {
             "http://deb.debian.org/debian-security bookworm-security"
@@ -176,6 +189,13 @@ fn derive_debian_repo(
 
     let url = format!("{url} {components}");
     let key = match (release, variant) {
+        (Release::Trixie, DebianVariant::Security) => {
+            "/usr/share/keyrings/debian-archive-trixie-security-automatic.gpg"
+        }
+        (Release::Trixie, DebianVariant::Updates) | (Release::Trixie, DebianVariant::Backports) => {
+            "/usr/share/keyrings/debian-archive-trixie-automatic.gpg"
+        }
+        (Release::Trixie, _) => "/usr/share/keyrings/debian-archive-trixie-stable.gpg",
         (Release::Bookworm, DebianVariant::Security) => {
             "/usr/share/keyrings/debian-archive-bookworm-security-automatic.gpg"
         }
@@ -217,6 +237,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
         let dist = read_selection_from_tty("Select distro to mirror", distros, None)?;
 
         let releases = &[
+            (Release::Trixie, "Trixie"),
             (Release::Bookworm, "Bookworm"),
             (Release::Bullseye, "Bullseye"),
             (Release::Buster, "Buster"),
@@ -238,7 +259,9 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
                     read_selection_from_tty("Select repository variant", variants, Some(0))?;
 
                 let default_components = match release {
-                    Release::Bookworm => "main contrib non-free non-free-firmware",
+                    Release::Bookworm | Release::Trixie => {
+                        "main contrib non-free non-free-firmware"
+                    }
                     _ => "main contrib non-free",
                 };
 
@@ -259,6 +282,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
                 }
 
                 let releases = match release {
+                    Release::Trixie => vec![(CephRelease::Squid, "Squid (19.x)")],
                     Release::Bookworm => vec![
                         (CephRelease::Quincy, "Quincy (17.x)"),
                         (CephRelease::Reef, "Reef (18.x)"),
@@ -286,41 +310,46 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
                     Some(releases.len() - 1),
                 )?;
 
-                let (base_url, components) = if matches!(release, Release::Bookworm) {
-                    let variants = &[
-                        (ProxmoxVariant::Enterprise, "Enterprise repository"),
-                        (ProxmoxVariant::NoSubscription, "No-Subscription repository"),
-                        (ProxmoxVariant::Test, "Test repository"),
-                    ];
+                let (base_url, components) =
+                    if matches!(release, Release::Bookworm | Release::Trixie) {
+                        let variants = &[
+                            (ProxmoxVariant::Enterprise, "Enterprise repository"),
+                            (ProxmoxVariant::NoSubscription, "No-Subscription repository"),
+                            (ProxmoxVariant::Test, "Test repository"),
+                        ];
 
-                    let variant =
-                        read_selection_from_tty("Select repository variant", variants, Some(0))?;
+                        let variant = read_selection_from_tty(
+                            "Select repository variant",
+                            variants,
+                            Some(0),
+                        )?;
 
-                    match variant {
-                        ProxmoxVariant::Enterprise => {
-                            use_subscription = Some(ProductType::Pve);
-                            (
-                                "https://enterprise.proxmox.com/debian/ceph",
-                                "enterprise".to_string(),
-                            )
+                        match variant {
+                            ProxmoxVariant::Enterprise => {
+                                use_subscription = Some(ProductType::Pve);
+                                (
+                                    "https://enterprise.proxmox.com/debian/ceph",
+                                    "enterprise".to_string(),
+                                )
+                            }
+                            ProxmoxVariant::NoSubscription => (
+                                "http://download.proxmox.com/debian/ceph",
+                                "no-subscription".to_string(),
+                            ),
+                            ProxmoxVariant::Test => (
+                                "http://download.proxmox.com/debian/ceph",
+                                "test".to_string(),
+                            ),
                         }
-                        ProxmoxVariant::NoSubscription => (
+                    } else {
+                        (
                             "http://download.proxmox.com/debian/ceph",
-                            "no-subscription".to_string(),
-                        ),
-                        ProxmoxVariant::Test => (
-                            "http://download.proxmox.com/debian/ceph",
-                            "test".to_string(),
-                        ),
-                    }
-                } else {
-                    (
-                        "http://download.proxmox.com/debian/ceph",
-                        read_string_from_tty("Enter repository components", Some("main test"))?,
-                    )
-                };
+                            read_string_from_tty("Enter repository components", Some("main test"))?,
+                        )
+                    };
 
                 let key = match release {
+                    Release::Trixie => "/etc/apt/trusted.gpg.d/proxmox-release-trixie.gpg",
                     Release::Bookworm => "/etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg",
                     Release::Bullseye => "/etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg",
                     Release::Buster => "/etc/apt/trusted.gpg.d/proxmox-release-buster.gpg",
@@ -353,6 +382,15 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
 
                 // TODO enterprise query for key!
                 let url = match (release, variant) {
+                    (Release::Trixie, ProxmoxVariant::Enterprise) => format!(
+                        "https://enterprise.proxmox.com/debian/{product} trixie {product}-enterprise"
+                    ),
+                    (Release::Trixie, ProxmoxVariant::NoSubscription) => format!(
+                        "http://download.proxmox.com/debian/{product} trixie {product}-no-subscription"
+                    ),
+                    (Release::Trixie, ProxmoxVariant::Test) => {
+                        format!("http://download.proxmox.com/debian/{product} trixie {product}test")
+                    }
                     (Release::Bookworm, ProxmoxVariant::Enterprise) => format!(
                         "https://enterprise.proxmox.com/debian/{product} bookworm {product}-enterprise"
                     ),
@@ -390,6 +428,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
                 };
 
                 let key = match release {
+                    Release::Trixie => "/etc/apt/trusted.gpg.d/proxmox-release-trixie.gpg",
                     Release::Bookworm => "/etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg",
                     Release::Bullseye => "/etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg",
                     Release::Buster => "/etc/apt/trusted.gpg.d/proxmox-release-buster.gpg",
-- 
2.47.2



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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pbs-devel] [PATCH proxmox-offline-mirror] mirror: add support for trixie repositories
  2025-08-27 14:24 [pbs-devel] [PATCH proxmox-offline-mirror] mirror: add support for trixie repositories Shannon Sterz
@ 2025-08-27 14:35 ` Shannon Sterz
  2025-08-28 21:21 ` Thomas Lamprecht
  2025-08-29  8:24 ` [pbs-devel] Superseded: " Shannon Sterz
  2 siblings, 0 replies; 5+ messages in thread
From: Shannon Sterz @ 2025-08-27 14:35 UTC (permalink / raw)
  To: Shannon Sterz, pbs-devel

small note: this now allows configuring a pmg trixie repository. this
does not exist, yet. however, i think adding a special case for that now
and removing it in the not so distant future, when it exists again seems
unlikely to be worth the effort to me.

On Wed Aug 27, 2025 at 4:24 PM CEST, Shannon Sterz wrote:
> Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
> ---
>  src/bin/proxmox-offline-mirror.rs | 99 +++++++++++++++++++++----------
>  1 file changed, 69 insertions(+), 30 deletions(-)
>
> diff --git a/src/bin/proxmox-offline-mirror.rs b/src/bin/proxmox-offline-mirror.rs
> index 6a5063a..9aaf058 100644
> --- a/src/bin/proxmox-offline-mirror.rs
> +++ b/src/bin/proxmox-offline-mirror.rs
> @@ -46,6 +46,7 @@ impl Display for Distro {
>  }
>
>  enum Release {
> +    Trixie,
>      Bookworm,
>      Bullseye,
>      Buster,
> @@ -54,6 +55,7 @@ enum Release {
>  impl Display for Release {
>      fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
>          match self {
> +            Release::Trixie => write!(f, "trixie"),
>              Release::Bookworm => write!(f, "bookworm"),
>              Release::Bullseye => write!(f, "bullseye"),
>              Release::Buster => write!(f, "buster"),
> @@ -135,6 +137,17 @@ fn derive_debian_repo(
>          skip_sections,
>      };
>      let url = match (release, variant) {
> +        (Release::Trixie, DebianVariant::Main) => "http://deb.debian.org/debian trixie",
> +        (Release::Trixie, DebianVariant::Security) => {
> +            "http://deb.debian.org/debian-security trixie-security"
> +        }
> +        (Release::Trixie, DebianVariant::Updates) => "http://deb.debian.org/debian trixie-updates",
> +        (Release::Trixie, DebianVariant::Backports) => {
> +            "http://deb.debian.org/debian trixie-backports"
> +        }
> +        (Release::Trixie, DebianVariant::Debug) => {
> +            "http://deb.debian.org/debian-debug trixie-debug"
> +        }
>          (Release::Bookworm, DebianVariant::Main) => "http://deb.debian.org/debian bookworm",
>          (Release::Bookworm, DebianVariant::Security) => {
>              "http://deb.debian.org/debian-security bookworm-security"
> @@ -176,6 +189,13 @@ fn derive_debian_repo(
>
>      let url = format!("{url} {components}");
>      let key = match (release, variant) {
> +        (Release::Trixie, DebianVariant::Security) => {
> +            "/usr/share/keyrings/debian-archive-trixie-security-automatic.gpg"
> +        }
> +        (Release::Trixie, DebianVariant::Updates) | (Release::Trixie, DebianVariant::Backports) => {
> +            "/usr/share/keyrings/debian-archive-trixie-automatic.gpg"
> +        }
> +        (Release::Trixie, _) => "/usr/share/keyrings/debian-archive-trixie-stable.gpg",
>          (Release::Bookworm, DebianVariant::Security) => {
>              "/usr/share/keyrings/debian-archive-bookworm-security-automatic.gpg"
>          }
> @@ -217,6 +237,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
>          let dist = read_selection_from_tty("Select distro to mirror", distros, None)?;
>
>          let releases = &[
> +            (Release::Trixie, "Trixie"),
>              (Release::Bookworm, "Bookworm"),
>              (Release::Bullseye, "Bullseye"),
>              (Release::Buster, "Buster"),
> @@ -238,7 +259,9 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
>                      read_selection_from_tty("Select repository variant", variants, Some(0))?;
>
>                  let default_components = match release {
> -                    Release::Bookworm => "main contrib non-free non-free-firmware",
> +                    Release::Bookworm | Release::Trixie => {
> +                        "main contrib non-free non-free-firmware"
> +                    }
>                      _ => "main contrib non-free",
>                  };
>
> @@ -259,6 +282,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
>                  }
>
>                  let releases = match release {
> +                    Release::Trixie => vec![(CephRelease::Squid, "Squid (19.x)")],
>                      Release::Bookworm => vec![
>                          (CephRelease::Quincy, "Quincy (17.x)"),
>                          (CephRelease::Reef, "Reef (18.x)"),
> @@ -286,41 +310,46 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
>                      Some(releases.len() - 1),
>                  )?;
>
> -                let (base_url, components) = if matches!(release, Release::Bookworm) {
> -                    let variants = &[
> -                        (ProxmoxVariant::Enterprise, "Enterprise repository"),
> -                        (ProxmoxVariant::NoSubscription, "No-Subscription repository"),
> -                        (ProxmoxVariant::Test, "Test repository"),
> -                    ];
> +                let (base_url, components) =
> +                    if matches!(release, Release::Bookworm | Release::Trixie) {
> +                        let variants = &[
> +                            (ProxmoxVariant::Enterprise, "Enterprise repository"),
> +                            (ProxmoxVariant::NoSubscription, "No-Subscription repository"),
> +                            (ProxmoxVariant::Test, "Test repository"),
> +                        ];
>
> -                    let variant =
> -                        read_selection_from_tty("Select repository variant", variants, Some(0))?;
> +                        let variant = read_selection_from_tty(
> +                            "Select repository variant",
> +                            variants,
> +                            Some(0),
> +                        )?;
>
> -                    match variant {
> -                        ProxmoxVariant::Enterprise => {
> -                            use_subscription = Some(ProductType::Pve);
> -                            (
> -                                "https://enterprise.proxmox.com/debian/ceph",
> -                                "enterprise".to_string(),
> -                            )
> +                        match variant {
> +                            ProxmoxVariant::Enterprise => {
> +                                use_subscription = Some(ProductType::Pve);
> +                                (
> +                                    "https://enterprise.proxmox.com/debian/ceph",
> +                                    "enterprise".to_string(),
> +                                )
> +                            }
> +                            ProxmoxVariant::NoSubscription => (
> +                                "http://download.proxmox.com/debian/ceph",
> +                                "no-subscription".to_string(),
> +                            ),
> +                            ProxmoxVariant::Test => (
> +                                "http://download.proxmox.com/debian/ceph",
> +                                "test".to_string(),
> +                            ),
>                          }
> -                        ProxmoxVariant::NoSubscription => (
> +                    } else {
> +                        (
>                              "http://download.proxmox.com/debian/ceph",
> -                            "no-subscription".to_string(),
> -                        ),
> -                        ProxmoxVariant::Test => (
> -                            "http://download.proxmox.com/debian/ceph",
> -                            "test".to_string(),
> -                        ),
> -                    }
> -                } else {
> -                    (
> -                        "http://download.proxmox.com/debian/ceph",
> -                        read_string_from_tty("Enter repository components", Some("main test"))?,
> -                    )
> -                };
> +                            read_string_from_tty("Enter repository components", Some("main test"))?,
> +                        )
> +                    };
>
>                  let key = match release {
> +                    Release::Trixie => "/etc/apt/trusted.gpg.d/proxmox-release-trixie.gpg",
>                      Release::Bookworm => "/etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg",
>                      Release::Bullseye => "/etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg",
>                      Release::Buster => "/etc/apt/trusted.gpg.d/proxmox-release-buster.gpg",
> @@ -353,6 +382,15 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
>
>                  // TODO enterprise query for key!
>                  let url = match (release, variant) {
> +                    (Release::Trixie, ProxmoxVariant::Enterprise) => format!(
> +                        "https://enterprise.proxmox.com/debian/{product} trixie {product}-enterprise"
> +                    ),
> +                    (Release::Trixie, ProxmoxVariant::NoSubscription) => format!(
> +                        "http://download.proxmox.com/debian/{product} trixie {product}-no-subscription"
> +                    ),
> +                    (Release::Trixie, ProxmoxVariant::Test) => {
> +                        format!("http://download.proxmox.com/debian/{product} trixie {product}test")
> +                    }
>                      (Release::Bookworm, ProxmoxVariant::Enterprise) => format!(
>                          "https://enterprise.proxmox.com/debian/{product} bookworm {product}-enterprise"
>                      ),
> @@ -390,6 +428,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
>                  };
>
>                  let key = match release {
> +                    Release::Trixie => "/etc/apt/trusted.gpg.d/proxmox-release-trixie.gpg",
>                      Release::Bookworm => "/etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg",
>                      Release::Bullseye => "/etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg",
>                      Release::Buster => "/etc/apt/trusted.gpg.d/proxmox-release-buster.gpg",



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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pbs-devel] [PATCH proxmox-offline-mirror] mirror: add support for trixie repositories
  2025-08-27 14:24 [pbs-devel] [PATCH proxmox-offline-mirror] mirror: add support for trixie repositories Shannon Sterz
  2025-08-27 14:35 ` Shannon Sterz
@ 2025-08-28 21:21 ` Thomas Lamprecht
  2025-08-29  8:19   ` Shannon Sterz
  2025-08-29  8:24 ` [pbs-devel] Superseded: " Shannon Sterz
  2 siblings, 1 reply; 5+ messages in thread
From: Thomas Lamprecht @ 2025-08-28 21:21 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Shannon Sterz

On 27/08/2025 16:25, Shannon Sterz wrote:
> Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
> ---
>  src/bin/proxmox-offline-mirror.rs | 99 +++++++++++++++++++++----------
>  1 file changed, 69 insertions(+), 30 deletions(-)
> 

> @@ -353,6 +382,15 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
>  
>                  // TODO enterprise query for key!
>                  let url = match (release, variant) {
> +                    (Release::Trixie, ProxmoxVariant::Enterprise) => format!(
> +                        "https://enterprise.proxmox.com/debian/{product} trixie {product}-enterprise"
> +                    ),
> +                    (Release::Trixie, ProxmoxVariant::NoSubscription) => format!(
> +                        "http://download.proxmox.com/debian/{product} trixie {product}-no-subscription"
> +                    ),
> +                    (Release::Trixie, ProxmoxVariant::Test) => {
> +                        format!("http://download.proxmox.com/debian/{product} trixie {product}test")

Since trixie the test repo is also finally kebab-case, i.e. above needs to
use "... trixie {product}-test"

> +                    }
>                      (Release::Bookworm, ProxmoxVariant::Enterprise) => format!(
>                          "https://enterprise.proxmox.com/debian/{product} bookworm {product}-enterprise"
>                      ),
> @@ -390,6 +428,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
>                  };
>  
>                  let key = match release {
> +                    Release::Trixie => "/etc/apt/trusted.gpg.d/proxmox-release-trixie.gpg",

Only checking the diff not the full context, but should we use the
relatively new common archive keyring in /usr here?

>                      Release::Bookworm => "/etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg",
>                      Release::Bullseye => "/etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg",
>                      Release::Buster => "/etc/apt/trusted.gpg.d/proxmox-release-buster.gpg",



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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [pbs-devel] [PATCH proxmox-offline-mirror] mirror: add support for trixie repositories
  2025-08-28 21:21 ` Thomas Lamprecht
@ 2025-08-29  8:19   ` Shannon Sterz
  0 siblings, 0 replies; 5+ messages in thread
From: Shannon Sterz @ 2025-08-29  8:19 UTC (permalink / raw)
  To: Thomas Lamprecht, Proxmox Backup Server development discussion

On Thu Aug 28, 2025 at 11:21 PM CEST, Thomas Lamprecht wrote:
> On 27/08/2025 16:25, Shannon Sterz wrote:
>> Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
>> ---
>>  src/bin/proxmox-offline-mirror.rs | 99 +++++++++++++++++++++----------
>>  1 file changed, 69 insertions(+), 30 deletions(-)
>>
>
>> @@ -353,6 +382,15 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
>>
>>                  // TODO enterprise query for key!
>>                  let url = match (release, variant) {
>> +                    (Release::Trixie, ProxmoxVariant::Enterprise) => format!(
>> +                        "https://enterprise.proxmox.com/debian/{product} trixie {product}-enterprise"
>> +                    ),
>> +                    (Release::Trixie, ProxmoxVariant::NoSubscription) => format!(
>> +                        "http://download.proxmox.com/debian/{product} trixie {product}-no-subscription"
>> +                    ),
>> +                    (Release::Trixie, ProxmoxVariant::Test) => {
>> +                        format!("http://download.proxmox.com/debian/{product} trixie {product}test")
>
> Since trixie the test repo is also finally kebab-case, i.e. above needs to
> use "... trixie {product}-test"

ah true, somehow missed that, will fix that in a v2. thanks!

>> +                    }
>>                      (Release::Bookworm, ProxmoxVariant::Enterprise) => format!(
>>                          "https://enterprise.proxmox.com/debian/{product} bookworm {product}-enterprise"
>>                      ),
>> @@ -390,6 +428,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
>>                  };
>>
>>                  let key = match release {
>> +                    Release::Trixie => "/etc/apt/trusted.gpg.d/proxmox-release-trixie.gpg",
>
> Only checking the diff not the full context, but should we use the
> relatively new common archive keyring in /usr here?

i was wondering whether we should switch to the ones under /usr in
general too, but thought that i'd rather stick with this as both
debian's and our keyring package seem to put the key in both places
still anyway. but, i guess, the ones under `/etc/apt/trusted.gpg.d`
could eventually be deprecated for security reasons (i.e. `apt` should
maybe not trust our keys implicitly for *all* repos)?

as for whether to use the archive keyring: i think pining the specific
keys here should be preferred. this should limit the attack surface if a
key does leak. if a key in the keyring leaks, all mirrors relying on
that keyring are potentially in danger if we use the keyring here. if we
use the specific key explicitly, the mirror is only in danger if its
specific key has leaked. which is probably also easier to communicate to
admins and so on.

for systems that need to potentially go through major upgrades and
regular key cycling and such, using the keyring does reduce the
maintenance burden, though. however, that argument doesn't really apply
to mirrors in my opinion, they only need to have a valid key when the
snapshot is being taken.

i'll send a v2 that switches the key to use the /usr and the fix for the
kebab-casing. i'll also add a patch updating the docs, overlooked that
here.

>>                      Release::Bookworm => "/etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg",
>>                      Release::Bullseye => "/etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg",
>>                      Release::Buster => "/etc/apt/trusted.gpg.d/proxmox-release-buster.gpg",



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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [pbs-devel] Superseded: Re: [PATCH proxmox-offline-mirror] mirror: add support for trixie repositories
  2025-08-27 14:24 [pbs-devel] [PATCH proxmox-offline-mirror] mirror: add support for trixie repositories Shannon Sterz
  2025-08-27 14:35 ` Shannon Sterz
  2025-08-28 21:21 ` Thomas Lamprecht
@ 2025-08-29  8:24 ` Shannon Sterz
  2 siblings, 0 replies; 5+ messages in thread
From: Shannon Sterz @ 2025-08-29  8:24 UTC (permalink / raw)
  To: Shannon Sterz, pbs-devel

Superseded-by: https://lore.proxmox.com/all/20250829082323.55299-1-s.sterz@proxmox.com/T/#t

On Wed Aug 27, 2025 at 4:24 PM CEST, Shannon Sterz wrote:
> Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
> ---
>  src/bin/proxmox-offline-mirror.rs | 99 +++++++++++++++++++++----------
>  1 file changed, 69 insertions(+), 30 deletions(-)
>
> diff --git a/src/bin/proxmox-offline-mirror.rs b/src/bin/proxmox-offline-mirror.rs
> index 6a5063a..9aaf058 100644
> --- a/src/bin/proxmox-offline-mirror.rs
> +++ b/src/bin/proxmox-offline-mirror.rs
> @@ -46,6 +46,7 @@ impl Display for Distro {
>  }
>
>  enum Release {
> +    Trixie,
>      Bookworm,
>      Bullseye,
>      Buster,
> @@ -54,6 +55,7 @@ enum Release {
>  impl Display for Release {
>      fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
>          match self {
> +            Release::Trixie => write!(f, "trixie"),
>              Release::Bookworm => write!(f, "bookworm"),
>              Release::Bullseye => write!(f, "bullseye"),
>              Release::Buster => write!(f, "buster"),
> @@ -135,6 +137,17 @@ fn derive_debian_repo(
>          skip_sections,
>      };
>      let url = match (release, variant) {
> +        (Release::Trixie, DebianVariant::Main) => "http://deb.debian.org/debian trixie",
> +        (Release::Trixie, DebianVariant::Security) => {
> +            "http://deb.debian.org/debian-security trixie-security"
> +        }
> +        (Release::Trixie, DebianVariant::Updates) => "http://deb.debian.org/debian trixie-updates",
> +        (Release::Trixie, DebianVariant::Backports) => {
> +            "http://deb.debian.org/debian trixie-backports"
> +        }
> +        (Release::Trixie, DebianVariant::Debug) => {
> +            "http://deb.debian.org/debian-debug trixie-debug"
> +        }
>          (Release::Bookworm, DebianVariant::Main) => "http://deb.debian.org/debian bookworm",
>          (Release::Bookworm, DebianVariant::Security) => {
>              "http://deb.debian.org/debian-security bookworm-security"
> @@ -176,6 +189,13 @@ fn derive_debian_repo(
>
>      let url = format!("{url} {components}");
>      let key = match (release, variant) {
> +        (Release::Trixie, DebianVariant::Security) => {
> +            "/usr/share/keyrings/debian-archive-trixie-security-automatic.gpg"
> +        }
> +        (Release::Trixie, DebianVariant::Updates) | (Release::Trixie, DebianVariant::Backports) => {
> +            "/usr/share/keyrings/debian-archive-trixie-automatic.gpg"
> +        }
> +        (Release::Trixie, _) => "/usr/share/keyrings/debian-archive-trixie-stable.gpg",
>          (Release::Bookworm, DebianVariant::Security) => {
>              "/usr/share/keyrings/debian-archive-bookworm-security-automatic.gpg"
>          }
> @@ -217,6 +237,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
>          let dist = read_selection_from_tty("Select distro to mirror", distros, None)?;
>
>          let releases = &[
> +            (Release::Trixie, "Trixie"),
>              (Release::Bookworm, "Bookworm"),
>              (Release::Bullseye, "Bullseye"),
>              (Release::Buster, "Buster"),
> @@ -238,7 +259,9 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
>                      read_selection_from_tty("Select repository variant", variants, Some(0))?;
>
>                  let default_components = match release {
> -                    Release::Bookworm => "main contrib non-free non-free-firmware",
> +                    Release::Bookworm | Release::Trixie => {
> +                        "main contrib non-free non-free-firmware"
> +                    }
>                      _ => "main contrib non-free",
>                  };
>
> @@ -259,6 +282,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
>                  }
>
>                  let releases = match release {
> +                    Release::Trixie => vec![(CephRelease::Squid, "Squid (19.x)")],
>                      Release::Bookworm => vec![
>                          (CephRelease::Quincy, "Quincy (17.x)"),
>                          (CephRelease::Reef, "Reef (18.x)"),
> @@ -286,41 +310,46 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
>                      Some(releases.len() - 1),
>                  )?;
>
> -                let (base_url, components) = if matches!(release, Release::Bookworm) {
> -                    let variants = &[
> -                        (ProxmoxVariant::Enterprise, "Enterprise repository"),
> -                        (ProxmoxVariant::NoSubscription, "No-Subscription repository"),
> -                        (ProxmoxVariant::Test, "Test repository"),
> -                    ];
> +                let (base_url, components) =
> +                    if matches!(release, Release::Bookworm | Release::Trixie) {
> +                        let variants = &[
> +                            (ProxmoxVariant::Enterprise, "Enterprise repository"),
> +                            (ProxmoxVariant::NoSubscription, "No-Subscription repository"),
> +                            (ProxmoxVariant::Test, "Test repository"),
> +                        ];
>
> -                    let variant =
> -                        read_selection_from_tty("Select repository variant", variants, Some(0))?;
> +                        let variant = read_selection_from_tty(
> +                            "Select repository variant",
> +                            variants,
> +                            Some(0),
> +                        )?;
>
> -                    match variant {
> -                        ProxmoxVariant::Enterprise => {
> -                            use_subscription = Some(ProductType::Pve);
> -                            (
> -                                "https://enterprise.proxmox.com/debian/ceph",
> -                                "enterprise".to_string(),
> -                            )
> +                        match variant {
> +                            ProxmoxVariant::Enterprise => {
> +                                use_subscription = Some(ProductType::Pve);
> +                                (
> +                                    "https://enterprise.proxmox.com/debian/ceph",
> +                                    "enterprise".to_string(),
> +                                )
> +                            }
> +                            ProxmoxVariant::NoSubscription => (
> +                                "http://download.proxmox.com/debian/ceph",
> +                                "no-subscription".to_string(),
> +                            ),
> +                            ProxmoxVariant::Test => (
> +                                "http://download.proxmox.com/debian/ceph",
> +                                "test".to_string(),
> +                            ),
>                          }
> -                        ProxmoxVariant::NoSubscription => (
> +                    } else {
> +                        (
>                              "http://download.proxmox.com/debian/ceph",
> -                            "no-subscription".to_string(),
> -                        ),
> -                        ProxmoxVariant::Test => (
> -                            "http://download.proxmox.com/debian/ceph",
> -                            "test".to_string(),
> -                        ),
> -                    }
> -                } else {
> -                    (
> -                        "http://download.proxmox.com/debian/ceph",
> -                        read_string_from_tty("Enter repository components", Some("main test"))?,
> -                    )
> -                };
> +                            read_string_from_tty("Enter repository components", Some("main test"))?,
> +                        )
> +                    };
>
>                  let key = match release {
> +                    Release::Trixie => "/etc/apt/trusted.gpg.d/proxmox-release-trixie.gpg",
>                      Release::Bookworm => "/etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg",
>                      Release::Bullseye => "/etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg",
>                      Release::Buster => "/etc/apt/trusted.gpg.d/proxmox-release-buster.gpg",
> @@ -353,6 +382,15 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
>
>                  // TODO enterprise query for key!
>                  let url = match (release, variant) {
> +                    (Release::Trixie, ProxmoxVariant::Enterprise) => format!(
> +                        "https://enterprise.proxmox.com/debian/{product} trixie {product}-enterprise"
> +                    ),
> +                    (Release::Trixie, ProxmoxVariant::NoSubscription) => format!(
> +                        "http://download.proxmox.com/debian/{product} trixie {product}-no-subscription"
> +                    ),
> +                    (Release::Trixie, ProxmoxVariant::Test) => {
> +                        format!("http://download.proxmox.com/debian/{product} trixie {product}test")
> +                    }
>                      (Release::Bookworm, ProxmoxVariant::Enterprise) => format!(
>                          "https://enterprise.proxmox.com/debian/{product} bookworm {product}-enterprise"
>                      ),
> @@ -390,6 +428,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
>                  };
>
>                  let key = match release {
> +                    Release::Trixie => "/etc/apt/trusted.gpg.d/proxmox-release-trixie.gpg",
>                      Release::Bookworm => "/etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg",
>                      Release::Bullseye => "/etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg",
>                      Release::Buster => "/etc/apt/trusted.gpg.d/proxmox-release-buster.gpg",



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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-08-29  8:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-27 14:24 [pbs-devel] [PATCH proxmox-offline-mirror] mirror: add support for trixie repositories Shannon Sterz
2025-08-27 14:35 ` Shannon Sterz
2025-08-28 21:21 ` Thomas Lamprecht
2025-08-29  8:19   ` Shannon Sterz
2025-08-29  8:24 ` [pbs-devel] Superseded: " Shannon Sterz

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