Package: patch-hub
Version: 0.1.7-2

I hope to update ratatui to the latest version soon, patch-hub will
need a patch to build with the new version.

I was able to make the patch in such a way that the code still
builds with the old version, so this can be uploaded without
waiting for the update.
diff -Nru patch-hub-0.1.7/debian/changelog patch-hub-0.1.7/debian/changelog
--- patch-hub-0.1.7/debian/changelog    2026-04-15 09:59:26.000000000 +0000
+++ patch-hub-0.1.7/debian/changelog    2026-05-05 21:31:00.000000000 +0000
@@ -1,3 +1,10 @@
+patch-hub (0.1.7-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add patch for ratatui 0.30
+
+ -- Peter Michael Green <[email protected]>  Tue, 05 May 2026 21:31:00 +0000
+
 patch-hub (0.1.7-2) unstable; urgency=medium
 
   * patch out dep on ansi-to-tui
diff -Nru patch-hub-0.1.7/debian/control patch-hub-0.1.7/debian/control
--- patch-hub-0.1.7/debian/control      2026-04-15 09:59:26.000000000 +0000
+++ patch-hub-0.1.7/debian/control      2026-05-05 21:31:00.000000000 +0000
@@ -16,7 +16,8 @@
  librust-derive-getters-0.5+default-dev,
  librust-lazy-static-1+default-dev (>= 1.5.0-~~),
  librust-mockall-0.13+default-dev (>= 0.13.0-~~),
- librust-ratatui-0.29+default-dev,
+ librust-ratatui+default-dev (>= 0.29),
+ librust-ratatui+default-dev (<< 0.31),
  librust-regex-1+default-dev (>= 1.11.1-~~),
  librust-serde-1+default-dev (>= 1.0.217-~~),
  librust-serde-1+derive-dev (>= 1.0.217-~~),
diff -Nru patch-hub-0.1.7/debian/patches/0004-ratatui-0.30.patch 
patch-hub-0.1.7/debian/patches/0004-ratatui-0.30.patch
--- patch-hub-0.1.7/debian/patches/0004-ratatui-0.30.patch      1970-01-01 
00:00:00.000000000 +0000
+++ patch-hub-0.1.7/debian/patches/0004-ratatui-0.30.patch      2026-05-05 
21:31:00.000000000 +0000
@@ -0,0 +1,107 @@
+Index: patch-hub-0.1.7/Cargo.toml
+===================================================================
+--- patch-hub-0.1.7.orig/Cargo.toml
++++ patch-hub-0.1.7/Cargo.toml
+@@ -12,7 +12,7 @@ color-eyre = "0.6.3"
+ mockall = "0.13.0"
+ derive-getters = { version = "0.5.0", features = ["auto_copy_getters"] }
+ lazy_static = "1.5.0"
+-ratatui = "0.29.0"
++ratatui = ">= 0.29.0, < 0.31"
+ regex = "1.11.1"
+ serde = { version = "1.0.217", features = ["derive"] }
+ serde-xml-rs = "0.5.1"
+Index: patch-hub-0.1.7/src/infrastructure/terminal.rs
+===================================================================
+--- patch-hub-0.1.7.orig/src/infrastructure/terminal.rs
++++ patch-hub-0.1.7/src/infrastructure/terminal.rs
+@@ -27,7 +27,7 @@ pub fn restore() -> io::Result<()> {
+     Ok(())
+ }
+ 
+-pub fn setup_user_io<B: Backend>(terminal: &mut Terminal<B>) -> 
color_eyre::Result<()> {
++pub fn setup_user_io(terminal: &mut Tui) -> color_eyre::Result<()> {
+     terminal.clear()?;
+     terminal.set_cursor_position(Position::new(0, 0))?;
+     terminal.show_cursor()?;
+@@ -35,7 +35,7 @@ pub fn setup_user_io<B: Backend>(termina
+     Ok(())
+ }
+ 
+-pub fn teardown_user_io<B: Backend>(terminal: &mut Terminal<B>) -> 
color_eyre::Result<()> {
++pub fn teardown_user_io(terminal: &mut Tui) -> color_eyre::Result<()> {
+     enable_raw_mode()?;
+     terminal.clear()?;
+     Ok(())
+Index: patch-hub-0.1.7/src/handler/details_actions.rs
+===================================================================
+--- patch-hub-0.1.7.orig/src/handler/details_actions.rs
++++ patch-hub-0.1.7/src/handler/details_actions.rs
+@@ -11,13 +11,14 @@ use crate::{
+     infrastructure::terminal::{setup_user_io, teardown_user_io},
+     ui::popup::{help::HelpPopUpBuilder, review_trailers::ReviewTrailersPopUp, 
PopUp},
+ };
++use crate::infrastructure::terminal::Tui;
+ 
+ use super::wait_key_press;
+ 
+-pub fn handle_patchset_details<B: Backend>(
++pub fn handle_patchset_details(
+     app: &mut App,
+     key: KeyEvent,
+-    terminal: &mut Terminal<B>,
++    terminal: &mut Tui,
+ ) -> color_eyre::Result<()> {
+     let patchset_details_and_actions = app.details_actions.as_mut().unwrap();
+ 
+Index: patch-hub-0.1.7/src/handler/mod.rs
+===================================================================
+--- patch-hub-0.1.7.orig/src/handler/mod.rs
++++ patch-hub-0.1.7/src/handler/mod.rs
+@@ -20,6 +20,7 @@ use crate::{
+     loading_screen,
+     ui::draw_ui,
+ };
++use crate::infrastructure::terminal::Tui;
+ 
+ use bookmarked::handle_bookmarked_patchsets;
+ use details_actions::handle_patchset_details;
+@@ -27,13 +28,11 @@ use edit_config::handle_edit_config;
+ use latest::handle_latest_patchsets;
+ use mail_list::handle_mailing_list_selection;
+ 
+-fn key_handling<B>(
+-    mut terminal: Terminal<B>,
++fn key_handling(
++    mut terminal: Tui,
+     app: &mut App,
+     key: KeyEvent,
+-) -> color_eyre::Result<ControlFlow<(), Terminal<B>>>
+-where
+-    B: Backend + Send + 'static,
++) -> color_eyre::Result<ControlFlow<(), Tui>>
+ {
+     if let Some(popup) = app.popup.as_mut() {
+         if matches!(key.code, KeyCode::Esc | KeyCode::Char('q')) {
+@@ -63,9 +62,7 @@ where
+     Ok(ControlFlow::Continue(terminal))
+ }
+ 
+-fn logic_handling<B>(mut terminal: Terminal<B>, app: &mut App) -> 
color_eyre::Result<Terminal<B>>
+-where
+-    B: Backend + Send + 'static,
++fn logic_handling(mut terminal: Tui, app: &mut App) -> color_eyre::Result<Tui>
+ {
+     match app.current_screen {
+         CurrentScreen::MailingListSelection => {
+@@ -102,9 +99,7 @@ where
+     Ok(terminal)
+ }
+ 
+-pub fn run_app<B>(mut terminal: Terminal<B>, mut app: App) -> 
color_eyre::Result<()>
+-where
+-    B: Backend + Send + 'static,
++pub fn run_app(mut terminal: Tui, mut app: App) -> color_eyre::Result<()>
+ {
+     loop {
+         terminal = logic_handling(terminal, &mut app)?;
diff -Nru patch-hub-0.1.7/debian/patches/series 
patch-hub-0.1.7/debian/patches/series
--- patch-hub-0.1.7/debian/patches/series       2026-04-15 09:59:26.000000000 
+0000
+++ patch-hub-0.1.7/debian/patches/series       2026-05-05 21:30:17.000000000 
+0000
@@ -1,3 +1,4 @@
 0001-relax-deps.patch
 0002-xml-rs-0.5-compat.patch
 0003-dont-use-ansi-to-tui.patch
+0004-ratatui-0.30.patch

Reply via email to