Your message dated Fri, 23 Jan 2026 23:04:51 +0000
with message-id <[email protected]>
and subject line Bug#1123501: fixed in meli 0.8.13+dfsg-2
has caused the Debian Bug report #1123501,
regarding meli - upcoming rust-termion update.
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1123501: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1123501
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: meli

I hope to update rust-termion to version 4 soon, I was able to
patch meli to build with the new version, but the patches were
quite involved so you might want to run things by upstream
and/or test that the package still works correctly.

Debdiff is attatched.

diff -Nru meli-0.8.12+dfsg/debian/changelog meli-0.8.12+dfsg/debian/changelog
--- meli-0.8.12+dfsg/debian/changelog   2025-12-05 19:17:31.000000000 +0000
+++ meli-0.8.12+dfsg/debian/changelog   2025-12-16 22:46:37.000000000 +0000
@@ -1,3 +1,10 @@
+meli (0.8.12+dfsg-9.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add patches for termion 4.
+
+ -- Peter Michael Green <[email protected]>  Tue, 16 Dec 2025 22:46:37 +0000
+
 meli (0.8.12+dfsg-9) unstable; urgency=medium
 
   * add patch 1001_async-fn-stream
diff -Nru meli-0.8.12+dfsg/debian/control meli-0.8.12+dfsg/debian/control
--- meli-0.8.12+dfsg/debian/control     2025-12-05 13:41:53.000000000 +0000
+++ meli-0.8.12+dfsg/debian/control     2025-12-16 22:46:37.000000000 +0000
@@ -65,7 +65,7 @@
  librust-structopt-0.3-dev,
  librust-syn-1+default-dev,
  librust-tempfile-3+default-dev,
- librust-termion-1+default-dev,
+ librust-termion-4+default-dev,
  librust-toml-0.8+display-dev,
  librust-toml-0.8+parse-dev,
  librust-toml-0.8+preserve-order-dev,
diff -Nru meli-0.8.12+dfsg/debian/patches/2005_termion_2.patch 
meli-0.8.12+dfsg/debian/patches/2005_termion_2.patch
--- meli-0.8.12+dfsg/debian/patches/2005_termion_2.patch        1970-01-01 
00:00:00.000000000 +0000
+++ meli-0.8.12+dfsg/debian/patches/2005_termion_2.patch        2025-12-16 
22:34:26.000000000 +0000
@@ -0,0 +1,35 @@
+Description: Support termion 2
+ Replaces AlternateScreen::from with into_alternate_screen per the
+ upstream migration guide.
+Author: Peter Michael Green <[email protected]>
+
+--- meli-0.8.12+dfsg.orig/meli/Cargo.toml
++++ meli-0.8.12+dfsg/meli/Cargo.toml
+@@ -44,7 +44,7 @@ signal-hook-registry = { version = "1.2.
+ smallvec = { version = "^1.5.0", features = ["serde"] }
+ structopt = { version = "0.3.26", default-features = false }
+ # svg_crate = { version = "^0.13", optional = true, package = "svg" }
+-termion = { version = "1.5.1", default-features = false }
++termion = { version = "2", default-features = false }
+ toml = { version = "0.8", default-features = false, features = 
["display","preserve_order","parse"] }
+ xdg = { version = "2.1.0" }
+ 
+--- meli-0.8.12+dfsg.orig/meli/src/terminal/screen.rs
++++ meli-0.8.12+dfsg/meli/src/terminal/screen.rs
+@@ -375,6 +375,7 @@ impl Screen<Tty> {
+     }
+ 
+     pub fn switch_to_alternate_screen(&mut self, context: &crate::Context) {
++        use crate::termion::screen::IntoAlternateScreen;
+         let mut stdout = BufWriter::with_capacity(
+             240 * 80,
+             Box::new(std::io::stdout()) as Box<dyn std::io::Write>,
+@@ -414,7 +415,7 @@ impl Screen<Tty> {
+         )
+         .unwrap();
+ 
+-        self.display.stdout = 
Some(AlternateScreen::from(stdout.into_raw_mode().unwrap()));
++        self.display.stdout = 
Some(stdout.into_raw_mode().unwrap().into_alternate_screen().unwrap());
+         self.flush();
+     }
+ 
diff -Nru meli-0.8.12+dfsg/debian/patches/2006_termion_3.patch 
meli-0.8.12+dfsg/debian/patches/2006_termion_3.patch
--- meli-0.8.12+dfsg/debian/patches/2006_termion_3.patch        1970-01-01 
00:00:00.000000000 +0000
+++ meli-0.8.12+dfsg/debian/patches/2006_termion_3.patch        2025-12-16 
22:43:44.000000000 +0000
@@ -0,0 +1,96 @@
+Description: Support termion 3
+ Termion 3 was tricky, "RawTerminal" now requires AsFd in addition to
+ Write. To accomodate this we create a Wrapper around BufWriter that
+ implements AsFd.
+Author: Peter Michael Green <[email protected]>
+
+Index: meli-0.8.12+dfsg/meli/src/terminal/screen.rs
+===================================================================
+--- meli-0.8.12+dfsg.orig/meli/src/terminal/screen.rs
++++ meli-0.8.12+dfsg/meli/src/terminal/screen.rs
+@@ -36,8 +36,59 @@ use crate::{
+     Attr, Context, ThemeAttribute,
+ };
+ 
++use std::os::fd::AsFd;
++use std::os::fd::BorrowedFd;
++use std::cell::RefCell;
++use std::os::fd::AsRawFd;
++
++// by implementing this trait one asserts that writing
++// to the writer will not close the underlying Fd.
++pub (crate) unsafe trait WriteAsFd: std::io::Write + AsFd {}
++
++unsafe impl WriteAsFd for Box<(dyn WriteAsFd)> {}
++unsafe impl WriteAsFd for std::io::Stdout {}
++
++pub (crate) struct BufWriterWithFd<W: WriteAsFd> {
++    inner: RefCell<BufWriter<W>>
++}
++
++// a buffered writer that allows access to the FD of the inner writer.
++// requesting the FD will flush the buffered writer.
++impl <W: WriteAsFd> BufWriterWithFd<W> {
++    pub fn with_capacity(capacity: usize, inner: W) -> BufWriterWithFd<W> {
++        Self { inner: BufWriter::with_capacity(capacity, inner).into() }
++    }
++}
++
++impl <W: WriteAsFd> std::io::Write for BufWriterWithFd<W> {
++    fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
++        self.inner.get_mut().write(buf)
++    }
++    fn flush(&mut self) -> std::io::Result<()> {
++        self.inner.get_mut().flush()
++    }
++    fn write_vectored(&mut self, bufs: &[std::io::IoSlice<'_>]) -> 
std::io::Result<usize> {
++        self.inner.get_mut().write_vectored(bufs)
++    }
++    fn write_all(&mut self, buf: &[u8]) -> std::io::Result<()> {
++        self.inner.get_mut().write_all(buf)
++    }
++    fn write_fmt(&mut self, args: std::fmt::Arguments<'_>) -> 
std::io::Result<()> {
++        self.inner.get_mut().write_fmt(args)
++    }
++}
++
++impl <W: WriteAsFd> AsFd for BufWriterWithFd<W> {
++    fn as_fd(&self) -> BorrowedFd<'_> {
++        self.inner.borrow_mut().flush();
++        // Safety: we only use interior mutability to flush the bufwriter, 
and we have asserted
++        // that writing to the underlying writer does not close the 
underlying fd.
++        unsafe { 
BorrowedFd::borrow_raw(self.inner.borrow_mut().get_ref().as_fd().as_raw_fd()) }
++    }
++}
++
+ pub type StateStdout = termion::screen::AlternateScreen<
+-    termion::raw::RawTerminal<BufWriter<Box<dyn Write + 'static>>>,
++    termion::raw::RawTerminal<BufWriterWithFd<Box<dyn WriteAsFd + 'static>>>,
+ >;
+ 
+ type DrawHorizontalSegmentFn =
+@@ -376,9 +427,9 @@ impl Screen<Tty> {
+ 
+     pub fn switch_to_alternate_screen(&mut self, context: &crate::Context) {
+         use crate::termion::screen::IntoAlternateScreen;
+-        let mut stdout = BufWriter::with_capacity(
++        let mut stdout = BufWriterWithFd::with_capacity(
+             240 * 80,
+-            Box::new(std::io::stdout()) as Box<dyn std::io::Write>,
++            Box::new(std::io::stdout()) as Box<dyn WriteAsFd>,
+         );
+ 
+         write!(
+Index: meli-0.8.12+dfsg/meli/Cargo.toml
+===================================================================
+--- meli-0.8.12+dfsg.orig/meli/Cargo.toml
++++ meli-0.8.12+dfsg/meli/Cargo.toml
+@@ -44,7 +44,7 @@ signal-hook-registry = { version = "1.2.
+ smallvec = { version = "^1.5.0", features = ["serde"] }
+ structopt = { version = "0.3.26", default-features = false }
+ # svg_crate = { version = "^0.13", optional = true, package = "svg" }
+-termion = { version = "2", default-features = false }
++termion = { version = "3", default-features = false }
+ toml = { version = "0.8", default-features = false, features = 
["display","preserve_order","parse"] }
+ xdg = { version = "2.1.0" }
+ 
diff -Nru meli-0.8.12+dfsg/debian/patches/2007_termion_4.patch 
meli-0.8.12+dfsg/debian/patches/2007_termion_4.patch
--- meli-0.8.12+dfsg/debian/patches/2007_termion_4.patch        1970-01-01 
00:00:00.000000000 +0000
+++ meli-0.8.12+dfsg/debian/patches/2007_termion_4.patch        2025-12-16 
22:46:37.000000000 +0000
@@ -0,0 +1,88 @@
+Description: Support termion 3
+ Termion 4 added "WheelLeft" and "WheelRight" buttons, this patch makes
+ the conversion from a termion mouse event to a meli one falible and
+ ignores events that cannot be converted.
+Author: Peter Michael Green <[email protected]>
+Index: meli-0.8.12+dfsg/meli/Cargo.toml
+===================================================================
+--- meli-0.8.12+dfsg.orig/meli/Cargo.toml
++++ meli-0.8.12+dfsg/meli/Cargo.toml
+@@ -44,7 +44,7 @@ signal-hook-registry = { version = "1.2.
+ smallvec = { version = "^1.5.0", features = ["serde"] }
+ structopt = { version = "0.3.26", default-features = false }
+ # svg_crate = { version = "^0.13", optional = true, package = "svg" }
+-termion = { version = "3", default-features = false }
++termion = { version = "4", default-features = false }
+ toml = { version = "0.8", default-features = false, features = 
["display","preserve_order","parse"] }
+ xdg = { version = "2.1.0" }
+ 
+Index: meli-0.8.12+dfsg/meli/src/terminal/keys.rs
+===================================================================
+--- meli-0.8.12+dfsg.orig/meli/src/terminal/keys.rs
++++ meli-0.8.12+dfsg/meli/src/terminal/keys.rs
+@@ -98,13 +98,14 @@ pub enum MouseEvent {
+     Hold(u16, u16),
+ }
+ 
+-impl From<TermionMouseEvent> for MouseEvent {
+-    fn from(val: TermionMouseEvent) -> Self {
++impl TryFrom<TermionMouseEvent> for MouseEvent {
++    type Error = &'static str;
++    fn try_from(val: TermionMouseEvent) -> Result<Self, Self::Error> {
+         use TermionMouseEvent::*;
+         match val {
+-            Press(btn, a, b) => Self::Press(btn.into(), a, b),
+-            Release(a, b) => Self::Release(a, b),
+-            Hold(a, b) => Self::Hold(a, b),
++            Press(btn, a, b) => Ok(Self::Press(btn.try_into()?, a, b)),
++            Release(a, b) => Ok(Self::Release(a, b)),
++            Hold(a, b) => Ok(Self::Hold(a, b)),
+         }
+     }
+ }
+@@ -127,17 +128,27 @@ pub enum MouseButton {
+     ///
+     /// This event is typically only used with [`MouseEvent::Press`].
+     WheelDown,
++    /// Mouse wheel is going up.
++    ///
++    /// This event is typically only used with [`MouseEvent::Press`].
++    WheelLeft,
++    /// Mouse wheel is going down.
++    ///
++    /// This event is typically only used with [`MouseEvent::Press`].
++    WheelRight,
+ }
+ 
+-impl From<TermionMouseButton> for MouseButton {
+-    fn from(val: TermionMouseButton) -> Self {
++impl TryFrom<TermionMouseButton> for MouseButton {
++    type Error = &'static str;
++    fn try_from(val: TermionMouseButton) -> Result<Self, Self::Error> {
+         use TermionMouseButton::*;
+         match val {
+-            Left => Self::Left,
+-            Right => Self::Right,
+-            Middle => Self::Middle,
+-            WheelUp => Self::WheelUp,
+-            WheelDown => Self::WheelDown,
++            Left => Ok(Self::Left),
++            Right => Ok(Self::Right),
++            Middle => Ok(Self::Middle),
++            WheelUp => Ok(Self::WheelUp),
++            WheelDown => Ok(Self::WheelDown),
++            _ => Err("unknown mouse button"),
+         }
+     }
+ }
+@@ -364,7 +375,9 @@ pub fn get_events(
+                                     continue 'poll_while;
+                                 }
+                             (Ok((TEvent::Mouse(mev), bytes)), 
InputMode::Normal) => {
+-                                closure((Key::Mouse(mev.into()), bytes));
++                                if let Ok(mev) = mev.try_into() { //ignore 
mouse events that cannot be converted.
++                                    closure((Key::Mouse(mev), bytes));
++                                }
+                                 continue 'poll_while;
+                                 }
+                             (Ok((TEvent::Unsupported(ref k,), _)), 
InputMode::Normal) if k.as_slice() == [27, 91, 63] => {
diff -Nru meli-0.8.12+dfsg/debian/patches/series 
meli-0.8.12+dfsg/debian/patches/series
--- meli-0.8.12+dfsg/debian/patches/series      2025-12-05 13:37:11.000000000 
+0000
+++ meli-0.8.12+dfsg/debian/patches/series      2025-12-16 22:13:06.000000000 
+0000
@@ -9,3 +9,6 @@
 2003_unicode.patch
 2004_no_hardcode_defaults.patch
 2004_no_jmap_server_test.patch
+2005_termion_2.patch
+2006_termion_3.patch
+2007_termion_4.patch

--- End Message ---
--- Begin Message ---
Source: meli
Source-Version: 0.8.13+dfsg-2
Done: Jonas Smedegaard <[email protected]>

We believe that the bug you reported is fixed in the latest version of
meli, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jonas Smedegaard <[email protected]> (supplier of updated meli package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Fri, 23 Jan 2026 23:35:56 +0100
Source: meli
Architecture: source
Version: 0.8.13+dfsg-2
Distribution: unstable
Urgency: medium
Maintainer: Jonas Smedegaard <[email protected]>
Changed-By: Jonas Smedegaard <[email protected]>
Closes: 1123501 1126303
Changes:
 meli (0.8.13+dfsg-2) unstable; urgency=medium
 .
   * drop patch 2001_bitflags,
     obsoleted by Debian packaging changes
   * recommend libgpgme45 (not libgpgme11);
     closes: bug#1126303, thanks to Matthias Geiger
   * update copyright info:
     + avoid any .git* files when repackaging upstream source
   * update git-buildpackage config:
     + stop superfluously filter out .git* files
   * add patches 1002_*
     to use newer major version of crate termion;
     bump build-dependency for crate termion;
     closes: bug#1123501, thanks to Peter Michael Green
Checksums-Sha1:
 44fea19be6a110704f182c7381e489dc691cd5ba 4173 meli_0.8.13+dfsg-2.dsc
 d2d0298616f28e499a95983b3f71882012b0a61b 19244 meli_0.8.13+dfsg-2.debian.tar.xz
 c7d29a06ef1b52e9e79dad1b09f78e9737da32f3 32174 
meli_0.8.13+dfsg-2_amd64.buildinfo
Checksums-Sha256:
 9a3e22d2326a2c96ed732e956ac021a1d7bd0847c86a7cb80f8c19b489e8bf00 4173 
meli_0.8.13+dfsg-2.dsc
 d292cd2e8f5fc24b753cbe1397fac207a1b9aae3753c67114653cec38599adec 19244 
meli_0.8.13+dfsg-2.debian.tar.xz
 9019cc814359a059166b62a2cac4157e72495537a15c2324bb415b2f16c3412f 32174 
meli_0.8.13+dfsg-2_amd64.buildinfo
Files:
 b3c0d046107a0724e39e6cd18c39781d 4173 mail optional meli_0.8.13+dfsg-2.dsc
 720dd8e6bc2ba4b00fa05ba8a61dab3f 19244 mail optional 
meli_0.8.13+dfsg-2.debian.tar.xz
 9ca5256c8897a06dc67c1fbb6fb2e73a 32174 mail optional 
meli_0.8.13+dfsg-2_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJABAEBCgAqFiEEn+Ppw2aRpp/1PMaELHwxRsGgASEFAmlz+dwMHGRyQGpvbmVz
LmRrAAoJECx8MUbBoAEhTVMP/1XewIDsZOh+QEzP0ZDjnlxYkwWb3EJyu6imayYd
7x6OwqEQoGlhud1GHHu1M963H4hgd575PYg8b//pz9VTkj4oJ2wS5WxtAkTr+2BG
vEHKPhcguYA5N+CG1aghN3pj12hG2VdmxlyJVYXOFvqX6tyNVIB9G3nW1xge8V/Q
TulNI+pgFDJzb6P7eoFnysqmbrdiql4zgEjV+XQxM7wWaZ4s1EmdNodmbA6kMkSA
Sfvo216T/eKDsloHilaU8aacqV/CXPu5BEFad3ClJZtMV+oeZBgv4KyqxgcxNrgS
EqQKypQvmLDGubpgZN++qykDRXpyMfeWcp5LD6TY9D/Tscbe4/wlqQ6Kx0KvEG1s
N83JUzk8LA13dl+EYsrlPu8lo4CiwMpMzbulziXzOqaxCkxm62qcs0K10dV30RZg
+b5vPYzHM012albdq5ByGgSOrbAiNUcO5PUz3U9ZznOcwP3xJHFgJPm8E3AdvWMC
V/4/avP/RDnaVq7tubLchUQOq5FI05+wbE2V5wM5WoEvCxUfRky0OY5o68pz+1Ai
vKJIFmRyEKKxG3oc2CcHp1immDZJ84s/IYxoY3YcFKVFhF4jA0KU7fvsKFTOuV+X
VYIYjMLVGXwYZqakF0hWnAJdat2+3JSTEM6nJZ0EaruaEhuwv+K4sQyGfzoEB4kh
H97D
=KmXy
-----END PGP SIGNATURE-----

Attachment: pgplEg7qc3i82.pgp
Description: PGP signature


--- End Message ---

Reply via email to