From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 5DD951FF2C6 for ; Tue, 9 Jul 2024 12:47:31 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7341B1D842; Tue, 9 Jul 2024 12:47:28 +0200 (CEST) From: Stoiko Ivanov To: pve-devel@lists.proxmox.com Date: Tue, 9 Jul 2024 12:47:01 +0200 Message-Id: <20240709104705.1681395-2-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240709104705.1681395-1-s.ivanov@proxmox.com> References: <20240709104705.1681395-1-s.ivanov@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.075 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 Subject: [pve-devel] [PATCH proxmox-offline-mirror v2 1/5] bump proxmox-apt to 0.11 and adapt to changes. X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" The recent changes to proxmox-apt along with the introduction of the proxmox_apt_apit_types crate led to the following changes. Signed-off-by: Stoiko Ivanov --- Cargo.toml | 3 ++- debian/control | 3 ++- src/lib.rs | 5 +++-- src/mirror.rs | 11 +++++------ 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index edcdb87..39461c5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,8 @@ sequoia-openpgp = { version = "1.12" } walkdir = "2.3.1" xz2 = "0.1" -proxmox-apt = { version = "0.10.9" } +proxmox-apt = "0.11" +proxmox-apt-api-types = "1.0" proxmox-async = "0.4" proxmox-http = { version = "0.9", features = [ "client-sync", "client-trait" ]} proxmox-router = { version = "2", features = [ "cli" ], default_features = false } diff --git a/debian/control b/debian/control index 86b6cfb..8063c2b 100644 --- a/debian/control +++ b/debian/control @@ -17,7 +17,8 @@ Build-Depends: bash-completion, librust-lazy-static-1+default-dev (>= 1.4-~~), librust-nix-0.26+default-dev (>= 0.26.1-~~), librust-openssl-0.10+default-dev, - librust-proxmox-apt-0.10+default-dev (>= 0.10.9~~), + librust-proxmox-apt-api-types-dev, + librust-proxmox-apt-0.11+default-dev, librust-proxmox-async-0.4+default-dev, librust-proxmox-http-0.9+client-sync-dev, librust-proxmox-http-0.9+client-trait-dev, diff --git a/src/lib.rs b/src/lib.rs index 8de1f33..8d5ca3f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,7 +16,8 @@ use std::{ use anyhow::{format_err, Error}; use medium::MirrorInfo; -use proxmox_apt::repositories::{APTRepository, APTRepositoryFile, APTRepositoryFileType}; +use proxmox_apt::repositories::{APTRepositoryFileImpl, APTRepositoryImpl}; +use proxmox_apt_api_types::{APTRepository, APTRepositoryFile, APTRepositoryFileType}; use types::Snapshot; /// Main configuration file containing definitions of mirrors, external media and subscription keys. @@ -140,7 +141,7 @@ pub fn generate_repo_file_line( repo.uris = vec![format!("file://{}", snapshot_path)]; repo.options - .push(proxmox_apt::repositories::APTRepositoryOption { + .push(proxmox_apt_api_types::APTRepositoryOption { key: "check-valid-until".to_string(), values: vec!["false".to_string()], }); diff --git a/src/mirror.rs b/src/mirror.rs index 073df86..40ee120 100644 --- a/src/mirror.rs +++ b/src/mirror.rs @@ -20,13 +20,12 @@ use crate::{ types::{Diff, Snapshot, SNAPSHOT_REGEX}, FetchResult, Progress, }; -use proxmox_apt::{ - deb822::{ - CheckSums, CompressionType, FileReference, FileReferenceType, PackagesFile, ReleaseFile, - SourcesFile, - }, - repositories::{APTRepository, APTRepositoryPackageType}, + +use proxmox_apt::deb822::{ + CheckSums, CompressionType, FileReference, FileReferenceType, PackagesFile, ReleaseFile, + SourcesFile, }; +use proxmox_apt_api_types::{APTRepository, APTRepositoryPackageType}; use crate::helpers; -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel