--- Begin Message ---
Source: resvg
Version: 0.44.0-3
Severity: serious
Tags: patch
Justification: RT
X-Debbugs-Cc: noisyc...@tutanota.com
Hi,
src:resvg's autopkgtest is failing bacause of two separate issues: 1. some of
resvg's and usvg's versions are reported incorrectly in d/tests/control, making
tests uninstallable; 2. two of resvg's examples should be gated behind the
correct features. The patches in attachment, to be applied to the debian
packages in no precise order, fix both of them.
Cheers!
>From 4983a9ca52e2d9bd378ebadea5524b4a3eeaf185 Mon Sep 17 00:00:00 2001
From: NoisyCoil <noisyc...@tutanota.com>
Date: Thu, 20 Feb 2025 23:30:55 +0100
Subject: [PATCH 1/2] d/tests/control: fix {re,u}svg package versions
---
debian/tests/control | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/debian/tests/control b/debian/tests/control
index 0bb23c97..44473799 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -20,7 +20,7 @@ Depends:
dh-rust,
librust-once-cell-1+default-dev,
librust-png-0.17+default-dev,
- librust-resvg-0.8+default-dev,
+ librust-resvg-0.44+default-dev,
Restrictions:
allow-stderr,
@@ -44,7 +44,7 @@ Depends:
dh-rust,
librust-once-cell-1+default-dev,
librust-png-0.17+default-dev,
- librust-resvg-0.8+memmap-fonts-dev,
+ librust-resvg-0.44+memmap-fonts-dev,
Restrictions:
allow-stderr,
Architecture: amd64
@@ -57,7 +57,7 @@ Depends:
dh-rust,
librust-once-cell-1+default-dev,
librust-png-0.17+default-dev,
- librust-resvg-0.8+raster-images-dev,
+ librust-resvg-0.44+raster-images-dev,
Restrictions:
allow-stderr,
Architecture: amd64
@@ -70,7 +70,7 @@ Depends:
dh-rust,
librust-once-cell-1+default-dev,
librust-png-0.17+default-dev,
- librust-resvg-0.8+system-fonts-dev,
+ librust-resvg-0.44+system-fonts-dev,
Restrictions:
allow-stderr,
Architecture: amd64
@@ -83,7 +83,7 @@ Depends:
dh-rust,
librust-once-cell-1+default-dev,
librust-png-0.17+default-dev,
- librust-resvg-0.8+text-dev,
+ librust-resvg-0.44+text-dev,
Restrictions:
allow-stderr,
Architecture: amd64
@@ -106,7 +106,7 @@ Features:
Depends:
dh-rust,
librust-once-cell-1+default-dev,
- librust-usvg-0.8+default-dev,
+ librust-usvg-0.44+default-dev,
Restrictions:
allow-stderr,
@@ -128,7 +128,7 @@ Features:
Depends:
dh-rust,
librust-once-cell-1+default-dev,
- librust-usvg-0.8+memmap-fonts-dev,
+ librust-usvg-0.44+memmap-fonts-dev,
Restrictions:
allow-stderr,
Architecture: amd64
@@ -140,7 +140,7 @@ Features:
Depends:
dh-rust,
librust-once-cell-1+default-dev,
- librust-usvg-0.8+system-fonts-dev,
+ librust-usvg-0.44+system-fonts-dev,
Restrictions:
allow-stderr,
Architecture: amd64
@@ -152,7 +152,7 @@ Features:
Depends:
dh-rust,
librust-once-cell-1+default-dev,
- librust-usvg-0.8+text-dev,
+ librust-usvg-0.44+text-dev,
Restrictions:
allow-stderr,
Architecture: amd64
--
2.47.2
>From d9220858c7dd4d4ca1fa62d7b65e52e2e1b86317 Mon Sep 17 00:00:00 2001
From: NoisyCoil <noisyc...@tutanota.com>
Date: Thu, 20 Feb 2025 23:49:21 +0100
Subject: [PATCH 2/2] d/patches: add 1002_fix-examples.patch
Gate some resvg's examples behind the appropriate features
---
debian/patches/1002_fix-examples.patch | 34 ++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 35 insertions(+)
create mode 100644 debian/patches/1002_fix-examples.patch
diff --git a/debian/patches/1002_fix-examples.patch
b/debian/patches/1002_fix-examples.patch
new file mode 100644
index 00000000..b57f66c2
--- /dev/null
+++ b/debian/patches/1002_fix-examples.patch
@@ -0,0 +1,34 @@
+Description: fix examples
+ Fix examples by gating them behind the relevant features
+Author: NoisyCoil <noisyc...@tutanota.com>
+Last-Update: 2025-02-20
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/crates/resvg/examples/draw_bboxes.rs
++++ b/crates/resvg/examples/draw_bboxes.rs
+@@ -1,3 +1,4 @@
++#[cfg(all(feature = "text", feature = "system-fonts"))]
+ fn main() {
+ let args: Vec<String> = std::env::args().collect();
+ if !(args.len() == 3 || args.len() == 5) {
+@@ -76,3 +77,6 @@
+ }
+ }
+ }
++
++#[cfg(not(all(feature = "text", feature = "system-fonts")))]
++fn main() {}
+--- a/crates/resvg/examples/minimal.rs
++++ b/crates/resvg/examples/minimal.rs
+@@ -1,3 +1,4 @@
++#[cfg(all(feature = "text", feature = "system-fonts"))]
+ fn main() {
+ let args: Vec<String> = std::env::args().collect();
+ if args.len() != 3 {
+@@ -23,3 +24,6 @@
+ resvg::render(&tree, tiny_skia::Transform::default(), &mut
pixmap.as_mut());
+ pixmap.save_png(&args[2]).unwrap();
+ }
++
++#[cfg(not(all(feature = "text", feature = "system-fonts")))]
++fn main() {}
diff --git a/debian/patches/series b/debian/patches/series
index 9adfb6b8..7df20de9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
1001_image-webp.patch
+1002_fix-examples.patch
2002_privacy.patch
--
2.47.2
--- End Message ---