[Debian-on-mobile-maintainers] Bug#1042405: squeekboard - updating to serde-yaml 0.9

Peter Green plugwash at debian.org
Thu Jul 27 19:17:34 BST 2023


Package: squeekboard
Severity: important
Tags: trixie, sid

The rust team are currently looking at updating serde-yaml to 0.9.x
(specifically 0.9.21).

I tried patching squeekboard to use the new version but I get a bunch
of test failures. Can someone who is familiar with the codebase take
a look. I've uploaded the new rust-serde-yaml to experimental so
people can test against it.

  1/67 test_layout_ch_wide                 FAIL             1.55s   exit status 101
  2/67 test_layout_am+phonetic             FAIL             1.57s   exit status 101
  3/67 test_layout_ch+de                   FAIL             1.56s   exit status 101
  4/67 test_layout_bg+phonetic             FAIL             1.58s   exit status 101
  5/67 test_layout_be                      FAIL             1.59s   exit status 101
  6/67 rstest                              FAIL             1.61s   exit status 101

etc

Debdiff attatched, obviously I won't NMU it in it's current form.
-------------- next part --------------
diff -Nru squeekboard-1.22.0/debian/changelog squeekboard-1.22.0/debian/changelog
--- squeekboard-1.22.0/debian/changelog	2023-06-13 14:43:56.000000000 +0000
+++ squeekboard-1.22.0/debian/changelog	2023-07-01 15:14:45.000000000 +0000
@@ -1,3 +1,13 @@
+squeekboard (1.22.0-3) unstable; urgency=medium
+
+  * debian: update build dependencies.
+    Debian now includes `gtk-rs` packages on version 0.16 and
+    `rust-xkbcommon` on version 0.5. This requires patching the Cargo.toml
+    file(s) to make the project use the current versions, and bump the
+    required versions under d/control accordingly. (Closes: #1039534)
+
+ -- Arnaud Ferraris <aferraris at debian.org>  Sat, 01 Jul 2023 17:14:45 +0200
+
 squeekboard (1.22.0-2) unstable; urgency=medium
 
   * Release to unstable
diff -Nru squeekboard-1.22.0/debian/control squeekboard-1.22.0/debian/control
--- squeekboard-1.22.0/debian/control	2023-06-13 14:43:56.000000000 +0000
+++ squeekboard-1.22.0/debian/control	2023-07-01 15:14:45.000000000 +0000
@@ -16,17 +16,17 @@
  libgtk-3-dev,
  librust-aho-corasick-dev,
  librust-bitflags-1-dev (>= 1.0),
- librust-clap-4+std-dev (>= 3.1),
- librust-gio+v2-58-dev (>= 0.14),
- librust-glib+v2-58-dev (>= 0.14),
- librust-glib-sys-dev (>= 0.14),
- librust-gtk+v3-22-dev (>= 0.14),
- librust-gtk-sys-dev (>= 0.14),
+ librust-clap-4+std-dev (>= 4.0),
+ librust-gio+v2-58-dev (>= 0.16),
+ librust-glib+v2-58-dev (>= 0.16),
+ librust-glib-sys-dev (>= 0.16),
+ librust-gtk+v3-24-dev (>= 0.16),
+ librust-gtk-sys-dev (>= 0.16),
  librust-maplit-1-dev (>= 1.0),
  librust-serde-derive-1-dev (>= 1.0),
  librust-serde-yaml-0.8-dev (>= 0.8),
  librust-thread-local-dev,
- librust-xkbcommon-dev (>= 0.4),
+ librust-xkbcommon-dev (>= 0.5),
  librust-zbus-1-dev (>= 1.9),
  librust-zvariant-2-dev (>= 2.10),
  librust-zvariant-derive-2-dev (>= 2.10),
diff -Nru squeekboard-1.22.0/debian/patches/0001-Cargo.deps.newer-update-for-gtk-rs-0.16.patch squeekboard-1.22.0/debian/patches/0001-Cargo.deps.newer-update-for-gtk-rs-0.16.patch
--- squeekboard-1.22.0/debian/patches/0001-Cargo.deps.newer-update-for-gtk-rs-0.16.patch	1970-01-01 00:00:00.000000000 +0000
+++ squeekboard-1.22.0/debian/patches/0001-Cargo.deps.newer-update-for-gtk-rs-0.16.patch	2023-07-01 15:14:45.000000000 +0000
@@ -0,0 +1,53 @@
+From: Arnaud Ferraris <arnaud.ferraris at collabora.com>
+Date: Tue, 27 Jun 2023 12:31:30 +0200
+Subject: Cargo.deps.newer: update for gtk-rs 0.16
+
+---
+ Cargo.deps.newer | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/Cargo.deps.newer b/Cargo.deps.newer
+index 197dfa3..a6d4eac 100644
+--- a/Cargo.deps.newer
++++ b/Cargo.deps.newer
+@@ -9,30 +9,30 @@ zvariant = "2.10.*"
+ zvariant_derive = "2.10.*"
+ 
+ [dependencies.cairo-rs]
+-version = "0.14.*"
++version = "0.16.*"
+ 
+ [dependencies.cairo-sys-rs]
+-version = "0.14.*"
++version = "0.16.*"
+ 
+ [dependencies.gdk]
+-version = "0.14.*"
++version = "0.16.*"
+ 
+ [dependencies.gio]
+-version = "0.14.*"
++version = "0.16.*"
+ features = ["v2_58"]
+ 
+ [dependencies.glib]
+-version = "0.14.*"
++version = "0.16.*"
+ features = ["v2_58"]
+ 
+ [dependencies.glib-sys]
+-version = "0.14.*"
++version = "0.16.*"
+ features = ["v2_58"]
+ 
+ [dependencies.gtk]
+-version = "0.14.*"
+-features = ["v3_22"]
++version = "0.16.*"
++features = ["v3_24"]
+ 
+ [dependencies.gtk-sys]
+-version = "0.14.*"
+-features = ["v3_22"]
++version = "0.16.*"
++features = ["v3_24"]
diff -Nru squeekboard-1.22.0/debian/patches/0002-src-popover-fix-build-with-newer-gtk-rs.patch squeekboard-1.22.0/debian/patches/0002-src-popover-fix-build-with-newer-gtk-rs.patch
--- squeekboard-1.22.0/debian/patches/0002-src-popover-fix-build-with-newer-gtk-rs.patch	1970-01-01 00:00:00.000000000 +0000
+++ squeekboard-1.22.0/debian/patches/0002-src-popover-fix-build-with-newer-gtk-rs.patch	2023-07-01 15:14:45.000000000 +0000
@@ -0,0 +1,35 @@
+From: Arnaud Ferraris <arnaud.ferraris at collabora.com>
+Date: Tue, 27 Jun 2023 13:51:53 +0200
+Subject: src: popover: fix build with newer gtk-rs
+
+`gtk-rs` v0.16+ no longer exposes the internal fields of the
+`gtk::Rectangle` struct, mandating the use of the `new()` function
+instead.
+
+---
+ src/popover.rs | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/popover.rs b/src/popover.rs
+index 8f4e4a5..2a506d8 100644
+--- a/src/popover.rs
++++ b/src/popover.rs
+@@ -305,12 +305,12 @@ pub fn show(
+     #[cfg(not(feature = "glib_v0_14"))]
+     let menu = gtk::Popover::new_from_model(Some(&window), &model);
+ 
+-    menu.set_pointing_to(&gtk::Rectangle {
+-        x: position.x.ceil() as i32,
+-        y: position.y.ceil() as i32,
+-        width: position.width.floor() as i32,
+-        height: position.width.floor() as i32,
+-    });
++    menu.set_pointing_to(&gtk::Rectangle::new (
++        position.x.ceil() as i32,
++        position.y.ceil() as i32,
++        position.width.floor() as i32,
++        position.width.floor() as i32,
++    ));
+     menu.set_constrain_to(gtk::PopoverConstraint::None);
+ 
+     let action_group = gio::SimpleActionGroup::new();
diff -Nru squeekboard-1.22.0/debian/patches/0003-src-style-fix-build-with-newer-gtk-rs.patch squeekboard-1.22.0/debian/patches/0003-src-style-fix-build-with-newer-gtk-rs.patch
--- squeekboard-1.22.0/debian/patches/0003-src-style-fix-build-with-newer-gtk-rs.patch	1970-01-01 00:00:00.000000000 +0000
+++ squeekboard-1.22.0/debian/patches/0003-src-style-fix-build-with-newer-gtk-rs.patch	2023-07-01 15:14:45.000000000 +0000
@@ -0,0 +1,31 @@
+From: Arnaud Ferraris <arnaud.ferraris at collabora.com>
+Date: Tue, 27 Jun 2023 13:52:17 +0200
+Subject: src: style: fix build with newer gtk-rs
+
+`gtk::Settings::property()` no longer returns a `Result` but instead
+panics if the property doesn't exist. In order to work around this
+change without affecting the surrounding code too much, this patch
+modifies the `prop` function so we can avoid panics and wrap the
+property value into a `Result` as was previously the case.
+---
+ src/style.rs | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/style.rs b/src/style.rs
+index fce4059..3f615b3 100644
+--- a/src/style.rs
++++ b/src/style.rs
+@@ -99,7 +99,12 @@ fn get_theme_name(settings: &gtk::Settings) -> GtkTheme {
+         }).ok();
+ 
+     #[cfg(feature = "glib_v0_14")]
+-    let prop = |s: &gtk::Settings, name| s.property(name);
++    let prop = |s: &gtk::Settings, name| {
++        if s.has_property(name, None) {
++            return Ok(s.property_value(name));
++        }
++        return Err("Key not found in settings");
++    };
+     #[cfg(not(feature = "glib_v0_14"))]
+     let prop = |s: &gtk::Settings, name| s.get_property(name);
+ 
diff -Nru squeekboard-1.22.0/debian/patches/0004-Cargo.-use-xkbcommon-v0.5.patch squeekboard-1.22.0/debian/patches/0004-Cargo.-use-xkbcommon-v0.5.patch
--- squeekboard-1.22.0/debian/patches/0004-Cargo.-use-xkbcommon-v0.5.patch	1970-01-01 00:00:00.000000000 +0000
+++ squeekboard-1.22.0/debian/patches/0004-Cargo.-use-xkbcommon-v0.5.patch	2023-07-01 15:14:45.000000000 +0000
@@ -0,0 +1,46 @@
+From: Arnaud Ferraris <arnaud.ferraris at collabora.com>
+Date: Tue, 27 Jun 2023 13:49:54 +0200
+Subject: Cargo.*: use xkbcommon v0.5 for "newer" builds
+
+Debian now provides `rust-xkbcommon` v0.5, so let's use this as the
+base version for our use-case.
+---
+ Cargo.deps       | 3 ++-
+ Cargo.deps.newer | 1 +
+ Cargo.toml.in    | 1 -
+ 3 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/Cargo.deps b/Cargo.deps
+index e7c5e06..079341e 100644
+--- a/Cargo.deps
++++ b/Cargo.deps
+@@ -5,6 +5,7 @@ zbus = "1.0.*"
+ zvariant = "2.0.*"
+ # Newer versions seem to confuse the version of Cargo on Debian Bullseye
+ zvariant_derive = "2.0.*"
++xkbcommon = { version = "0.4.*", features = ["wayland"] }
+ 
+ [dependencies.cairo-rs]
+ version = "0.7.*"
+diff --git a/Cargo.deps.newer b/Cargo.deps.newer
+index a6d4eac..57baa23 100644
+--- a/Cargo.deps.newer
++++ b/Cargo.deps.newer
+@@ -7,6 +7,7 @@ zbus = "1.9.*"
+ zvariant = "2.10.*"
+ # Newer versions seem to confuse the version of Cargo on Debian Bullseye
+ zvariant_derive = "2.10.*"
++xkbcommon = { version = "0.5.*", features = ["wayland"] }
+ 
+ [dependencies.cairo-rs]
+ version = "0.16.*"
+diff --git a/Cargo.toml.in b/Cargo.toml.in
+index c9b2064..557e6c6 100644
+--- a/Cargo.toml.in
++++ b/Cargo.toml.in
+@@ -31,5 +31,4 @@ clap_v4 = []
+ maplit = "1.0.*"
+ serde = { version = "1.0.*", features = ["derive"] }
+ serde_yaml = "0.8.*"
+-xkbcommon = { version = "0.4.*", features = ["wayland"] }
+ # Here is inserted the Cargo.deps file
diff -Nru squeekboard-1.22.0/debian/patches/series squeekboard-1.22.0/debian/patches/series
--- squeekboard-1.22.0/debian/patches/series	1970-01-01 00:00:00.000000000 +0000
+++ squeekboard-1.22.0/debian/patches/series	2023-07-01 15:14:45.000000000 +0000
@@ -0,0 +1,4 @@
+0001-Cargo.deps.newer-update-for-gtk-rs-0.16.patch
+0002-src-popover-fix-build-with-newer-gtk-rs.patch
+0003-src-style-fix-build-with-newer-gtk-rs.patch
+0004-Cargo.-use-xkbcommon-v0.5.patch


More information about the Debian-on-mobile-maintainers mailing list