]> git.proxmox.com Git - proxmox-apt.git/commitdiff
update to proxmox split and bump version to 0.8.0-1
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 8 Oct 2021 10:18:13 +0000 (12:18 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 11 Oct 2021 10:00:19 +0000 (12:00 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Cargo.toml
debian/changelog
debian/control
src/repositories/file.rs
src/repositories/repository.rs
src/repositories/standard.rs

index 630d15819d488b4aebbbf893243d76dec9ca3626..2098127018496e0ea8ab97e8918abc760df22374 100644 (file)
@@ -1,6 +1,6 @@
 [package]
 name = "proxmox-apt"
-version = "0.7.0"
+version = "0.8.0"
 authors = [
     "Fabian Ebner <f.ebner@proxmox.com>",
     "Proxmox Support Team <support@proxmox.com>",
@@ -18,7 +18,9 @@ path = "src/lib.rs"
 
 [dependencies]
 anyhow = "1.0"
+hex = "0.4.3"
 once_cell = "1.3.1"
 openssl = "0.10"
-proxmox = { version = "0.13.0", default-features = false, features = [ "api-macro" ] }
 serde = { version = "1.0", features = ["derive"] }
+
+proxmox-schema = { version = "1", features = [ "api-macro" ] }
index e5e1157e0234c99753cd80ef4f5c8c39bca954d0..dc27d76c03e594ee16d07e8af8c831ea35a0a6dc 100644 (file)
@@ -1,3 +1,9 @@
+rust-proxmox-apt (0.8.0-1) stable; urgency=medium
+
+  * update to proxox-schema crate
+
+ -- Proxmox Support Team <support@proxmox.com>  Fri, 08 Oct 2021 11:55:47 +0200
+
 rust-proxmox-apt (0.7.0-1) stable; urgency=medium
 
   * update to proxmox 0.13.0
index ea439180f2bd5a9a50788e9883893c90fd1c44c9..e28a78c73bee0ad2b1e9614d8d6e56358a506d3e 100644 (file)
@@ -7,9 +7,11 @@ Build-Depends: debhelper (>= 12),
  rustc:native <!nocheck>,
  libstd-rust-dev <!nocheck>,
  librust-anyhow-1+default-dev <!nocheck>,
+ librust-hex-0.4+default-dev (>= 0.4.3-~~) <!nocheck>,
  librust-once-cell-1+default-dev (>= 1.3.1-~~) <!nocheck>,
  librust-openssl-0.10+default-dev <!nocheck>,
- librust-proxmox-0.13+api-macro-dev <!nocheck>,
+ librust-proxmox-schema-1+api-macro-dev <!nocheck>,
+ librust-proxmox-schema-1+default-dev <!nocheck>,
  librust-serde-1+default-dev <!nocheck>,
  librust-serde-1+derive-dev <!nocheck>
 Maintainer: Proxmox Support Team <support@proxmox.com>
@@ -25,19 +27,21 @@ Multi-Arch: same
 Depends:
  ${misc:Depends},
  librust-anyhow-1+default-dev,
+ librust-hex-0.4+default-dev (>= 0.4.3-~~),
  librust-once-cell-1+default-dev (>= 1.3.1-~~),
  librust-openssl-0.10+default-dev,
- librust-proxmox-0.13+api-macro-dev,
+ librust-proxmox-schema-1+api-macro-dev,
+ librust-proxmox-schema-1+default-dev,
  librust-serde-1+default-dev,
  librust-serde-1+derive-dev
 Provides:
  librust-proxmox-apt+default-dev (= ${binary:Version}),
  librust-proxmox-apt-0-dev (= ${binary:Version}),
  librust-proxmox-apt-0+default-dev (= ${binary:Version}),
- librust-proxmox-apt-0.7-dev (= ${binary:Version}),
- librust-proxmox-apt-0.7+default-dev (= ${binary:Version}),
- librust-proxmox-apt-0.7.0-dev (= ${binary:Version}),
- librust-proxmox-apt-0.7.0+default-dev (= ${binary:Version})
+ librust-proxmox-apt-0.8-dev (= ${binary:Version}),
+ librust-proxmox-apt-0.8+default-dev (= ${binary:Version}),
+ librust-proxmox-apt-0.8.0-dev (= ${binary:Version}),
+ librust-proxmox-apt-0.8.0+default-dev (= ${binary:Version})
 Description: Proxmox library for APT - Rust source code
  This package contains the source for the Rust proxmox-apt crate, packaged by
  debcargo for use with cargo and dh-cargo.
index 3df59db3801d08c6aadf39c14f02549868b263ac..fffc47cdd1b56231d607d0ec43d4307e6d05655f 100644 (file)
@@ -10,7 +10,7 @@ use crate::repositories::repository::{
     APTRepository, APTRepositoryFileType, APTRepositoryPackageType,
 };
 
-use proxmox::api::api;
+use proxmox_schema::api;
 
 mod list_parser;
 use list_parser::APTListFileParser;
index 85c8bddbfd84105cc7b1887562f603dc7102bb1a..ceaebefd762fb3ad9625f5978d67ccb857e46305 100644 (file)
@@ -6,7 +6,7 @@ use std::path::PathBuf;
 use anyhow::{bail, format_err, Error};
 use serde::{Deserialize, Serialize};
 
-use proxmox::api::api;
+use proxmox_schema::api;
 
 use crate::repositories::standard::APTRepositoryHandle;
 
@@ -394,7 +394,10 @@ fn uri_to_filename(uri: &str) -> String {
 
     for b in filename.as_bytes().iter() {
         if *b <= 0x20 || *b >= 0x7F || encode_chars.contains(*b as char) {
-            let hex = proxmox::tools::bin_to_hex(&[*b]);
+            let mut hex = [0u8; 2];
+            // unwrap: we're hex-encoding a single byte into a 2-byte slice
+            hex::encode_to_slice(&[*b], &mut hex).unwrap();
+            let hex = unsafe { std::str::from_utf8_unchecked(&hex) };
             encoded = format!("{}%{}", encoded, hex);
         } else {
             encoded.push(*b as char);
index a287f9177389920e3ea42e80a5d873f094d9571f..b6044e609b3b88e9d302295b6fc18c1cc515587a 100644 (file)
@@ -8,7 +8,7 @@ use crate::repositories::repository::{
     APTRepository, APTRepositoryFileType, APTRepositoryPackageType,
 };
 
-use proxmox::api::api;
+use proxmox_schema::api;
 
 #[api(
     properties: {