Bug#1037977: rust-ureq - update for base64 0.21

2023-06-15 Thread Jonas Smedegaard
Quoting Peter Green (2023-06-15 06:35:02)
> 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.

Thanks for the report.

Instead of using the provided patch, I have prepared an upgrade to
newest upstream release which includes this change.

Unfortunately I am not yet able to build that, due to base64 upgrade
also affecting rust-rustls-pemfile and rust-cookie - which you already
know and have dealt with earlier today.

In future, I recommend to more cautiously release backwards-incompatible
package upgrades: First release to experimental as a NEW package, then
when approved by ftpmasters re-release to unstable, then when no longer
wanting to maintain the older branch) file RC bugs against all reverse
dependencies of the older package, and when none of those are in testing
(which happens automatically after some time for packages with RC bugs)
request removal from testing of the old package, and then later from
unstable as well.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/
 * Sponsorship: https://ko-fi.com/drjones

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

signature.asc
Description: signature


Bug#1037977: rust-ureq - update for base64 0.21

2023-06-14 Thread Peter Green

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>(, 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(, "authorization").is_none()
+ {
+-let encoded = base64::encode(format!("{}:{}", username, 
password));
++let encoded = BASE64_STANDARD.encode(format!("{}:{}", 
username, password));
+ extra.push(Header::new("Authorization", !("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