Bug#1039534: [Debian-on-mobile-maintainers] Bug#1039534: squeekboard: Fails to build on Debian Unstable

2023-06-28 Thread Arnaud Ferraris

Hi,

Le mer. 28 juin 2023 à 20:38:24 +01:00:00, Peter Michael Green 
 a écrit :

tags 1039534 +patch
thanks

squeekboard build-depends on missing:
- librust-gtk+v3-22-dev:amd64 (>= 0.14)

The current version of rust-gtk provides librust-gtk+v3-24-dev
After updating the dependencies (both Debian and cargo) to allow a 
build
to be attempted I discovered there were also a couple of real code 
issues.


The first is that gtk::rectangle is now an opaque type, so you have to
call "new" instead of assembling it field by field.

The second is that "property" appears to have been renamed first to
"property_value", then to "try_property_value". Then the non-panicing
version was removed completely. I modified the code to add an explicit
check if the property exists before calling the panicing version of
the function (now called "property_value") but I have no idea if this
is overkill or not.

I'm not really in a position to test this patch as I don't use Debian
on an appropriate device.

Anyway, a debdiff is attached, if there is no maintainer response,
*and* I get feedback from a user that the patched squeekboard is
usable then I may NMU it.


Thanks for looking into this. I'm currently testing a very similar 
patch (see 
https://salsa.debian.org/DebianOnMobile-team/squeekboard/-/tree/wip/a-wai/update-build-deps) 
and will likely upload a new version including it over the week-end.


Cheers,
Arnaud


















Bug#1039534: squeekboard: Fails to build on Debian Unstable

2023-06-28 Thread Peter Michael Green

tags 1039534 +patch
thanks

squeekboard build-depends on missing:
- librust-gtk+v3-22-dev:amd64 (>= 0.14)

The current version of rust-gtk provides librust-gtk+v3-24-dev

After updating the dependencies (both Debian and cargo) to allow a build
to be attempted I discovered there were also a couple of real code issues.

The first is that gtk::rectangle is now an opaque type, so you have to
call "new" instead of assembling it field by field.

The second is that "property" appears to have been renamed first to
"property_value", then to "try_property_value". Then the non-panicing
version was removed completely. I modified the code to add an explicit
check if the property exists before calling the panicing version of
the function (now called "property_value") but I have no idea if this
is overkill or not.

I'm not really in a position to test this patch as I don't use Debian
on an appropriate device.

Anyway, a debdiff is attached, if there is no maintainer response,
*and* I get feedback from a user that the patched squeekboard is
usable then I may NMU it.
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.0 +
+++ squeekboard-1.22.0/debian/changelog 2023-06-28 18:54:50.0 +
@@ -1,3 +1,16 @@
+squeekboard (1.22.0-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Remove upper limit on cargo dependencies.
+  * Update for rust-gtk 0.16 and related packages. (Closes: #)
++ Use v3_24 feature instead of v3_22 feature for rust-gtk as the former
+  no longer exists.
++ Patch code to build with rust-gtk 0.16
++ Bump rust-gtk/rust-glib dependencies to 0.16 as the fixes for 0.16
+  will break builds with older versions of the rust gtk stack.
+
+ -- Peter Michael Green   Wed, 28 Jun 2023 18:54:50 +
+
 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.0 +
+++ squeekboard-1.22.0/debian/control   2023-06-28 18:16:36.0 +
@@ -18,9 +18,9 @@
  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+v2-58-dev (>= 0.16),
  librust-glib-sys-dev (>= 0.14),
- librust-gtk+v3-22-dev (>= 0.14),
+ librust-gtk+v3-24-dev (>= 0.16),
  librust-gtk-sys-dev (>= 0.14),
  librust-maplit-1-dev (>= 1.0),
  librust-serde-derive-1-dev (>= 1.0),
diff -Nru squeekboard-1.22.0/debian/patches/rust-gtk-0.16.patch 
squeekboard-1.22.0/debian/patches/rust-gtk-0.16.patch
--- squeekboard-1.22.0/debian/patches/rust-gtk-0.16.patch   1970-01-01 
00:00:00.0 +
+++ squeekboard-1.22.0/debian/patches/rust-gtk-0.16.patch   2023-06-28 
18:51:46.0 +
@@ -0,0 +1,92 @@
+Index: squeekboard-1.22.0/Cargo.deps.newer
+===
+--- squeekboard-1.22.0.orig/Cargo.deps.newer
 squeekboard-1.22.0/Cargo.deps.newer
+@@ -9,30 +9,30 @@ zvariant = "2.10.*"
+ zvariant_derive = "2.10.*"
+ 
+ [dependencies.cairo-rs]
+-version = "0.14.*"
++version = ">= 0.14"
+ 
+ [dependencies.cairo-sys-rs]
+-version = "0.14.*"
++version = ">= 0.14"
+ 
+ [dependencies.gdk]
+-version = "0.14.*"
++version = ">= 0.14"
+ 
+ [dependencies.gio]
+-version = "0.14.*"
++version = ">= 0.14"
+ features = ["v2_58"]
+ 
+ [dependencies.glib]
+-version = "0.14.*"
++version = ">= 0.14"
+ features = ["v2_58"]
+ 
+ [dependencies.glib-sys]
+-version = "0.14.*"
++version = ">= 0.14"
+ features = ["v2_58"]
+ 
+ [dependencies.gtk]
+-version = "0.14.*"
+-features = ["v3_22"]
++version = ">= 0.14"
++features = ["v3_24"]
+ 
+ [dependencies.gtk-sys]
+-version = "0.14.*"
+-features = ["v3_22"]
++version = ">= 0.14"
++features = ["v3_24"]
+Index: squeekboard-1.22.0/Cargo.toml.in
+===
+--- squeekboard-1.22.0.orig/Cargo.toml.in
 squeekboard-1.22.0/Cargo.toml.in
+@@ -31,5 +31,5 @@ clap_v4 = []
+ maplit = "1.0.*"
+ serde = { version = "1.0.*", features = ["derive"] }
+ serde_yaml = "0.8.*"
+-xkbcommon = { version = "0.4.*", features = ["wayland"] }
++xkbcommon = { version = ">= 0.4", features = ["wayland"] }
+ # Here is inserted the Cargo.deps file
+Index: squeekboard-1.22.0/src/popover.rs
+===
+--- squeekboard-1.22.0.orig/src/popover.rs
 squeekboard-1.22.0/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(>k::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(>k::Rectangle

Bug#1039534: squeekboard: Fails to build on Debian Unstable

2023-06-26 Thread Jeremy Bícha
Source: squeekboard
Version: 1.22.0-2
Severity: serious
Tags: ftbfs sid trixie upstream

squeekboard fails to build in Debian Unstable.

https://buildd.debian.org/status/package.php?p=squeekboard

squeekboard build-depends on missing:
- librust-gtk+v3-22-dev:amd64 (>= 0.14)

The current version of rust-gtk provides librust-gtk+v3-24-dev

Thank you,
Jeremy Bícha