public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v2 proxmox 1/5] apt: drop older Ceph standard repositories
@ 2023-06-02  8:48 Fiona Ebner
  2023-06-02  8:48 ` [pve-devel] [PATCH v2 proxmox 2/5] apt: split Ceph main repository into no-subscription and enterprise Fiona Ebner
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Fiona Ebner @ 2023-06-02  8:48 UTC (permalink / raw)
  To: pve-devel

On Proxmox VE 8, only Quincy and newer will be supported.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---

No changes in v2.

Changes for the series in v2:
    * create temporary test directories inside CARGO_TARGET_TMPDIR
    * mention that deprecated 'main' component maps to no-subscription
      in description of the repo.

 proxmox-apt/src/repositories/mod.rs      |  4 --
 proxmox-apt/src/repositories/standard.rs | 58 ------------------------
 proxmox-apt/tests/repositories.rs        |  4 --
 3 files changed, 66 deletions(-)

diff --git a/proxmox-apt/src/repositories/mod.rs b/proxmox-apt/src/repositories/mod.rs
index d8848b8..11f52dd 100644
--- a/proxmox-apt/src/repositories/mod.rs
+++ b/proxmox-apt/src/repositories/mod.rs
@@ -92,10 +92,6 @@ pub fn standard_repositories(
         result.append(&mut vec![
             APTStandardRepository::from(APTRepositoryHandle::CephQuincy),
             APTStandardRepository::from(APTRepositoryHandle::CephQuincyTest),
-            APTStandardRepository::from(APTRepositoryHandle::CephPacific),
-            APTStandardRepository::from(APTRepositoryHandle::CephPacificTest),
-            APTStandardRepository::from(APTRepositoryHandle::CephOctopus),
-            APTStandardRepository::from(APTRepositoryHandle::CephOctopusTest),
         ]);
     }
 
diff --git a/proxmox-apt/src/repositories/standard.rs b/proxmox-apt/src/repositories/standard.rs
index 5af3117..33c4842 100644
--- a/proxmox-apt/src/repositories/standard.rs
+++ b/proxmox-apt/src/repositories/standard.rs
@@ -50,14 +50,6 @@ pub enum APTRepositoryHandle {
     CephQuincy,
     /// Ceph Quincy test repository.
     CephQuincyTest,
-    /// Ceph Pacific repository.
-    CephPacific,
-    /// Ceph Pacific test repository.
-    CephPacificTest,
-    /// Ceph Octoput repository.
-    CephOctopus,
-    /// Ceph Octoput test repository.
-    CephOctopusTest,
 }
 
 impl From<APTRepositoryHandle> for APTStandardRepository {
@@ -81,10 +73,6 @@ impl TryFrom<&str> for APTRepositoryHandle {
             "test" => Ok(APTRepositoryHandle::Test),
             "ceph-quincy" => Ok(APTRepositoryHandle::CephQuincy),
             "ceph-quincy-test" => Ok(APTRepositoryHandle::CephQuincyTest),
-            "ceph-pacific" => Ok(APTRepositoryHandle::CephPacific),
-            "ceph-pacific-test" => Ok(APTRepositoryHandle::CephPacificTest),
-            "ceph-octopus" => Ok(APTRepositoryHandle::CephOctopus),
-            "ceph-octopus-test" => Ok(APTRepositoryHandle::CephOctopusTest),
             _ => bail!("unknown repository handle '{}'", string),
         }
     }
@@ -98,10 +86,6 @@ impl Display for APTRepositoryHandle {
             APTRepositoryHandle::Test => write!(f, "test"),
             APTRepositoryHandle::CephQuincy => write!(f, "ceph-quincy"),
             APTRepositoryHandle::CephQuincyTest => write!(f, "ceph-quincy-test"),
-            APTRepositoryHandle::CephPacific => write!(f, "ceph-pacific"),
-            APTRepositoryHandle::CephPacificTest => write!(f, "ceph-pacific-test"),
-            APTRepositoryHandle::CephOctopus => write!(f, "ceph-octopus"),
-            APTRepositoryHandle::CephOctopusTest => write!(f, "ceph-octopus-test"),
         }
     }
 }
@@ -130,20 +114,6 @@ impl APTRepositoryHandle {
                 "This repository contains the Ceph Quincy packages before they are moved to the \
                 main repository."
             }
-            APTRepositoryHandle::CephPacific => {
-                "This repository holds the main Proxmox Ceph Pacific packages."
-            }
-            APTRepositoryHandle::CephPacificTest => {
-                "This repository contains the Ceph Pacific packages before they are moved to the \
-                main repository."
-            }
-            APTRepositoryHandle::CephOctopus => {
-                "This repository holds the main Proxmox Ceph Octopus packages."
-            }
-            APTRepositoryHandle::CephOctopusTest => {
-                "This repository contains the Ceph Octopus packages before they are moved to the \
-                main repository."
-            }
         }
         .to_string()
     }
@@ -156,10 +126,6 @@ impl APTRepositoryHandle {
             APTRepositoryHandle::Test => "Test",
             APTRepositoryHandle::CephQuincy => "Ceph Quincy",
             APTRepositoryHandle::CephQuincyTest => "Ceph Quincy Test",
-            APTRepositoryHandle::CephPacific => "Ceph Pacific",
-            APTRepositoryHandle::CephPacificTest => "Ceph Pacific Test",
-            APTRepositoryHandle::CephOctopus => "Ceph Octopus",
-            APTRepositoryHandle::CephOctopusTest => "Ceph Octopus Test",
         }
         .to_string()
     }
@@ -174,10 +140,6 @@ impl APTRepositoryHandle {
             APTRepositoryHandle::Test => "/etc/apt/sources.list".to_string(),
             APTRepositoryHandle::CephQuincy => "/etc/apt/sources.list.d/ceph.list".to_string(),
             APTRepositoryHandle::CephQuincyTest => "/etc/apt/sources.list.d/ceph.list".to_string(),
-            APTRepositoryHandle::CephPacific => "/etc/apt/sources.list.d/ceph.list".to_string(),
-            APTRepositoryHandle::CephPacificTest => "/etc/apt/sources.list.d/ceph.list".to_string(),
-            APTRepositoryHandle::CephOctopus => "/etc/apt/sources.list.d/ceph.list".to_string(),
-            APTRepositoryHandle::CephOctopusTest => "/etc/apt/sources.list.d/ceph.list".to_string(),
         }
     }
 
@@ -229,26 +191,6 @@ impl APTRepositoryHandle {
                 vec!["http://download.proxmox.com/debian/ceph-quincy".to_string()],
                 "test".to_string(),
             ),
-            APTRepositoryHandle::CephPacific => (
-                APTRepositoryPackageType::Deb,
-                vec!["http://download.proxmox.com/debian/ceph-pacific".to_string()],
-                "main".to_string(),
-            ),
-            APTRepositoryHandle::CephPacificTest => (
-                APTRepositoryPackageType::Deb,
-                vec!["http://download.proxmox.com/debian/ceph-pacific".to_string()],
-                "test".to_string(),
-            ),
-            APTRepositoryHandle::CephOctopus => (
-                APTRepositoryPackageType::Deb,
-                vec!["http://download.proxmox.com/debian/ceph-octopus".to_string()],
-                "main".to_string(),
-            ),
-            APTRepositoryHandle::CephOctopusTest => (
-                APTRepositoryPackageType::Deb,
-                vec!["http://download.proxmox.com/debian/ceph-octopus".to_string()],
-                "test".to_string(),
-            ),
         }
     }
 
diff --git a/proxmox-apt/tests/repositories.rs b/proxmox-apt/tests/repositories.rs
index 75608b3..ea714e6 100644
--- a/proxmox-apt/tests/repositories.rs
+++ b/proxmox-apt/tests/repositories.rs
@@ -364,10 +364,6 @@ fn test_standard_repositories() -> Result<(), Error> {
         APTStandardRepository::from(APTRepositoryHandle::Test),
         APTStandardRepository::from(APTRepositoryHandle::CephQuincy),
         APTStandardRepository::from(APTRepositoryHandle::CephQuincyTest),
-        APTStandardRepository::from(APTRepositoryHandle::CephPacific),
-        APTStandardRepository::from(APTRepositoryHandle::CephPacificTest),
-        APTStandardRepository::from(APTRepositoryHandle::CephOctopus),
-        APTStandardRepository::from(APTRepositoryHandle::CephOctopusTest),
     ];
 
     let absolute_suite_list = read_dir.join("absolute_suite.list");
-- 
2.39.2





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

* [pve-devel] [PATCH v2 proxmox 2/5] apt: split Ceph main repository into no-subscription and enterprise
  2023-06-02  8:48 [pve-devel] [PATCH v2 proxmox 1/5] apt: drop older Ceph standard repositories Fiona Ebner
@ 2023-06-02  8:48 ` Fiona Ebner
  2023-06-02  8:48 ` [pve-devel] [PATCH v2 proxmox 3/5] apt: tests: create temporary test directories in CARGO_TARGET_TMPDIR Fiona Ebner
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Fiona Ebner @ 2023-06-02  8:48 UTC (permalink / raw)
  To: pve-devel

The old 'main' component stays valid, pointing to no-subscription,
which means the is_referenced_repository() check needs a special case
for it. It will eventually go away, together with the handles for
Quincy.

Alternatively, the standard repository's info() could've been changed
to return multiple possible components, similar to URLs, but as
opposed to URLs, there could be a standard repository that wants to
have multiple components and it feels a bit unnatural, because
multiple components are usually not aliases of the same. And adapting
is_referenced_repository() would be needed here too. So overall, the
above alternative just felt better.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---

Changes in v2:
    * mention that 'main' component now maps to no-subscription

 proxmox-apt/src/repositories/mod.rs        |  3 +-
 proxmox-apt/src/repositories/repository.rs | 10 +++++-
 proxmox-apt/src/repositories/standard.rs   | 36 ++++++++++++++++------
 proxmox-apt/tests/repositories.rs          |  3 +-
 4 files changed, 39 insertions(+), 13 deletions(-)

diff --git a/proxmox-apt/src/repositories/mod.rs b/proxmox-apt/src/repositories/mod.rs
index 11f52dd..b2e83a0 100644
--- a/proxmox-apt/src/repositories/mod.rs
+++ b/proxmox-apt/src/repositories/mod.rs
@@ -90,7 +90,8 @@ pub fn standard_repositories(
 
     if product == "pve" {
         result.append(&mut vec![
-            APTStandardRepository::from(APTRepositoryHandle::CephQuincy),
+            APTStandardRepository::from(APTRepositoryHandle::CephQuincyEnterprise),
+            APTStandardRepository::from(APTRepositoryHandle::CephQuincyNoSubscription),
             APTStandardRepository::from(APTRepositoryHandle::CephQuincyTest),
         ]);
     }
diff --git a/proxmox-apt/src/repositories/repository.rs b/proxmox-apt/src/repositories/repository.rs
index a5e3015..ba4e8b1 100644
--- a/proxmox-apt/src/repositories/repository.rs
+++ b/proxmox-apt/src/repositories/repository.rs
@@ -285,11 +285,19 @@ impl APTRepository {
             found_uri = found_uri || handle_uris.iter().any(|handle_uri| handle_uri == uri);
         }
 
+        // In the past it was main instead of enterprise/no-subscription, and main now maps to
+        // no-subscription. Note this only applies for Quincy.
+        let found_component = if handle == APTRepositoryHandle::CephQuincyNoSubscription {
+            self.components.contains(&component) || self.components.contains(&"main".to_string())
+        } else {
+            self.components.contains(&component)
+        };
+
         self.types.contains(&package_type)
             && found_uri
             // using contains would require a &String
             && self.suites.iter().any(|self_suite| self_suite == suite)
-            && self.components.contains(&component)
+            && found_component
     }
 
     /// Guess the origin from the repository's URIs.
diff --git a/proxmox-apt/src/repositories/standard.rs b/proxmox-apt/src/repositories/standard.rs
index 33c4842..2cae630 100644
--- a/proxmox-apt/src/repositories/standard.rs
+++ b/proxmox-apt/src/repositories/standard.rs
@@ -46,8 +46,10 @@ pub enum APTRepositoryHandle {
     NoSubscription,
     /// The test repository.
     Test,
-    /// Ceph Quincy repository.
-    CephQuincy,
+    /// Ceph Quincy enterprise repository.
+    CephQuincyEnterprise,
+    /// Ceph Quincy no-subscription repository.
+    CephQuincyNoSubscription,
     /// Ceph Quincy test repository.
     CephQuincyTest,
 }
@@ -71,7 +73,8 @@ impl TryFrom<&str> for APTRepositoryHandle {
             "enterprise" => Ok(APTRepositoryHandle::Enterprise),
             "no-subscription" => Ok(APTRepositoryHandle::NoSubscription),
             "test" => Ok(APTRepositoryHandle::Test),
-            "ceph-quincy" => Ok(APTRepositoryHandle::CephQuincy),
+            "ceph-quincy-enterprise" => Ok(APTRepositoryHandle::CephQuincyEnterprise),
+            "ceph-quincy-no-subscription" => Ok(APTRepositoryHandle::CephQuincyNoSubscription),
             "ceph-quincy-test" => Ok(APTRepositoryHandle::CephQuincyTest),
             _ => bail!("unknown repository handle '{}'", string),
         }
@@ -84,7 +87,8 @@ impl Display for APTRepositoryHandle {
             APTRepositoryHandle::Enterprise => write!(f, "enterprise"),
             APTRepositoryHandle::NoSubscription => write!(f, "no-subscription"),
             APTRepositoryHandle::Test => write!(f, "test"),
-            APTRepositoryHandle::CephQuincy => write!(f, "ceph-quincy"),
+            APTRepositoryHandle::CephQuincyEnterprise => write!(f, "ceph-quincy-enterprise"),
+            APTRepositoryHandle::CephQuincyNoSubscription => write!(f, "ceph-quincy-no-subscription"),
             APTRepositoryHandle::CephQuincyTest => write!(f, "ceph-quincy-test"),
         }
     }
@@ -107,8 +111,13 @@ impl APTRepositoryHandle {
                 "This repository contains the latest packages and is primarily used for test labs \
                 and by developers to test new features."
             }
-            APTRepositoryHandle::CephQuincy => {
-                "This repository holds the main Proxmox Ceph Quincy packages."
+            APTRepositoryHandle::CephQuincyEnterprise => {
+                "This repository holds the production-ready Proxmox Ceph Quincy packages."
+            }
+            APTRepositoryHandle::CephQuincyNoSubscription => {
+                "This repository holds the Proxmox Ceph Quincy packages intended for \
+                non-production use. The deprecated 'main' repository is an alias for this in \
+                Proxmox VE 8."
             }
             APTRepositoryHandle::CephQuincyTest => {
                 "This repository contains the Ceph Quincy packages before they are moved to the \
@@ -124,7 +133,8 @@ impl APTRepositoryHandle {
             APTRepositoryHandle::Enterprise => "Enterprise",
             APTRepositoryHandle::NoSubscription => "No-Subscription",
             APTRepositoryHandle::Test => "Test",
-            APTRepositoryHandle::CephQuincy => "Ceph Quincy",
+            APTRepositoryHandle::CephQuincyEnterprise => "Ceph Quincy Enterprise",
+            APTRepositoryHandle::CephQuincyNoSubscription => "Ceph Quincy No-Subscription",
             APTRepositoryHandle::CephQuincyTest => "Ceph Quincy Test",
         }
         .to_string()
@@ -138,7 +148,8 @@ impl APTRepositoryHandle {
             }
             APTRepositoryHandle::NoSubscription => "/etc/apt/sources.list".to_string(),
             APTRepositoryHandle::Test => "/etc/apt/sources.list".to_string(),
-            APTRepositoryHandle::CephQuincy => "/etc/apt/sources.list.d/ceph.list".to_string(),
+            APTRepositoryHandle::CephQuincyEnterprise => "/etc/apt/sources.list.d/ceph.list".to_string(),
+            APTRepositoryHandle::CephQuincyNoSubscription => "/etc/apt/sources.list.d/ceph.list".to_string(),
             APTRepositoryHandle::CephQuincyTest => "/etc/apt/sources.list.d/ceph.list".to_string(),
         }
     }
@@ -181,10 +192,15 @@ impl APTRepositoryHandle {
                 },
                 format!("{}test", product),
             ),
-            APTRepositoryHandle::CephQuincy => (
+            APTRepositoryHandle::CephQuincyEnterprise => (
+                APTRepositoryPackageType::Deb,
+                vec!["https://enterprise.proxmox.com/debian/ceph-quincy".to_string()],
+                "enterprise".to_string(),
+            ),
+            APTRepositoryHandle::CephQuincyNoSubscription => (
                 APTRepositoryPackageType::Deb,
                 vec!["http://download.proxmox.com/debian/ceph-quincy".to_string()],
-                "main".to_string(),
+                "no-subscription".to_string(),
             ),
             APTRepositoryHandle::CephQuincyTest => (
                 APTRepositoryPackageType::Deb,
diff --git a/proxmox-apt/tests/repositories.rs b/proxmox-apt/tests/repositories.rs
index ea714e6..4b3c9de 100644
--- a/proxmox-apt/tests/repositories.rs
+++ b/proxmox-apt/tests/repositories.rs
@@ -362,7 +362,8 @@ fn test_standard_repositories() -> Result<(), Error> {
         APTStandardRepository::from(APTRepositoryHandle::Enterprise),
         APTStandardRepository::from(APTRepositoryHandle::NoSubscription),
         APTStandardRepository::from(APTRepositoryHandle::Test),
-        APTStandardRepository::from(APTRepositoryHandle::CephQuincy),
+        APTStandardRepository::from(APTRepositoryHandle::CephQuincyEnterprise),
+        APTStandardRepository::from(APTRepositoryHandle::CephQuincyNoSubscription),
         APTStandardRepository::from(APTRepositoryHandle::CephQuincyTest),
     ];
 
-- 
2.39.2





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

* [pve-devel] [PATCH v2 proxmox 3/5] apt: tests: create temporary test directories in CARGO_TARGET_TMPDIR
  2023-06-02  8:48 [pve-devel] [PATCH v2 proxmox 1/5] apt: drop older Ceph standard repositories Fiona Ebner
  2023-06-02  8:48 ` [pve-devel] [PATCH v2 proxmox 2/5] apt: split Ceph main repository into no-subscription and enterprise Fiona Ebner
