From: Stefan Sterz <s.sterz@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-offline-mirror v2 1/2] add bookworm to the list of releases
Date: Mon, 12 Jun 2023 15:37:14 +0200 [thread overview]
Message-ID: <20230612133715.453237-2-s.sterz@proxmox.com> (raw)
In-Reply-To: <20230612133715.453237-1-s.sterz@proxmox.com>
add support for bookworm based proxmox products and debian
repositories/
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
---
src/bin/proxmox-offline-mirror.rs | 35 ++++++++++++++++++++++++++++++-
1 file changed, 34 insertions(+), 1 deletion(-)
diff --git a/src/bin/proxmox-offline-mirror.rs b/src/bin/proxmox-offline-mirror.rs
index 8398db4..e2282d7 100644
--- a/src/bin/proxmox-offline-mirror.rs
+++ b/src/bin/proxmox-offline-mirror.rs
@@ -44,6 +44,7 @@ impl Display for Distro {
}
enum Release {
+ Bookworm,
Bullseye,
Buster,
}
@@ -51,6 +52,7 @@ enum Release {
impl Display for Release {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
+ Release::Bookworm => write!(f, "bookworm"),
Release::Bullseye => write!(f, "bullseye"),
Release::Buster => write!(f, "buster"),
}
@@ -131,6 +133,19 @@ fn derive_debian_repo(
skip_sections,
};
let url = match (release, variant) {
+ (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"
@@ -159,6 +174,14 @@ fn derive_debian_repo(
let url = format!("{url} {components}");
let key = match (release, variant) {
+ (Release::Bookworm, DebianVariant::Security) => {
+ "/usr/share/keyrings/debian-archive-bookworm-security-automatic.gpg"
+ }
+ (Release::Bookworm, DebianVariant::Updates) |
+ (Release::Bookworm, DebianVariant::Backports) => {
+ "/usr/share/keyrings/debian-archive-bookworm-automatic.gpg"
+ }
+ (Release::Bookworm, _) => "/usr/share/keyrings/debian-archive-bookworm-stable.gpg",
(Release::Bullseye, DebianVariant::Security) => {
"/usr/share/keyrings/debian-archive-bullseye-security-automatic.gpg"
}
@@ -191,7 +214,11 @@ 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::Bullseye, "Bullseye"), (Release::Buster, "Buster")];
+ let releases = &[
+ (Release::Bookworm, "Bookworm"),
+ (Release::Bullseye, "Bullseye"),
+ (Release::Buster, "Buster"),
+ ];
let release = read_selection_from_tty("Select release", releases, Some(0))?;
let mut add_debian_repo = false;
@@ -224,6 +251,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
}
let releases = match release {
+ &Release::Bookworm => vec![(CephRelease::Quincy, "Quincy (17.x)")],
Release::Bullseye => {
vec![
(CephRelease::Octopus, "Octopus (15.x)"),
@@ -250,6 +278,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
read_string_from_tty("Enter repository components", Some("main test"))?;
let key = match release {
+ 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",
};
@@ -281,6 +310,9 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
// TODO enterprise query for key!
let url = match (release, variant) {
+ (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"),
@@ -297,6 +329,7 @@ fn action_add_mirror(config: &SectionConfigData) -> Result<Vec<MirrorConfig>, Er
};
let key = match release {
+ 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.30.2
next prev parent reply other threads:[~2023-06-12 13:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 13:37 [pbs-devel] [PATCH proxmox-offline-mirror v2 0/2] POM support bookworm releases and ceph enterprise repo Stefan Sterz
2023-06-12 13:37 ` Stefan Sterz [this message]
2023-06-12 13:37 ` [pbs-devel] [PATCH proxmox-offline-mirror v2 2/2] add support for bookworm enterprise ceph repo Stefan Sterz
2023-06-16 8:05 ` [pbs-devel] applied-series: [PATCH proxmox-offline-mirror v2 0/2] POM support bookworm releases and ceph enterprise repo Thomas Lamprecht
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=20230612133715.453237-2-s.sterz@proxmox.com \
--to=s.sterz@proxmox.com \
--cc=pbs-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.