* [pve-devel] [PATCH proxmox-offline-mirror 1/8] wizard: simplify repository url generation
2025-09-08 13:16 [pve-devel] [PATCH proxmox-offline-mirror 0/8] misc. wizard cleanup Fabian Grünbichler
@ 2025-09-08 13:16 ` Fabian Grünbichler
2025-09-08 13:16 ` [pve-devel] [PATCH proxmox-offline-mirror 2/8] wizard: implement PartialOrd/Ord on Release Fabian Grünbichler
` (8 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Fabian Grünbichler @ 2025-09-08 13:16 UTC (permalink / raw)
To: pve-devel
everything but Buster follows the same scheme
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
src/bin/proxmox-offline-mirror.rs | 74 +++++++++++--------------------
1 file changed, 25 insertions(+), 49 deletions(-)
diff --git a/src/bin/proxmox-offline-mirror.rs b/src/bin/proxmox-offline-mirror.rs
index cb786cd..c67ff82 100644
--- a/src/bin/proxmox-offline-mirror.rs
+++ b/src/bin/proxmox-offline-mirror.rs
@@ -45,6 +45,7 @@ impl Display for Distro {
}
}
+#[derive(PartialEq, Eq)]
enum Release {
Trixie,
Bookworm,
@@ -63,6 +64,7 @@ impl Display for Release {
}
}
+#[derive(PartialEq, Eq)]
enum DebianVariant {
Main,
Security,
@@ -136,54 +138,26 @@ fn derive_debian_repo(
skip_packages,
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"
- }
- (Release::Bookworm, DebianVariant::Updates) => {
- "http://deb.debian.org/debian bookworm-updates"
- }
- (Release::Bookworm, DebianVariant::Backports) => {
- "http://deb.debian.org/debian bookworm-backports"
- }
- (Release::Bookworm, DebianVariant::Debug) => {
- "http://deb.debian.org/debian-debug bookworm-debug"
- }
- (Release::Bullseye, DebianVariant::Main) => "http://deb.debian.org/debian bullseye",
- (Release::Bullseye, DebianVariant::Security) => {
- "http://deb.debian.org/debian-security bullseye-security"
- }
- (Release::Bullseye, DebianVariant::Updates) => {
- "http://deb.debian.org/debian bullseye-updates"
- }
- (Release::Bullseye, DebianVariant::Backports) => {
- "http://deb.debian.org/debian bullseye-backports"
- }
- (Release::Bullseye, DebianVariant::Debug) => {
- "http://deb.debian.org/debian-debug bullseye-debug"
- }
- (Release::Buster, DebianVariant::Main) => "http://deb.debian.org/debian buster",
- (Release::Buster, DebianVariant::Security) => {
- "http://deb.debian.org/debian-security buster/updates"
- }
- (Release::Buster, DebianVariant::Updates) => "http://deb.debian.org/debian buster-updates",
- (Release::Buster, DebianVariant::Backports) => {
- "http://deb.debian.org/debian buster-backports"
- }
- (Release::Buster, DebianVariant::Debug) => {
- "http://deb.debian.org/debian-debug buster-debug"
+ let url = if *release == Release::Buster && *variant == DebianVariant::Security {
+ // non-standard security repo
+ "http://deb.debian.org/debian-security buster/updates".to_string()
+ } else {
+ match variant {
+ DebianVariant::Main => {
+ format!("http://deb.debian.org/debian {release}")
+ }
+ DebianVariant::Security => {
+ format!("http://deb.debian.org/debian-security {release}-security")
+ }
+ DebianVariant::Updates => {
+ format!("http://deb.debian.org/debian {release}-updates")
+ }
+ DebianVariant::Backports => {
+ format!("http://deb.debian.org/debian {release}-backports")
+ }
+ DebianVariant::Debug => {
+ format!("http://deb.debian.org/debian-debug {release}-debug")
+ }
}
};
@@ -389,7 +363,9 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
"http://download.proxmox.com/debian/{product} trixie {product}-no-subscription"
),
(Release::Trixie, ProxmoxVariant::Test) => {
- format!("http://download.proxmox.com/debian/{product} trixie {product}-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"
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* [pve-devel] [PATCH proxmox-offline-mirror 2/8] wizard: implement PartialOrd/Ord on Release
2025-09-08 13:16 [pve-devel] [PATCH proxmox-offline-mirror 0/8] misc. wizard cleanup Fabian Grünbichler
2025-09-08 13:16 ` [pve-devel] [PATCH proxmox-offline-mirror 1/8] wizard: simplify repository url generation Fabian Grünbichler
@ 2025-09-08 13:16 ` Fabian Grünbichler
2025-09-08 13:16 ` [pve-devel] [PATCH proxmox-offline-mirror 3/8] wizard: switch to .pgp for Debian keyring files Fabian Grünbichler
` (7 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Fabian Grünbichler @ 2025-09-08 13:16 UTC (permalink / raw)
To: pve-devel
Debian releases all have an associated number that we can use for comparison
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
src/bin/proxmox-offline-mirror.rs | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/bin/proxmox-offline-mirror.rs b/src/bin/proxmox-offline-mirror.rs
index c67ff82..9b8a230 100644
--- a/src/bin/proxmox-offline-mirror.rs
+++ b/src/bin/proxmox-offline-mirror.rs
@@ -45,12 +45,12 @@ impl Display for Distro {
}
}
-#[derive(PartialEq, Eq)]
+#[derive(PartialEq, Eq, PartialOrd, Ord)]
enum Release {
- Trixie,
- Bookworm,
- Bullseye,
- Buster,
+ Trixie = 13,
+ Bookworm = 12,
+ Bullseye = 11,
+ Buster = 10,
}
impl Display for Release {
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* [pve-devel] [PATCH proxmox-offline-mirror 3/8] wizard: switch to .pgp for Debian keyring files
2025-09-08 13:16 [pve-devel] [PATCH proxmox-offline-mirror 0/8] misc. wizard cleanup Fabian Grünbichler
2025-09-08 13:16 ` [pve-devel] [PATCH proxmox-offline-mirror 1/8] wizard: simplify repository url generation Fabian Grünbichler
2025-09-08 13:16 ` [pve-devel] [PATCH proxmox-offline-mirror 2/8] wizard: implement PartialOrd/Ord on Release Fabian Grünbichler
@ 2025-09-08 13:16 ` Fabian Grünbichler
2025-09-08 13:53 ` Shannon Sterz
2025-09-08 13:16 ` [pve-devel] [PATCH proxmox-offline-mirror 4/8] wizard: use /usr/share/keyring/proxmox-release-bookworm.gpg Fabian Grünbichler
` (6 subsequent siblings)
9 siblings, 1 reply; 15+ messages in thread
From: Fabian Grünbichler @ 2025-09-08 13:16 UTC (permalink / raw)
To: pve-devel
.gpg is only used for backwards-compat via a symlink
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
src/bin/proxmox-offline-mirror.rs | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/bin/proxmox-offline-mirror.rs b/src/bin/proxmox-offline-mirror.rs
index 9b8a230..fb0f43e 100644
--- a/src/bin/proxmox-offline-mirror.rs
+++ b/src/bin/proxmox-offline-mirror.rs
@@ -162,26 +162,27 @@ 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"
+ "/usr/share/keyrings/debian-archive-trixie-security-automatic.pgp"
}
(Release::Trixie, DebianVariant::Updates) | (Release::Trixie, DebianVariant::Backports) => {
- "/usr/share/keyrings/debian-archive-trixie-automatic.gpg"
+ "/usr/share/keyrings/debian-archive-trixie-automatic.pgp"
}
- (Release::Trixie, _) => "/usr/share/keyrings/debian-archive-trixie-stable.gpg",
+ (Release::Trixie, _) => "/usr/share/keyrings/debian-archive-trixie-stable.pgp",
(Release::Bookworm, DebianVariant::Security) => {
- "/usr/share/keyrings/debian-archive-bookworm-security-automatic.gpg"
+ "/usr/share/keyrings/debian-archive-bookworm-security-automatic.pgp"
}
(Release::Bookworm, DebianVariant::Updates)
| (Release::Bookworm, DebianVariant::Backports) => {
- "/usr/share/keyrings/debian-archive-bookworm-automatic.gpg"
+ "/usr/share/keyrings/debian-archive-bookworm-automatic.pgp"
}
- (Release::Bookworm, _) => "/usr/share/keyrings/debian-archive-bookworm-stable.gpg",
+ (Release::Bookworm, _) => "/usr/share/keyrings/debian-archive-bookworm-stable.pgp",
(Release::Bullseye, DebianVariant::Security) => {
- "/usr/share/keyrings/debian-archive-bullseye-security-automatic.gpg"
+ "/usr/share/keyrings/debian-archive-bullseye-security-automatic.pgp"
}
- (Release::Bullseye, _) => "/usr/share/keyrings/debian-archive-bullseye-automatic.gpg",
+ (Release::Bullseye, _) => "/usr/share/keyrings/debian-archive-bullseye-automatic.pgp",
(Release::Buster, DebianVariant::Security) => {
"/usr/share/keyrings/debian-archive-buster-security-automatic.gpg"
}
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [pve-devel] [PATCH proxmox-offline-mirror 3/8] wizard: switch to .pgp for Debian keyring files
2025-09-08 13:16 ` [pve-devel] [PATCH proxmox-offline-mirror 3/8] wizard: switch to .pgp for Debian keyring files Fabian Grünbichler
@ 2025-09-08 13:53 ` Shannon Sterz
2025-09-09 8:24 ` Fabian Grünbichler
0 siblings, 1 reply; 15+ messages in thread
From: Shannon Sterz @ 2025-09-08 13:53 UTC (permalink / raw)
To: Proxmox VE development discussion, Fabian Grünbichler
On Mon Sep 8, 2025 at 3:16 PM CEST, Fabian Grünbichler wrote:
> .gpg is only used for backwards-compat via a symlink
>
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> ---
> src/bin/proxmox-offline-mirror.rs | 17 +++++++++--------
> 1 file changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/src/bin/proxmox-offline-mirror.rs b/src/bin/proxmox-offline-mirror.rs
> index 9b8a230..fb0f43e 100644
> --- a/src/bin/proxmox-offline-mirror.rs
> +++ b/src/bin/proxmox-offline-mirror.rs
> @@ -162,26 +162,27 @@ 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"
> + "/usr/share/keyrings/debian-archive-trixie-security-automatic.pgp"
> }
> (Release::Trixie, DebianVariant::Updates) | (Release::Trixie, DebianVariant::Backports) => {
> - "/usr/share/keyrings/debian-archive-trixie-automatic.gpg"
> + "/usr/share/keyrings/debian-archive-trixie-automatic.pgp"
> }
> - (Release::Trixie, _) => "/usr/share/keyrings/debian-archive-trixie-stable.gpg",
> + (Release::Trixie, _) => "/usr/share/keyrings/debian-archive-trixie-stable.pgp",
> (Release::Bookworm, DebianVariant::Security) => {
> - "/usr/share/keyrings/debian-archive-bookworm-security-automatic.gpg"
> + "/usr/share/keyrings/debian-archive-bookworm-security-automatic.pgp"
> }
> (Release::Bookworm, DebianVariant::Updates)
> | (Release::Bookworm, DebianVariant::Backports) => {
> - "/usr/share/keyrings/debian-archive-bookworm-automatic.gpg"
> + "/usr/share/keyrings/debian-archive-bookworm-automatic.pgp"
> }
> - (Release::Bookworm, _) => "/usr/share/keyrings/debian-archive-bookworm-stable.gpg",
> + (Release::Bookworm, _) => "/usr/share/keyrings/debian-archive-bookworm-stable.pgp",
> (Release::Bullseye, DebianVariant::Security) => {
> - "/usr/share/keyrings/debian-archive-bullseye-security-automatic.gpg"
> + "/usr/share/keyrings/debian-archive-bullseye-security-automatic.pgp"
> }
> - (Release::Bullseye, _) => "/usr/share/keyrings/debian-archive-bullseye-automatic.gpg",
> + (Release::Bullseye, _) => "/usr/share/keyrings/debian-archive-bullseye-automatic.pgp",
> (Release::Buster, DebianVariant::Security) => {
> "/usr/share/keyrings/debian-archive-buster-security-automatic.gpg"
> }
couldn't we do something similar as before (patch 1 of this series)
here too to simplify this match statement? for example:
let key = match (release, variant) {
(_, DebianVariant::Security) => {
&format!("/usr/share/keyrings/debian-archive-{release}-security-automatic.pgp")
}
(Release::Bullseye, _) => "/usr/share/keyrings/debian-archive-bullseye-automatic.pgp",
(
Release::Trixie | Release::Bookworm,
DebianVariant::Updates | DebianVariant::Backports,
) => &format!("/usr/share/keyrings/debian-archive-{release}-automatic.pgp)"),
_ => &format!("/usr/share/keyrings/debian-archive-{release}-stable.pgp"),
};
or do we want to keep it as-is for clarity? (note i already dropped the
buster variant here)
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [pve-devel] [PATCH proxmox-offline-mirror 3/8] wizard: switch to .pgp for Debian keyring files
2025-09-08 13:53 ` Shannon Sterz
@ 2025-09-09 8:24 ` Fabian Grünbichler
0 siblings, 0 replies; 15+ messages in thread
From: Fabian Grünbichler @ 2025-09-09 8:24 UTC (permalink / raw)
To: Proxmox VE development discussion, Shannon Sterz
On September 8, 2025 3:53 pm, Shannon Sterz wrote:
> On Mon Sep 8, 2025 at 3:16 PM CEST, Fabian Grünbichler wrote:
>> .gpg is only used for backwards-compat via a symlink
>>
>> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
>> ---
>> src/bin/proxmox-offline-mirror.rs | 17 +++++++++--------
>> 1 file changed, 9 insertions(+), 8 deletions(-)
>>
>> diff --git a/src/bin/proxmox-offline-mirror.rs b/src/bin/proxmox-offline-mirror.rs
>> index 9b8a230..fb0f43e 100644
>> --- a/src/bin/proxmox-offline-mirror.rs
>> +++ b/src/bin/proxmox-offline-mirror.rs
>> @@ -162,26 +162,27 @@ 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"
>> + "/usr/share/keyrings/debian-archive-trixie-security-automatic.pgp"
>> }
>> (Release::Trixie, DebianVariant::Updates) | (Release::Trixie, DebianVariant::Backports) => {
>> - "/usr/share/keyrings/debian-archive-trixie-automatic.gpg"
>> + "/usr/share/keyrings/debian-archive-trixie-automatic.pgp"
>> }
>> - (Release::Trixie, _) => "/usr/share/keyrings/debian-archive-trixie-stable.gpg",
>> + (Release::Trixie, _) => "/usr/share/keyrings/debian-archive-trixie-stable.pgp",
>> (Release::Bookworm, DebianVariant::Security) => {
>> - "/usr/share/keyrings/debian-archive-bookworm-security-automatic.gpg"
>> + "/usr/share/keyrings/debian-archive-bookworm-security-automatic.pgp"
>> }
>> (Release::Bookworm, DebianVariant::Updates)
>> | (Release::Bookworm, DebianVariant::Backports) => {
>> - "/usr/share/keyrings/debian-archive-bookworm-automatic.gpg"
>> + "/usr/share/keyrings/debian-archive-bookworm-automatic.pgp"
>> }
>> - (Release::Bookworm, _) => "/usr/share/keyrings/debian-archive-bookworm-stable.gpg",
>> + (Release::Bookworm, _) => "/usr/share/keyrings/debian-archive-bookworm-stable.pgp",
>> (Release::Bullseye, DebianVariant::Security) => {
>> - "/usr/share/keyrings/debian-archive-bullseye-security-automatic.gpg"
>> + "/usr/share/keyrings/debian-archive-bullseye-security-automatic.pgp"
>> }
>> - (Release::Bullseye, _) => "/usr/share/keyrings/debian-archive-bullseye-automatic.gpg",
>> + (Release::Bullseye, _) => "/usr/share/keyrings/debian-archive-bullseye-automatic.pgp",
>> (Release::Buster, DebianVariant::Security) => {
>> "/usr/share/keyrings/debian-archive-buster-security-automatic.gpg"
>> }
>
> couldn't we do something similar as before (patch 1 of this series)
> here too to simplify this match statement? for example:
>
> let key = match (release, variant) {
> (_, DebianVariant::Security) => {
> &format!("/usr/share/keyrings/debian-archive-{release}-security-automatic.pgp")
> }
> (Release::Bullseye, _) => "/usr/share/keyrings/debian-archive-bullseye-automatic.pgp",
> (
> Release::Trixie | Release::Bookworm,
> DebianVariant::Updates | DebianVariant::Backports,
> ) => &format!("/usr/share/keyrings/debian-archive-{release}-automatic.pgp)"),
> _ => &format!("/usr/share/keyrings/debian-archive-{release}-stable.pgp"),
> };
>
> or do we want to keep it as-is for clarity? (note i already dropped the
> buster variant here)
I tried to limit myself to instances where the code got shorter without
losing much (or any ;)) readability, and this one didn't make that cut
for me..
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* [pve-devel] [PATCH proxmox-offline-mirror 4/8] wizard: use /usr/share/keyring/proxmox-release-bookworm.gpg
2025-09-08 13:16 [pve-devel] [PATCH proxmox-offline-mirror 0/8] misc. wizard cleanup Fabian Grünbichler
` (2 preceding siblings ...)
2025-09-08 13:16 ` [pve-devel] [PATCH proxmox-offline-mirror 3/8] wizard: switch to .pgp for Debian keyring files Fabian Grünbichler
@ 2025-09-08 13:16 ` Fabian Grünbichler
2025-09-08 13:16 ` [pve-devel] [PATCH proxmox-offline-mirror 5/8] wizard: simplify Proxmox repository url generation Fabian Grünbichler
` (5 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Fabian Grünbichler @ 2025-09-08 13:16 UTC (permalink / raw)
To: pve-devel
instead of old location in /etc/apt/trusted.gpg.d , which is deprecated.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
src/bin/proxmox-offline-mirror.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/bin/proxmox-offline-mirror.rs b/src/bin/proxmox-offline-mirror.rs
index fb0f43e..8198cff 100644
--- a/src/bin/proxmox-offline-mirror.rs
+++ b/src/bin/proxmox-offline-mirror.rs
@@ -325,7 +325,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
let key = match release {
Release::Trixie => "/usr/share/keyrings/proxmox-release-trixie.gpg",
- Release::Bookworm => "/etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg",
+ Release::Bookworm => "/usr/share/keyrings/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",
};
@@ -406,7 +406,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
let key = match release {
Release::Trixie => "/usr/share/keyrings/proxmox-release-trixie.gpg",
- Release::Bookworm => "/etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg",
+ Release::Bookworm => "/usr/share/keyrings/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.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* [pve-devel] [PATCH proxmox-offline-mirror 5/8] wizard: simplify Proxmox repository url generation
2025-09-08 13:16 [pve-devel] [PATCH proxmox-offline-mirror 0/8] misc. wizard cleanup Fabian Grünbichler
` (3 preceding siblings ...)
2025-09-08 13:16 ` [pve-devel] [PATCH proxmox-offline-mirror 4/8] wizard: use /usr/share/keyring/proxmox-release-bookworm.gpg Fabian Grünbichler
@ 2025-09-08 13:16 ` Fabian Grünbichler
2025-09-08 15:20 ` Shannon Sterz
2025-09-08 13:16 ` [pve-devel] [PATCH proxmox-offline-mirror 6/8] wizard: drop Release::Buster and Ceph::Luminous/Nautilus Fabian Grünbichler
` (4 subsequent siblings)
9 siblings, 1 reply; 15+ messages in thread
From: Fabian Grünbichler @ 2025-09-08 13:16 UTC (permalink / raw)
To: pve-devel
except for test since Trixie, all repositories follow the same scheme..
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
src/bin/proxmox-offline-mirror.rs | 51 +++++++++----------------------
1 file changed, 15 insertions(+), 36 deletions(-)
diff --git a/src/bin/proxmox-offline-mirror.rs b/src/bin/proxmox-offline-mirror.rs
index 8198cff..c444e6d 100644
--- a/src/bin/proxmox-offline-mirror.rs
+++ b/src/bin/proxmox-offline-mirror.rs
@@ -356,44 +356,23 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
read_selection_from_tty("Select repository variant", variants, Some(0))?;
// TODO enterprise query for key!
- let url = match (release, variant) {
- (Release::Trixie, ProxmoxVariant::Enterprise) => format!(
- "https://enterprise.proxmox.com/debian/{product} trixie {product}-enterprise"
+ let url = match variant {
+ ProxmoxVariant::Enterprise => format!(
+ "https://enterprise.proxmox.com/debian/{product} {release} {product}-enterprise"
),
- (Release::Trixie, ProxmoxVariant::NoSubscription) => format!(
- "http://download.proxmox.com/debian/{product} trixie {product}-no-subscription"
+ ProxmoxVariant::NoSubscription => format!(
+ "http://download.proxmox.com/debian/{product} {release} {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"
- ),
- (Release::Bookworm, ProxmoxVariant::NoSubscription) => format!(
- "http://download.proxmox.com/debian/{product} bookworm {product}-no-subscription"
- ),
- (Release::Bookworm, ProxmoxVariant::Test) => format!(
- "http://download.proxmox.com/debian/{product} bookworm {product}test"
- ),
- (Release::Bullseye, ProxmoxVariant::Enterprise) => format!(
- "https://enterprise.proxmox.com/debian/{product} bullseye {product}-enterprise"
- ),
- (Release::Bullseye, ProxmoxVariant::NoSubscription) => format!(
- "http://download.proxmox.com/debian/{product} bullseye {product}-no-subscription"
- ),
- (Release::Bullseye, ProxmoxVariant::Test) => format!(
- "http://download.proxmox.com/debian/{product} bullseye {product}test"
- ),
- (Release::Buster, ProxmoxVariant::Enterprise) => format!(
- "https://enterprise.proxmox.com/debian/{product} buster {product}-enterprise"
- ),
- (Release::Buster, ProxmoxVariant::NoSubscription) => format!(
- "http://download.proxmox.com/debian/{product} buster {product}-no-subscription"
- ),
- (Release::Buster, ProxmoxVariant::Test) => {
- format!("http://download.proxmox.com/debian/{product} buster {product}test")
+ ProxmoxVariant::Test => {
+ if release >= &Release::Trixie {
+ format!(
+ "http://download.proxmox.com/debian/{product} {release} {product}-test"
+ )
+ } else {
+ format!(
+ "http://download.proxmox.com/debian/{product} {release} {product}test"
+ )
+ }
}
};
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [pve-devel] [PATCH proxmox-offline-mirror 5/8] wizard: simplify Proxmox repository url generation
2025-09-08 13:16 ` [pve-devel] [PATCH proxmox-offline-mirror 5/8] wizard: simplify Proxmox repository url generation Fabian Grünbichler
@ 2025-09-08 15:20 ` Shannon Sterz
2025-09-09 8:35 ` Fabian Grünbichler
0 siblings, 1 reply; 15+ messages in thread
From: Shannon Sterz @ 2025-09-08 15:20 UTC (permalink / raw)
To: Proxmox VE development discussion, Fabian Grünbichler
On Mon Sep 8, 2025 at 3:16 PM CEST, Fabian Grünbichler wrote:
> except for test since Trixie, all repositories follow the same scheme..
>
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> ---
> src/bin/proxmox-offline-mirror.rs | 51 +++++++++----------------------
> 1 file changed, 15 insertions(+), 36 deletions(-)
>
> diff --git a/src/bin/proxmox-offline-mirror.rs b/src/bin/proxmox-offline-mirror.rs
> index 8198cff..c444e6d 100644
> --- a/src/bin/proxmox-offline-mirror.rs
> +++ b/src/bin/proxmox-offline-mirror.rs
> @@ -356,44 +356,23 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
> read_selection_from_tty("Select repository variant", variants, Some(0))?;
>
> // TODO enterprise query for key!
> - let url = match (release, variant) {
> - (Release::Trixie, ProxmoxVariant::Enterprise) => format!(
> - "https://enterprise.proxmox.com/debian/{product} trixie {product}-enterprise"
> + let url = match variant {
> + ProxmoxVariant::Enterprise => format!(
> + "https://enterprise.proxmox.com/debian/{product} {release} {product}-enterprise"
> ),
> - (Release::Trixie, ProxmoxVariant::NoSubscription) => format!(
> - "http://download.proxmox.com/debian/{product} trixie {product}-no-subscription"
> + ProxmoxVariant::NoSubscription => format!(
> + "http://download.proxmox.com/debian/{product} {release} {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"
> - ),
> - (Release::Bookworm, ProxmoxVariant::NoSubscription) => format!(
> - "http://download.proxmox.com/debian/{product} bookworm {product}-no-subscription"
> - ),
> - (Release::Bookworm, ProxmoxVariant::Test) => format!(
> - "http://download.proxmox.com/debian/{product} bookworm {product}test"
> - ),
> - (Release::Bullseye, ProxmoxVariant::Enterprise) => format!(
> - "https://enterprise.proxmox.com/debian/{product} bullseye {product}-enterprise"
> - ),
> - (Release::Bullseye, ProxmoxVariant::NoSubscription) => format!(
> - "http://download.proxmox.com/debian/{product} bullseye {product}-no-subscription"
> - ),
> - (Release::Bullseye, ProxmoxVariant::Test) => format!(
> - "http://download.proxmox.com/debian/{product} bullseye {product}test"
> - ),
> - (Release::Buster, ProxmoxVariant::Enterprise) => format!(
> - "https://enterprise.proxmox.com/debian/{product} buster {product}-enterprise"
> - ),
> - (Release::Buster, ProxmoxVariant::NoSubscription) => format!(
> - "http://download.proxmox.com/debian/{product} buster {product}-no-subscription"
> - ),
> - (Release::Buster, ProxmoxVariant::Test) => {
> - format!("http://download.proxmox.com/debian/{product} buster {product}test")
> + ProxmoxVariant::Test => {
> + if release >= &Release::Trixie {
> + format!(
> + "http://download.proxmox.com/debian/{product} {release} {product}-test"
> + )
> + } else {
> + format!(
> + "http://download.proxmox.com/debian/{product} {release} {product}test"
> + )
> + }
> }
> };
>
is there a reason why the `Display` implementation for
`ProxmoxVariant::NoSubscription` uses an underscore? from what i can
tell we mostly seem to use it to derive a suggested mirro id. if we used
a hyphen there instead this could become
if release < &Release::Trixie && variant == ProxmoxVariant::Test {
format!(
"http://download.proxmox.com/debian/{product} {release} {product}test"
)
} else {
format!(
"http://download.proxmox.com/debian/{product} {release} {product}-{variant}"
)
}
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [pve-devel] [PATCH proxmox-offline-mirror 5/8] wizard: simplify Proxmox repository url generation
2025-09-08 15:20 ` Shannon Sterz
@ 2025-09-09 8:35 ` Fabian Grünbichler
0 siblings, 0 replies; 15+ messages in thread
From: Fabian Grünbichler @ 2025-09-09 8:35 UTC (permalink / raw)
To: Proxmox VE development discussion, Shannon Sterz
On September 8, 2025 5:20 pm, Shannon Sterz wrote:
> On Mon Sep 8, 2025 at 3:16 PM CEST, Fabian Grünbichler wrote:
>> except for test since Trixie, all repositories follow the same scheme..
>>
>> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
>> ---
>> src/bin/proxmox-offline-mirror.rs | 51 +++++++++----------------------
>> 1 file changed, 15 insertions(+), 36 deletions(-)
>>
>> diff --git a/src/bin/proxmox-offline-mirror.rs b/src/bin/proxmox-offline-mirror.rs
>> index 8198cff..c444e6d 100644
>> --- a/src/bin/proxmox-offline-mirror.rs
>> +++ b/src/bin/proxmox-offline-mirror.rs
>> @@ -356,44 +356,23 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
>> read_selection_from_tty("Select repository variant", variants, Some(0))?;
>>
>> // TODO enterprise query for key!
>> - let url = match (release, variant) {
>> - (Release::Trixie, ProxmoxVariant::Enterprise) => format!(
>> - "https://enterprise.proxmox.com/debian/{product} trixie {product}-enterprise"
>> + let url = match variant {
>> + ProxmoxVariant::Enterprise => format!(
>> + "https://enterprise.proxmox.com/debian/{product} {release} {product}-enterprise"
>> ),
>> - (Release::Trixie, ProxmoxVariant::NoSubscription) => format!(
>> - "http://download.proxmox.com/debian/{product} trixie {product}-no-subscription"
>> + ProxmoxVariant::NoSubscription => format!(
>> + "http://download.proxmox.com/debian/{product} {release} {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"
>> - ),
>> - (Release::Bookworm, ProxmoxVariant::NoSubscription) => format!(
>> - "http://download.proxmox.com/debian/{product} bookworm {product}-no-subscription"
>> - ),
>> - (Release::Bookworm, ProxmoxVariant::Test) => format!(
>> - "http://download.proxmox.com/debian/{product} bookworm {product}test"
>> - ),
>> - (Release::Bullseye, ProxmoxVariant::Enterprise) => format!(
>> - "https://enterprise.proxmox.com/debian/{product} bullseye {product}-enterprise"
>> - ),
>> - (Release::Bullseye, ProxmoxVariant::NoSubscription) => format!(
>> - "http://download.proxmox.com/debian/{product} bullseye {product}-no-subscription"
>> - ),
>> - (Release::Bullseye, ProxmoxVariant::Test) => format!(
>> - "http://download.proxmox.com/debian/{product} bullseye {product}test"
>> - ),
>> - (Release::Buster, ProxmoxVariant::Enterprise) => format!(
>> - "https://enterprise.proxmox.com/debian/{product} buster {product}-enterprise"
>> - ),
>> - (Release::Buster, ProxmoxVariant::NoSubscription) => format!(
>> - "http://download.proxmox.com/debian/{product} buster {product}-no-subscription"
>> - ),
>> - (Release::Buster, ProxmoxVariant::Test) => {
>> - format!("http://download.proxmox.com/debian/{product} buster {product}test")
>> + ProxmoxVariant::Test => {
>> + if release >= &Release::Trixie {
>> + format!(
>> + "http://download.proxmox.com/debian/{product} {release} {product}-test"
>> + )
>> + } else {
>> + format!(
>> + "http://download.proxmox.com/debian/{product} {release} {product}test"
>> + )
>> + }
>> }
>> };
>>
>
> is there a reason why the `Display` implementation for
> `ProxmoxVariant::NoSubscription` uses an underscore? from what i can
> tell we mostly seem to use it to derive a suggested mirro id. if we used
> a hyphen there instead this could become
>
> if release < &Release::Trixie && variant == ProxmoxVariant::Test {
> format!(
> "http://download.proxmox.com/debian/{product} {release} {product}test"
> )
> } else {
> format!(
> "http://download.proxmox.com/debian/{product} {release} {product}-{variant}"
> )
> }
I guess this would work - but it still needs to account for enterprise
having a different base url ;) I'll send a follow-up patch for this if
it looks sane
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* [pve-devel] [PATCH proxmox-offline-mirror 6/8] wizard: drop Release::Buster and Ceph::Luminous/Nautilus
2025-09-08 13:16 [pve-devel] [PATCH proxmox-offline-mirror 0/8] misc. wizard cleanup Fabian Grünbichler
` (4 preceding siblings ...)
2025-09-08 13:16 ` [pve-devel] [PATCH proxmox-offline-mirror 5/8] wizard: simplify Proxmox repository url generation Fabian Grünbichler
@ 2025-09-08 13:16 ` Fabian Grünbichler
2025-09-08 13:16 ` [pve-devel] [PATCH proxmox-offline-mirror 7/8] wizard: simplify default Debian components Fabian Grünbichler
` (3 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Fabian Grünbichler @ 2025-09-08 13:16 UTC (permalink / raw)
To: pve-devel
not supported anymore, and the referenced key file does not exist anymore on a
Trixie-based system..
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
src/bin/proxmox-offline-mirror.rs | 55 +++++++++----------------------
1 file changed, 15 insertions(+), 40 deletions(-)
diff --git a/src/bin/proxmox-offline-mirror.rs b/src/bin/proxmox-offline-mirror.rs
index c444e6d..b14e680 100644
--- a/src/bin/proxmox-offline-mirror.rs
+++ b/src/bin/proxmox-offline-mirror.rs
@@ -50,7 +50,6 @@ enum Release {
Trixie = 13,
Bookworm = 12,
Bullseye = 11,
- Buster = 10,
}
impl Display for Release {
@@ -59,7 +58,6 @@ impl Display for Release {
Release::Trixie => write!(f, "trixie"),
Release::Bookworm => write!(f, "bookworm"),
Release::Bullseye => write!(f, "bullseye"),
- Release::Buster => write!(f, "buster"),
}
}
}
@@ -138,26 +136,21 @@ fn derive_debian_repo(
skip_packages,
skip_sections,
};
- let url = if *release == Release::Buster && *variant == DebianVariant::Security {
- // non-standard security repo
- "http://deb.debian.org/debian-security buster/updates".to_string()
- } else {
- match variant {
- DebianVariant::Main => {
- format!("http://deb.debian.org/debian {release}")
- }
- DebianVariant::Security => {
- format!("http://deb.debian.org/debian-security {release}-security")
- }
- DebianVariant::Updates => {
- format!("http://deb.debian.org/debian {release}-updates")
- }
- DebianVariant::Backports => {
- format!("http://deb.debian.org/debian {release}-backports")
- }
- DebianVariant::Debug => {
- format!("http://deb.debian.org/debian-debug {release}-debug")
- }
+ let url = match variant {
+ DebianVariant::Main => {
+ format!("http://deb.debian.org/debian {release}")
+ }
+ DebianVariant::Security => {
+ format!("http://deb.debian.org/debian-security {release}-security")
+ }
+ DebianVariant::Updates => {
+ format!("http://deb.debian.org/debian {release}-updates")
+ }
+ DebianVariant::Backports => {
+ format!("http://deb.debian.org/debian {release}-backports")
+ }
+ DebianVariant::Debug => {
+ format!("http://deb.debian.org/debian-debug {release}-debug")
}
};
@@ -183,10 +176,6 @@ fn derive_debian_repo(
"/usr/share/keyrings/debian-archive-bullseye-security-automatic.pgp"
}
(Release::Bullseye, _) => "/usr/share/keyrings/debian-archive-bullseye-automatic.pgp",
- (Release::Buster, DebianVariant::Security) => {
- "/usr/share/keyrings/debian-archive-buster-security-automatic.gpg"
- }
- (Release::Buster, _) => "/usr/share/keyrings/debian-archive-buster-stable.gpg",
};
let suggested_id = format!("debian_{release}_{variant}");
@@ -215,7 +204,6 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
(Release::Trixie, "Trixie"),
(Release::Bookworm, "Bookworm"),
(Release::Bullseye, "Bullseye"),
- (Release::Buster, "Buster"),
];
let release = read_selection_from_tty("Select release", releases, Some(0))?;
@@ -247,8 +235,6 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
}
Distro::PveCeph => {
enum CephRelease {
- Luminous,
- Nautilus,
Octopus,
Pacific,
Quincy,
@@ -270,13 +256,6 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
(CephRelease::Quincy, "Quincy (17.x)"),
]
}
- Release::Buster => {
- vec![
- (CephRelease::Luminous, "Luminous (12.x)"),
- (CephRelease::Nautilus, "Nautilus (14.x)"),
- (CephRelease::Octopus, "Octopus (15.x)"),
- ]
- }
};
let ceph_release = read_selection_from_tty(
@@ -327,12 +306,9 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
Release::Trixie => "/usr/share/keyrings/proxmox-release-trixie.gpg",
Release::Bookworm => "/usr/share/keyrings/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",
};
let ceph_release = match ceph_release {
- CephRelease::Luminous => "luminous",
- CephRelease::Nautilus => "nautilus",
CephRelease::Octopus => "octopus",
CephRelease::Pacific => "pacific",
CephRelease::Quincy => "quincy",
@@ -387,7 +363,6 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
Release::Trixie => "/usr/share/keyrings/proxmox-release-trixie.gpg",
Release::Bookworm => "/usr/share/keyrings/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",
};
let suggested_id = format!("{product}_{release}_{variant}");
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* [pve-devel] [PATCH proxmox-offline-mirror 7/8] wizard: simplify default Debian components
2025-09-08 13:16 [pve-devel] [PATCH proxmox-offline-mirror 0/8] misc. wizard cleanup Fabian Grünbichler
` (5 preceding siblings ...)
2025-09-08 13:16 ` [pve-devel] [PATCH proxmox-offline-mirror 6/8] wizard: drop Release::Buster and Ceph::Luminous/Nautilus Fabian Grünbichler
@ 2025-09-08 13:16 ` Fabian Grünbichler
2025-09-08 13:16 ` [pve-devel] [PATCH proxmox-offline-mirror 8/8] wizard: deduplicate Proxmox key path mapping Fabian Grünbichler
` (2 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Fabian Grünbichler @ 2025-09-08 13:16 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
src/bin/proxmox-offline-mirror.rs | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/bin/proxmox-offline-mirror.rs b/src/bin/proxmox-offline-mirror.rs
index b14e680..89bd0bb 100644
--- a/src/bin/proxmox-offline-mirror.rs
+++ b/src/bin/proxmox-offline-mirror.rs
@@ -221,11 +221,10 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
let variant =
read_selection_from_tty("Select repository variant", variants, Some(0))?;
- let default_components = match release {
- Release::Bookworm | Release::Trixie => {
- "main contrib non-free non-free-firmware"
- }
- _ => "main contrib non-free",
+ let default_components = if release >= &Release::Bookworm {
+ "main contrib non-free non-free-firmware"
+ } else {
+ "main contrib non-free"
};
let components =
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* [pve-devel] [PATCH proxmox-offline-mirror 8/8] wizard: deduplicate Proxmox key path mapping
2025-09-08 13:16 [pve-devel] [PATCH proxmox-offline-mirror 0/8] misc. wizard cleanup Fabian Grünbichler
` (6 preceding siblings ...)
2025-09-08 13:16 ` [pve-devel] [PATCH proxmox-offline-mirror 7/8] wizard: simplify default Debian components Fabian Grünbichler
@ 2025-09-08 13:16 ` Fabian Grünbichler
2025-09-08 15:27 ` [pve-devel] [PATCH proxmox-offline-mirror 0/8] misc. wizard cleanup Shannon Sterz
2025-09-09 9:02 ` [pve-devel] applied-series: " Fabian Grünbichler
9 siblings, 0 replies; 15+ messages in thread
From: Fabian Grünbichler @ 2025-09-08 13:16 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
src/bin/proxmox-offline-mirror.rs | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/src/bin/proxmox-offline-mirror.rs b/src/bin/proxmox-offline-mirror.rs
index 89bd0bb..8fd8415 100644
--- a/src/bin/proxmox-offline-mirror.rs
+++ b/src/bin/proxmox-offline-mirror.rs
@@ -52,6 +52,16 @@ enum Release {
Bullseye = 11,
}
+impl Release {
+ fn proxmox_key_path(&self) -> String {
+ if self >= &Release::Trixie {
+ format!("/usr/share/keyrings/proxmox-release-{self}.gpg")
+ } else {
+ "/etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg".to_string()
+ }
+ }
+}
+
impl Display for Release {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
@@ -301,11 +311,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
)
};
- let key = match release {
- Release::Trixie => "/usr/share/keyrings/proxmox-release-trixie.gpg",
- Release::Bookworm => "/usr/share/keyrings/proxmox-release-bookworm.gpg",
- Release::Bullseye => "/etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg",
- };
+ let key = release.proxmox_key_path();
let ceph_release = match ceph_release {
CephRelease::Octopus => "octopus",
@@ -318,7 +324,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
let url = format!("{base_url}-{ceph_release} {release} {components}");
let suggested_id = format!("ceph_{ceph_release}_{release}");
- (url, key.to_string(), suggested_id, SkipConfig::default())
+ (url, key, suggested_id, SkipConfig::default())
}
product => {
let variants = &[
@@ -358,11 +364,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
_ => None,
};
- let key = match release {
- Release::Trixie => "/usr/share/keyrings/proxmox-release-trixie.gpg",
- Release::Bookworm => "/usr/share/keyrings/proxmox-release-bookworm.gpg",
- Release::Bullseye => "/etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg",
- };
+ let key = release.proxmox_key_path();
let suggested_id = format!("{product}_{release}_{variant}");
@@ -371,7 +373,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
Some(true),
)?;
- (url, key.to_string(), suggested_id, SkipConfig::default())
+ (url, key, suggested_id, SkipConfig::default())
}
};
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [pve-devel] [PATCH proxmox-offline-mirror 0/8] misc. wizard cleanup
2025-09-08 13:16 [pve-devel] [PATCH proxmox-offline-mirror 0/8] misc. wizard cleanup Fabian Grünbichler
` (7 preceding siblings ...)
2025-09-08 13:16 ` [pve-devel] [PATCH proxmox-offline-mirror 8/8] wizard: deduplicate Proxmox key path mapping Fabian Grünbichler
@ 2025-09-08 15:27 ` Shannon Sterz
2025-09-09 9:02 ` [pve-devel] applied-series: " Fabian Grünbichler
9 siblings, 0 replies; 15+ messages in thread
From: Shannon Sterz @ 2025-09-08 15:27 UTC (permalink / raw)
To: Proxmox VE development discussion, Fabian Grünbichler
On Mon Sep 8, 2025 at 3:16 PM CEST, Fabian Grünbichler wrote:
> the user-visible changes:
> - Buster (and corresponding Ceph releases) dropped from selection
> - Debian keyring paths adapted to new .pgp extension
> - Proxmox Bookworm keyring path switched to /usr/share/keyrings/..
>
> Fabian Grünbichler (8):
> wizard: simplify repository url generation
> wizard: implement PartialOrd/Ord on Release
> wizard: switch to .pgp for Debian keyring files
> wizard: use /usr/share/keyring/proxmox-release-bookworm.gpg
> wizard: simplify Proxmox repository url generation
> wizard: drop Release::Buster and Ceph::Luminous/Nautilus
> wizard: simplify default Debian components
> wizard: deduplicate Proxmox key path mapping
>
> src/bin/proxmox-offline-mirror.rs | 184 ++++++++++--------------------
> 1 file changed, 58 insertions(+), 126 deletions(-)
other than the two comments i left on the previous patches, looks good
to me, so consider this:
Reviewed-by: Shannon Sterz <s.sterz@proxmox.com>
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 15+ messages in thread
* [pve-devel] applied-series: [PATCH proxmox-offline-mirror 0/8] misc. wizard cleanup
2025-09-08 13:16 [pve-devel] [PATCH proxmox-offline-mirror 0/8] misc. wizard cleanup Fabian Grünbichler
` (8 preceding siblings ...)
2025-09-08 15:27 ` [pve-devel] [PATCH proxmox-offline-mirror 0/8] misc. wizard cleanup Shannon Sterz
@ 2025-09-09 9:02 ` Fabian Grünbichler
9 siblings, 0 replies; 15+ messages in thread
From: Fabian Grünbichler @ 2025-09-09 9:02 UTC (permalink / raw)
To: Proxmox VE development discussion
with Shannon's R-B, and sent small follow-up:
https://lore.proxmox.com/pve-devel/20250909090213.323436-1-f.gruenbichler@proxmox.com/
On September 8, 2025 3:16 pm, Fabian Grünbichler wrote:
> the user-visible changes:
> - Buster (and corresponding Ceph releases) dropped from selection
> - Debian keyring paths adapted to new .pgp extension
> - Proxmox Bookworm keyring path switched to /usr/share/keyrings/..
>
> Fabian Grünbichler (8):
> wizard: simplify repository url generation
> wizard: implement PartialOrd/Ord on Release
> wizard: switch to .pgp for Debian keyring files
> wizard: use /usr/share/keyring/proxmox-release-bookworm.gpg
> wizard: simplify Proxmox repository url generation
> wizard: drop Release::Buster and Ceph::Luminous/Nautilus
> wizard: simplify default Debian components
> wizard: deduplicate Proxmox key path mapping
>
> src/bin/proxmox-offline-mirror.rs | 184 ++++++++++--------------------
> 1 file changed, 58 insertions(+), 126 deletions(-)
>
> --
> 2.47.3
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 15+ messages in thread