@ 2023-06-02  8:48 ` Fiona Ebner
  2023-06-02  8:48 ` [pve-devel] [PATCH v2 proxmox 4/5] apt: tests: code cleanup to avoid useless vector Fiona Ebner
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Fiona Ebner @ 2023-06-02  8:48 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---

New in v2.

 proxmox-apt/tests/repositories.rs | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/proxmox-apt/tests/repositories.rs b/proxmox-apt/tests/repositories.rs
index 4b3c9de..6319a62 100644
--- a/proxmox-apt/tests/repositories.rs
+++ b/proxmox-apt/tests/repositories.rs
@@ -19,15 +19,11 @@ fn test_parse_write() -> Result<(), Error> {
 
 fn test_parse_write_dir(read_dir: &str) -> Result<(), Error> {
     let test_dir = std::env::current_dir()?.join("tests");
+    let tmp_dir = PathBuf::from(env!("CARGO_TARGET_TMPDIR").to_string());
     let read_dir = test_dir.join(read_dir);
-    let write_dir = test_dir.join("sources.list.d.actual");
+    let write_dir = tmp_dir.join("sources.list.d.actual");
     let expected_dir = test_dir.join("sources.list.d.expected");
 
-    if write_dir.is_dir() {
-        std::fs::remove_dir_all(&write_dir)
-            .map_err(|err| format_err!("unable to remove dir {:?} - {}", write_dir, err))?;
-    }
-
     std::fs::create_dir_all(&write_dir)
         .map_err(|err| format_err!("unable to create dir {:?} - {}", write_dir, err))?;
 
@@ -66,6 +62,7 @@ fn test_parse_write_dir(read_dir: &str) -> Result<(), Error> {
         expected_count += 1;
 
         let expected_path = entry?.path();
+
         let actual_path = write_dir.join(expected_path.file_name().unwrap());
 
         let expected_contents = std::fs::read(&expected_path)
@@ -91,13 +88,9 @@ fn test_parse_write_dir(read_dir: &str) -> Result<(), Error> {
 #[test]
 fn test_digest() -> Result<(), Error> {
     let test_dir = std::env::current_dir()?.join("tests");
+    let tmp_dir = PathBuf::from(env!("CARGO_TARGET_TMPDIR").to_string());
     let read_dir = test_dir.join("sources.list.d");
-    let write_dir = test_dir.join("sources.list.d.digest");
-
-    if write_dir.is_dir() {
-        std::fs::remove_dir_all(&write_dir)
-            .map_err(|err| format_err!("unable to remove dir {:?} - {}", write_dir, err))?;
-    }
+    let write_dir = tmp_dir.join("sources.list.d.digest");
 
     std::fs::create_dir_all(&write_dir)
         .map_err(|err| format_err!("unable to create dir {:?} - {}", write_dir, err))?;
-- 
2.39.2





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

* [pve-devel] [PATCH v2 proxmox 4/5] apt: tests: code cleanup to avoid useless vector
  2023-06-02  8:48 [pve-devel] [PATCH v2 proxmox 1/5] apt: drop older Ceph standard repositories Fiona Ebner
  2023-06-02  8:48 ` [pve-devel] [PATCH v2 proxmox 2/5] apt: split Ceph main repository into no-subscription and enterprise Fiona Ebner
  2023-06-02  8:48 ` [pve-devel] [PATCH v2 proxmox 3/5] apt: tests: create temporary test directories in CARGO_TARGET_TMPDIR Fiona Ebner
@ 2023-06-02  8:48 ` Fiona Ebner
  2023-06-02  8:48 ` [pve-devel] [PATCH v2 proxmox 5/5] apt: tests: add tests for Ceph Quincy repository detection on Bookworm Fiona Ebner
  2023-06-04 16:54 ` [pve-devel] applied: [PATCH v2 proxmox 1/5] apt: drop older Ceph standard repositories Thomas Lamprecht
  4 siblings, 0 replies; 6+ messages in thread
From: Fiona Ebner @ 2023-06-02  8:48 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---

No changes in v2.

 proxmox-apt/tests/repositories.rs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/proxmox-apt/tests/repositories.rs b/proxmox-apt/tests/repositories.rs
index 6319a62..2fb7ac8 100644
--- a/proxmox-apt/tests/repositories.rs
+++ b/proxmox-apt/tests/repositories.rs
@@ -389,13 +389,11 @@ fn test_standard_repositories() -> Result<(), Error> {
     let mut file = APTRepositoryFile::new(&pve_alt_list)?.unwrap();
     file.parse()?;
 
-    let file_vec = vec![file];
-
     expected[0].status = Some(true);
     expected[1].status = Some(true);
     expected[2].status = Some(false);
 
-    let std_repos = standard_repositories(&file_vec, "pve", DebianCodename::Bullseye);
+    let std_repos = standard_repositories(&[file], "pve", DebianCodename::Bullseye);
 
     assert_eq!(std_repos, expected);
 
-- 
2.39.2





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

* [pve-devel] [PATCH v2 proxmox 5/5] apt: tests: add tests for Ceph Quincy repository detection on Bookworm
  2023-06-02  8:48 [pve-devel] [PATCH v2 proxmox 1/5] apt: drop older Ceph standard repositories Fiona Ebner
                   ` (2 preceding siblings ...)
  2023-06-02  8:48 ` [pve-devel] [PATCH v2 proxmox 4/5] apt: tests: code cleanup to avoid useless vector Fiona Ebner
@ 2023-06-02  8:48 ` Fiona Ebner
  2023-06-04 16:54 ` [pve-devel] applied: [PATCH v2 proxmox 1/5] apt: drop older Ceph standard repositories Thomas Lamprecht
  4 siblings, 0 replies; 6+ messages in thread
From: Fiona Ebner @ 2023-06-02  8:48 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---

No changes in v2.

 proxmox-apt/tests/repositories.rs             | 30 +++++++++++++++++++
 .../ceph-quincy-bookworm.list                 |  6 ++++
 .../ceph-quincy-nosub-bookworm.list           |  2 ++
 .../sources.list.d/ceph-quincy-bookworm.list  |  4 +++
 .../ceph-quincy-nosub-bookworm.list           |  2 ++
 5 files changed, 44 insertions(+)
 create mode 100644 proxmox-apt/tests/sources.list.d.expected/ceph-quincy-bookworm.list
 create mode 100644 proxmox-apt/tests/sources.list.d.expected/ceph-quincy-nosub-bookworm.list
 create mode 100644 proxmox-apt/tests/sources.list.d/ceph-quincy-bookworm.list
 create mode 100644 proxmox-apt/tests/sources.list.d/ceph-quincy-nosub-bookworm.list

diff --git a/proxmox-apt/tests/repositories.rs b/proxmox-apt/tests/repositories.rs
index 2fb7ac8..be6aaff 100644
--- a/proxmox-apt/tests/repositories.rs
+++ b/proxmox-apt/tests/repositories.rs
@@ -397,6 +397,36 @@ fn test_standard_repositories() -> Result<(), Error> {
 
     assert_eq!(std_repos, expected);
 
+    let pve_alt_list = read_dir.join("ceph-quincy-bookworm.list");
+    let mut file = APTRepositoryFile::new(&pve_alt_list)?.unwrap();
+    file.parse()?;
+
+    expected[0].status = None;
+    expected[1].status = None;
+    expected[2].status = None;
+    expected[3].status = Some(true);
+    expected[4].status = Some(true);
+    expected[5].status = Some(true);
+
+    let std_repos = standard_repositories(&[file], "pve", DebianCodename::Bookworm);
+
+    assert_eq!(std_repos, expected);
+
+    let pve_alt_list = read_dir.join("ceph-quincy-nosub-bookworm.list");
+    let mut file = APTRepositoryFile::new(&pve_alt_list)?.unwrap();
+    file.parse()?;
+
+    expected[0].status = None;
+    expected[1].status = None;
+    expected[2].status = None;
+    expected[3].status = None;
+    expected[4].status = Some(true);
+    expected[5].status = None;
+
+    let std_repos = standard_repositories(&[file], "pve", DebianCodename::Bookworm);
+
+    assert_eq!(std_repos, expected);
+
     Ok(())
 }
 
diff --git a/proxmox-apt/tests/sources.list.d.expected/ceph-quincy-bookworm.list b/proxmox-apt/tests/sources.list.d.expected/ceph-quincy-bookworm.list
new file mode 100644
index 0000000..9095e27
--- /dev/null
+++ b/proxmox-apt/tests/sources.list.d.expected/ceph-quincy-bookworm.list
@@ -0,0 +1,6 @@
+deb https://enterprise.proxmox.com/debian/ceph-quincy bookworm enterprise
+
+deb http://download.proxmox.com/debian/ceph-quincy bookworm main
+
+deb http://download.proxmox.com/debian/ceph-quincy bookworm test
+
diff --git a/proxmox-apt/tests/sources.list.d.expected/ceph-quincy-nosub-bookworm.list b/proxmox-apt/tests/sources.list.d.expected/ceph-quincy-nosub-bookworm.list
new file mode 100644
index 0000000..b60fa98
--- /dev/null
+++ b/proxmox-apt/tests/sources.list.d.expected/ceph-quincy-nosub-bookworm.list
@@ -0,0 +1,2 @@
+deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription
+
diff --git a/proxmox-apt/tests/sources.list.d/ceph-quincy-bookworm.list b/proxmox-apt/tests/sources.list.d/ceph-quincy-bookworm.list
new file mode 100644
index 0000000..fde8eba
--- /dev/null
+++ b/proxmox-apt/tests/sources.list.d/ceph-quincy-bookworm.list
@@ -0,0 +1,4 @@
+deb https://enterprise.proxmox.com/debian/ceph-quincy bookworm enterprise
+deb http://download.proxmox.com/debian/ceph-quincy bookworm main
+deb http://download.proxmox.com/debian/ceph-quincy bookworm test
+
diff --git a/proxmox-apt/tests/sources.list.d/ceph-quincy-nosub-bookworm.list b/proxmox-apt/tests/sources.list.d/ceph-quincy-nosub-bookworm.list
new file mode 100644
index 0000000..b60fa98
--- /dev/null
+++ b/proxmox-apt/tests/sources.list.d/ceph-quincy-nosub-bookworm.list
@@ -0,0 +1,2 @@
+deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription
+
-- 
2.39.2





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

* [pve-devel] applied: [PATCH v2 proxmox 1/5] apt: drop older Ceph standard repositories
  2023-06-02  8:48 [pve-devel] [PATCH v2 proxmox 1/5] apt: drop older Ceph standard repositories Fiona Ebner
                   ` (3 preceding siblings ...)
  2023-06-02  8:48 ` [pve-devel] [PATCH v2 proxmox 5/5] apt: tests: add tests for Ceph Quincy repository detection on Bookworm Fiona Ebner
@ 2023-06-04 16:54 ` Thomas Lamprecht
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Lamprecht @ 2023-06-04 16:54 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fiona Ebner

Am 02/06/2023 um 10:48 schrieb Fiona Ebner:
> On Proxmox VE 8, only Quincy and newer will be supported.
> 
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
> 
> No changes in v2.
> 
> Changes for the series in v2:
>     * create temporary test directories inside CARGO_TARGET_TMPDIR
>     * mention that deprecated 'main' component maps to no-subscription
>       in description of the repo.

A cover letter would make this a bit easier to notice. ^^

> 
>  proxmox-apt/src/repositories/mod.rs      |  4 --
>  proxmox-apt/src/repositories/standard.rs | 58 ------------------------
>  proxmox-apt/tests/repositories.rs        |  4 --
>  3 files changed, 66 deletions(-)
> 
>

applied, thanks!

But I'd favor that the repo infos are namespaced by dist (bullseye, bookworm, ..), that way
we could keep historical records and add future ones up-front (for a future "change repos
to next release" helper), that would then also allow to generate some docs for available
repos automatically, e.g.: https://pve.proxmox.com/wiki/Package_Repositories

For the "Add Repo" UI it might be nicer to split repo & product, i.e., have another field
above the current repository one where one selects "Proxmox VE" or "Ceph", can simply be
disabled+hidden in Proxmox Backup Server and Proxmox Mail Gateway web UI's (as IIRC we
share the UI down to the whole panel).




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

end of thread, other threads:[~2023-06-04 16:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-02  8:48 [pve-devel] [PATCH v2 proxmox 1/5] apt: drop older Ceph standard repositories Fiona Ebner
2023-06-02  8:48 ` [pve-devel] [PATCH v2 proxmox 2/5] apt: split Ceph main repository into no-subscription and enterprise Fiona Ebner
2023-06-02  8:48 ` [pve-devel] [PATCH v2 proxmox 3/5] apt: tests: create temporary test directories in CARGO_TARGET_TMPDIR Fiona Ebner
2023-06-02  8:48 ` [pve-devel] [PATCH v2 proxmox 4/5] apt: tests: code cleanup to avoid useless vector Fiona Ebner
2023-06-02  8:48 ` [pve-devel] [PATCH v2 proxmox 5/5] apt: tests: add tests for Ceph Quincy repository detection on Bookworm Fiona Ebner
2023-06-04 16:54 ` [pve-devel] applied: [PATCH v2 proxmox 1/5] apt: drop older Ceph standard repositories Thomas Lamprecht

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