From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pmg-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9])
	by lore.proxmox.com (Postfix) with ESMTPS id 9793E1FF170
	for <inbox@lore.proxmox.com>; Thu, 15 May 2025 10:32:35 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 538DC1CE6E;
	Thu, 15 May 2025 10:32:59 +0200 (CEST)
From: Hannes Duerr <h.duerr@proxmox.com>
To: pmg-devel@lists.proxmox.com
Date: Thu, 15 May 2025 10:32:53 +0200
Message-Id: <20250515083253.12079-1-h.duerr@proxmox.com>
X-Mailer: git-send-email 2.39.5
MIME-Version: 1.0
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.061 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See
 http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more
 information. [repositories.rs, genpackage.pl, fixup.pm, lib.rs, mod.rs]
Subject: [pmg-devel] [PATCH proxmox-perl-rs] pmg-rs: remove
 PMG::RS::APT:Repositories module
X-BeenThere: pmg-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Mail Gateway development discussion
 <pmg-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pmg-devel>, 
 <mailto:pmg-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pmg-devel/>
List-Post: <mailto:pmg-devel@lists.proxmox.com>
List-Help: <mailto:pmg-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel>, 
 <mailto:pmg-devel-request@lists.proxmox.com?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: pmg-devel-bounces@lists.proxmox.com
Sender: "pmg-devel" <pmg-devel-bounces@lists.proxmox.com>

We can remove the PMG::RS::APT::Repositories module because we needed
its functionality in Proxmox Mail Gateway (PMG) and other products, so
we moved it to Proxmox::RS::APT::Repositories some time ago. We now only
use the new module in our code.
When users update to PMG 9, we can be sure that there is no
package using PMG::RS::APT::Repositories, so we can safely remove the
code.

Signed-off-by: Hannes Duerr <h.duerr@proxmox.com>
---

This patch should only be applied with PMG version 9

 pmg-rs/Makefile                |  1 -
 pmg-rs/src/apt/mod.rs          |  1 -
 pmg-rs/src/apt/repositories.rs | 41 ----------------------------------
 pmg-rs/src/lib.rs              |  1 -
 4 files changed, 44 deletions(-)
 delete mode 100644 pmg-rs/src/apt/mod.rs
 delete mode 100644 pmg-rs/src/apt/repositories.rs

diff --git a/pmg-rs/Makefile b/pmg-rs/Makefile
index 15ef08e..c944465 100644
--- a/pmg-rs/Makefile
+++ b/pmg-rs/Makefile
@@ -26,7 +26,6 @@ PERLMOD_GENPACKAGE := /usr/lib/perlmod/genpackage.pl \
 	--include-file=Fixup.pm
 
 PERLMOD_PACKAGES := \
-	  PMG::RS::APT::Repositories \
 	  PMG::RS::Acme \
 	  PMG::RS::CSR \
 	  PMG::RS::TFA
diff --git a/pmg-rs/src/apt/mod.rs b/pmg-rs/src/apt/mod.rs
deleted file mode 100644
index 574c1a7..0000000
--- a/pmg-rs/src/apt/mod.rs
+++ /dev/null
@@ -1 +0,0 @@
-mod repositories;
diff --git a/pmg-rs/src/apt/repositories.rs b/pmg-rs/src/apt/repositories.rs
deleted file mode 100644
index d8e89c2..0000000
--- a/pmg-rs/src/apt/repositories.rs
+++ /dev/null
@@ -1,41 +0,0 @@
-#[perlmod::package(name = "PMG::RS::APT::Repositories")]
-mod export {
-    use anyhow::Error;
-    use proxmox_apt_api_types::{
-        APTChangeRepositoryOptions, APTRepositoriesResult, APTRepositoryHandle,
-    };
-    use proxmox_config_digest::ConfigDigest;
-
-    use crate::common::apt::repositories::export as common;
-
-    /// Get information about configured and standard repositories.
-    #[export]
-    pub fn repositories() -> Result<APTRepositoriesResult, Error> {
-        common::repositories("pmg")
-    }
-
-    /// Add the repository identified by the `handle`.
-    /// If the repository is already configured, it will be set to enabled.
-    ///
-    /// The `digest` parameter asserts that the configuration has not been modified.
-    #[export]
-    pub fn add_repository(
-        handle: APTRepositoryHandle,
-        digest: Option<ConfigDigest>,
-    ) -> Result<(), Error> {
-        common::add_repository(handle, "pmg", digest)
-    }
-
-    /// Change the properties of the specified repository.
-    ///
-    /// The `digest` parameter asserts that the configuration has not been modified.
-    #[export]
-    pub fn change_repository(
-        path: &str,
-        index: usize,
-        options: APTChangeRepositoryOptions,
-        digest: Option<ConfigDigest>,
-    ) -> Result<(), Error> {
-        common::change_repository(path, index, options, digest)
-    }
-}
diff --git a/pmg-rs/src/lib.rs b/pmg-rs/src/lib.rs
index 0ebe285..5f1f27c 100644
--- a/pmg-rs/src/lib.rs
+++ b/pmg-rs/src/lib.rs
@@ -6,7 +6,6 @@ use proxmox_apt_api_types::APTUpdateInfo;
 pub mod common;
 
 pub mod acme;
-pub mod apt;
 pub mod csr;
 pub mod tfa;
 
-- 
2.39.5



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