Package: rust-ureq
Version: 2.6.2-3
Severity: serious
Tags: trixie, sid, patch, ftbfs
rust-base64 was recently updated to 0.21 making rust-ureq unbuildable and
uninstallable.
Upstream already has a fix, I grabbed it and added it to the Debian package and
it
built and passed autopkgtests fine.
Debdiff attached, I may or may not NMU this later.diff -Nru rust-ureq-2.6.2/debian/changelog rust-ureq-2.6.2/debian/changelog
--- rust-ureq-2.6.2/debian/changelog2023-02-12 16:16:54.0 +
+++ rust-ureq-2.6.2/debian/changelog2023-06-15 02:17:59.0 +
@@ -1,3 +1,10 @@
+rust-ureq (2.6.2-3.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Apply upstream patch for base64 0.21.
+
+ -- Peter Michael Green Thu, 15 Jun 2023 02:17:59 +
+
rust-ureq (2.6.2-3) unstable; urgency=medium
* avoid initial dash in autopkgtest test name;
diff -Nru rust-ureq-2.6.2/debian/control rust-ureq-2.6.2/debian/control
--- rust-ureq-2.6.2/debian/control 2023-01-26 16:13:56.0 +
+++ rust-ureq-2.6.2/debian/control 2023-06-15 02:17:57.0 +
@@ -4,7 +4,7 @@
Build-Depends:
debhelper-compat (= 13),
dh-cargo (>= 25),
- librust-base64-0.13+default-dev ,
+ librust-base64-0.21+default-dev ,
librust-brotli-decompressor-2+default-dev ,
librust-chunked-transfer-1+default-dev ,
librust-cookie-0.16-dev ,
@@ -37,7 +37,7 @@
Architecture: all
Multi-Arch: foreign
Depends:
- librust-base64-0.13+default-dev,
+ librust-base64-0.21+default-dev,
librust-brotli-decompressor-2+default-dev,
librust-chunked-transfer-1+default-dev,
librust-cookie-0.16-dev,
diff -Nru rust-ureq-2.6.2/debian/patches/0001_base64.patch
rust-ureq-2.6.2/debian/patches/0001_base64.patch
--- rust-ureq-2.6.2/debian/patches/0001_base64.patch1970-01-01
00:00:00.0 +
+++ rust-ureq-2.6.2/debian/patches/0001_base64.patch2023-06-15
02:16:54.0 +
@@ -0,0 +1,59 @@
+commit abda74c4d8d1235c6eddccafd3c4bd690dc10ea7
+Author: Martin Algesten
+Date: Mon Jan 30 23:39:55 2023 +0100
+
+Upgrade deps
+
+diff --git a/Cargo.toml b/Cargo.toml
+index 00dc9f0ea..418ae582b 100644
+--- a/Cargo.toml
b/Cargo.toml
+@@ -26,7 +26,7 @@ gzip = ["flate2"]
+ brotli = ["brotli-decompressor"]
+
+ [dependencies]
+-base64 = "0.13"
++base64 = "0.21"
+ cookie = { version = "0.16", default-features = false, optional = true}
+ once_cell = "1"
+ url = "2"
+diff --git a/src/proxy.rs b/src/proxy.rs
+index ff9413917..0148904a1 100644
+--- a/src/proxy.rs
b/src/proxy.rs
+@@ -1,3 +1,5 @@
++use base64::{prelude::BASE64_STANDARD, Engine};
++
+ use crate::error::{Error, ErrorKind};
+
+ /// Proxy protocol
+@@ -131,7 +133,7 @@ impl Proxy {
+
+ pub(crate) fn connect>(&self, host: S, port: u16) -> String
{
+ let authorization = if self.use_authorization() {
+-let creds = base64::encode(format!(
++let creds = BASE64_STANDARD.encode(format!(
+ "{}:{}",
+ self.user.clone().unwrap_or_default(),
+ self.password.clone().unwrap_or_default()
+diff --git a/src/unit.rs b/src/unit.rs
+index 895067ff0..2011bb673 100644
+--- a/src/unit.rs
b/src/unit.rs
+@@ -3,6 +3,7 @@ use std::io::{self, Write};
+ use std::ops::Range;
+ use std::time;
+
++use base64::{prelude::BASE64_STANDARD, Engine};
+ use log::debug;
+ use url::Url;
+
+@@ -87,7 +88,7 @@ impl Unit {
+ if (!username.is_empty() || !password.is_empty())
+ && get_header(&headers, "authorization").is_none()
+ {
+-let encoded = base64::encode(format!("{}:{}", username,
password));
++let encoded = BASE64_STANDARD.encode(format!("{}:{}",
username, password));
+ extra.push(Header::new("Authorization", &format!("Basic {}",
encoded)));
+ }
+
diff -Nru rust-ureq-2.6.2/debian/patches/series
rust-ureq-2.6.2/debian/patches/series
--- rust-ureq-2.6.2/debian/patches/series 2023-01-26 16:08:45.0
+
+++ rust-ureq-2.6.2/debian/patches/series 2023-06-15 02:17:14.0
+
@@ -1,3 +1,4 @@
+0001_base64.patch
2001_native_certs.patch
2002_env_logger.patch
2003_cookie-store.patch