Your message dated Tue, 02 Dec 2025 09:35:39 +0000
with message-id <[email protected]>
and subject line Bug#1116528: fixed in meli 0.8.12+dfsg-4
has caused the Debian Bug report #1116528,
regarding meli - upcoming rust-nix 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.)


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

I hope to update rust-nix to version 0.30 soon. I put together a patch
to make meli build with the new version.

However, while doing so I ran into an issue that I belive indicates
broken code. Nix 0.30 removed the "copy" trait from the "PollFd"
type because "|PollFd| implementing |Copy| makes it easy to accidentally
refer to the wrong object after putting one into an array.".

I added .clone calls to get the code building, but I belive that the
code is suffering from the issue that caused the nix developers
to remove the "copy" impl. The conditional logic is looking at the
original pollfd's, not the pollfds that have been mutated by
poll. This is IMO something you may want to discuss with upstream.
diff -Nru meli-0.8.12+dfsg/debian/changelog meli-0.8.12+dfsg/debian/changelog
--- meli-0.8.12+dfsg/debian/changelog   2025-09-24 20:15:36.000000000 +0000
+++ meli-0.8.12+dfsg/debian/changelog   2025-09-28 07:44:36.000000000 +0000
@@ -1,3 +1,10 @@
+meli (0.8.12+dfsg-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add patch for nix 0.30
+
+ -- PeterMichael Green <[email protected]>  Sun, 28 Sep 2025 07:44:36 +0000
+
 meli (0.8.12+dfsg-3) unstable; urgency=medium
 
   * add patch 1001_assert_cmd
diff -Nru meli-0.8.12+dfsg/debian/control meli-0.8.12+dfsg/debian/control
--- meli-0.8.12+dfsg/debian/control     2025-09-24 19:59:07.000000000 +0000
+++ meli-0.8.12+dfsg/debian/control     2025-09-28 07:44:36.000000000 +0000
@@ -32,15 +32,15 @@
  librust-libc-0.2+extra-traits-dev,
  librust-linkify-dev (<< 0.11),
  librust-native-tls-0.2+default-dev,
- librust-nix-0.29+dir-dev,
- librust-nix-0.29+fs-dev,
- librust-nix-0.29+hostname-dev,
- librust-nix-0.29+ioctl-dev,
- librust-nix-0.29+poll-dev,
- librust-nix-0.29+process-dev,
- librust-nix-0.29+signal-dev,
- librust-nix-0.29+socket-dev,
- librust-nix-0.29+term-dev,
+ librust-nix-0.30+dir-dev,
+ librust-nix-0.30+fs-dev,
+ librust-nix-0.30+hostname-dev,
+ librust-nix-0.30+ioctl-dev,
+ librust-nix-0.30+poll-dev,
+ librust-nix-0.30+process-dev,
+ librust-nix-0.30+signal-dev,
+ librust-nix-0.30+socket-dev,
+ librust-nix-0.30+term-dev,
  librust-nom-7+default-dev,
  librust-notify-rust-4+default-dev,
  librust-notify-8+default-dev,
diff -Nru meli-0.8.12+dfsg/debian/patches/2005_nix.patch 
meli-0.8.12+dfsg/debian/patches/2005_nix.patch
--- meli-0.8.12+dfsg/debian/patches/2005_nix.patch      1970-01-01 
00:00:00.000000000 +0000
+++ meli-0.8.12+dfsg/debian/patches/2005_nix.patch      2025-09-28 
07:44:36.000000000 +0000
@@ -0,0 +1,154 @@
+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
+@@ -34,7 +34,7 @@ itoa = { version = "1.0.11", default-fea
+ libc = { version = "0.2.125", default-features = false, features = 
["extra_traits"] }
+ linkify = { version = ">= 0.9.0, <= 0.10", default-features = false }
+ melib = { path = "../melib", version = "0.8.12", features = [] }
+-nix = { version = "0.29", default-features = false, features = ["signal", 
"poll", "term", "ioctl", "process"] }
++nix = { version = "0.30", default-features = false, features = ["signal", 
"poll", "term", "ioctl", "process"] }
+ regex = { version = "1" }
+ serde = { version = "1.0.71" }
+ serde_derive = { version = "1.0.71" }
+Index: meli-0.8.12+dfsg/tools/Cargo.toml
+===================================================================
+--- meli-0.8.12+dfsg.orig/tools/Cargo.toml
++++ meli-0.8.12+dfsg/tools/Cargo.toml
+@@ -30,7 +30,7 @@ required-features = ["melib/imap"]
+ crossbeam = { version = "^0.8" }
+ meli = { path = "../meli", version = "0.8" }
+ melib = { path = "../melib", version = "0.8", features = ["debug-tracing" ] }
+-nix = { version = "0.29", default-features = false, features = ["signal", 
"poll", "term", "ioctl", "process"] }
++nix = { version = "0.30", default-features = false, features = ["signal", 
"poll", "term", "ioctl", "process"] }
+ signal-hook = { version = "^0.3", default-features = false, features = 
["iterator"] }
+ signal-hook-registry = { version = "1.2.0", default-features = false }
+ 
+Index: meli-0.8.12+dfsg/melib/Cargo.toml
+===================================================================
+--- meli-0.8.12+dfsg.orig/melib/Cargo.toml
++++ meli-0.8.12+dfsg/melib/Cargo.toml
+@@ -35,7 +35,7 @@ libc = { version = "0.2.125", features =
+ libloading = { version = "^0.8" }
+ log = { version = "0.4", features = ["std"] }
+ native-tls = { version = "0.2.3", default-features = false, optional = true }
+-nix = { version = "0.29", default-features = false, features = ["fs", 
"socket", "dir", "hostname"] }
++nix = { version = "0.30", default-features = false, features = ["fs", 
"socket", "dir", "hostname"] }
+ nom = { version = "7" }
+ notify = { version = ">= 6.1.1, <= 8", optional = true }
+ polling = { version = "3" }
+Index: meli-0.8.12+dfsg/melib/src/utils/connections.rs
+===================================================================
+--- meli-0.8.12+dfsg.orig/melib/src/utils/connections.rs
++++ meli-0.8.12+dfsg/melib/src/utils/connections.rs
+@@ -294,7 +294,7 @@ impl Connection {
+             Fd { inner, .. } => {
+                 // [ref:VERIFY]
+                 nix::fcntl::fcntl(
+-                    inner.as_raw_fd(),
++                    inner,
+                     nix::fcntl::FcntlArg::F_SETFL(if nonblocking {
+                         nix::fcntl::OFlag::O_NONBLOCK
+                     } else {
+Index: meli-0.8.12+dfsg/melib/src/utils/shellexpand.rs
+===================================================================
+--- meli-0.8.12+dfsg.orig/melib/src/utils/shellexpand.rs
++++ meli-0.8.12+dfsg/melib/src/utils/shellexpand.rs
+@@ -236,15 +236,13 @@ pub mod impls {
+             (prefix, last_component)
+         };
+ 
+-        let dir = match ::nix::dir::Dir::openat(
+-            Some(::libc::AT_FDCWD),
++        let dir = match ::nix::dir::Dir::open(
+             prefix,
+             OFlag::O_DIRECTORY | OFlag::O_NOATIME | OFlag::O_RDONLY | 
OFlag::O_CLOEXEC,
+             ::nix::sys::stat::Mode::S_IRUSR | ::nix::sys::stat::Mode::S_IXUSR,
+         )
+         .or_else(|_| {
+-            ::nix::dir::Dir::openat(
+-                Some(::libc::AT_FDCWD),
++            ::nix::dir::Dir::open(
+                 prefix,
+                 OFlag::O_DIRECTORY | OFlag::O_RDONLY | OFlag::O_CLOEXEC,
+                 ::nix::sys::stat::Mode::S_IRUSR | 
::nix::sys::stat::Mode::S_IXUSR,
+Index: meli-0.8.12+dfsg/meli/src/state.rs
+===================================================================
+--- meli-0.8.12+dfsg.orig/meli/src/state.rs
++++ meli-0.8.12+dfsg/meli/src/state.rs
+@@ -79,13 +79,12 @@ impl InputHandler {
+          * thread will receive it and die. */
+         //let _ = self.rx.try_iter().count();
+         let rx = self.rx.clone();
+-        let pipe = nix::unistd::dup(self.pipe.0.as_raw_fd())
++        let pipe = nix::unistd::dup(&self.pipe.0)
+             .expect("Fatal: Could not dup() input pipe file descriptor");
+         let tx = self.state_tx.clone();
+         thread::Builder::new()
+             .name("input-thread".to_string())
+             .spawn(move || {
+-                let pipe = unsafe { OwnedFd::from_raw_fd(pipe) };
+                 get_events(
+                     |i| {
+                         tx.send(ThreadEvent::Input(i)).unwrap();
+Index: meli-0.8.12+dfsg/meli/src/terminal/embedded.rs
+===================================================================
+--- meli-0.8.12+dfsg.orig/meli/src/terminal/embedded.rs
++++ meli-0.8.12+dfsg/meli/src/terminal/embedded.rs
+@@ -41,7 +41,7 @@ use nix::{
+     ioctl_none_bad, ioctl_write_ptr_bad,
+     libc::{STDERR_FILENO, STDIN_FILENO, STDOUT_FILENO},
+     pty::Winsize,
+-    unistd::{dup2, fork, ForkResult},
++    unistd::{dup2, dup2_stdin, dup2_stdout, dup2_stderr, fork, ForkResult},
+ };
+ use smallvec::SmallVec;
+ 
+@@ -166,9 +166,9 @@ pub fn create_pty(width: usize, height:
+             let backend_fd = open(Path::new(&backend_name), OFlag::O_RDWR, 
stat::Mode::empty())?;
+ 
+             // assign stdin, stdout, stderr to the pty
+-            dup2(backend_fd.as_raw_fd(), STDIN_FILENO).expect("could not dup2 
STDIN");
+-            dup2(backend_fd.as_raw_fd(), STDOUT_FILENO).expect("could not 
dup2 STDOUT");
+-            dup2(backend_fd.as_raw_fd(), STDERR_FILENO).expect("could not 
dup2 STDERR");
++            dup2_stdin(&backend_fd).expect("could not dup2 STDIN");
++            dup2_stdout(&backend_fd).expect("could not dup2 STDOUT");
++            dup2_stderr(&backend_fd).expect("could not dup2 STDERR");
+             // Become session leader
+             nix::unistd::setsid().expect("Forked terminal process could not 
become session leader");
+             match unsafe { set_controlling_terminal(backend_fd.as_raw_fd()) } 
{
+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
+@@ -295,7 +295,7 @@ pub fn get_events(
+     let mut palette = (None, None);
+     let mut paste_buf = String::with_capacity(256);
+     let mut stdin_iter = stdin.events_and_raw();
+-    'poll_while: while let Ok(_n_raw) = poll(&mut [new_command_pollfd, 
stdin_fd], PollTimeout::NONE)
++    'poll_while: while let Ok(_n_raw) = poll(&mut 
[new_command_pollfd.clone(), stdin_fd.clone()], PollTimeout::NONE)
+     {
+         select! {
+             default => {
+@@ -456,7 +456,7 @@ pub fn get_events(
+                 if pselect_result.is_err() || 
error_fd_set.highest().map(|bfd| bfd.as_raw_fd()) == 
Some(new_command_fd.as_raw_fd()) || read_fd_set.highest().map(|bfd| 
bfd.as_raw_fd()) != Some(new_command_fd.as_raw_fd()) {
+                     continue 'poll_while;
+                 };
+-                let _ = nix::unistd::read(new_command_fd.as_raw_fd(), 
buf.as_mut());
++                let _ = nix::unistd::read(new_command_fd, buf.as_mut());
+                 match cmd.unwrap_or_default() {
+                     InputCommand::Kill => return,
+                 }
+Index: meli-0.8.12+dfsg/meli/src/signal_handlers.rs
+===================================================================
+--- meli-0.8.12+dfsg.orig/meli/src/signal_handlers.rs
++++ meli-0.8.12+dfsg/meli/src/signal_handlers.rs
+@@ -47,7 +47,7 @@ pub fn notify(
+     let (s, r) = crossbeam::channel::bounded(100);
+     let mut signals = signal_hook::iterator::Signals::new(signals)?;
+     let _ = nix::fcntl::fcntl(
+-        alarm_pipe_r.as_raw_fd(),
++        alarm_pipe_r,
+         nix::fcntl::FcntlArg::F_SETFL(nix::fcntl::OFlag::O_NONBLOCK),
+     );
+     std::thread::spawn(move || {
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-09-24 20:13:53.000000000 
+0000
+++ meli-0.8.12+dfsg/debian/patches/series      2025-09-28 07:44:36.000000000 
+0000
@@ -7,3 +7,4 @@
 2003_unicode.patch
 2004_no_hardcode_defaults.patch
 2004_no_jmap_server_test.patch
+2005_nix.patch

--- End Message ---
--- Begin Message ---
Source: meli
Source-Version: 0.8.12+dfsg-4
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: Tue, 02 Dec 2025 10:15:40 +0100
Source: meli
Architecture: source
Version: 0.8.12+dfsg-4
Distribution: unstable
Urgency: medium
Maintainer: Jonas Smedegaard <[email protected]>
Changed-By: Jonas Smedegaard <[email protected]>
Closes: 1116528
Changes:
 meli (0.8.12+dfsg-4) unstable; urgency=medium
 .
   * drop patch 2001_linkify,
     obsoleted by Debian packaging changes;
     tighten build-dependency for crate linkify
   * declare built-using: unicode-data
   * add patch cherry-picked upstream
     to use newer minor version of crate nix;
     tighten build-dependencies for crate nix;
     closes: bug#1116528, thanks to Peter Michael Green
Checksums-Sha1:
 0734ebc38d74500a8d7ceced49bd3ea54dbde2e5 4143 meli_0.8.12+dfsg-4.dsc
 9a645a9136485552bbe328f44f349cabb777fbca 19404 meli_0.8.12+dfsg-4.debian.tar.xz
 c941edcfeb444d80f4e9366e39ef1df54042c4db 30132 
meli_0.8.12+dfsg-4_amd64.buildinfo
Checksums-Sha256:
 1ea7bd65772512f7843a25b5b93513d89bbb5d25f062e948654358ff7afa55f3 4143 
meli_0.8.12+dfsg-4.dsc
 4a963559cc0d9e6931dfedecc7c770c3c8733d9ea96e548545111a994f227156 19404 
meli_0.8.12+dfsg-4.debian.tar.xz
 4f6fc4dbc2324cf36b3c36095c48c60d851a3bccd64b567d8d3165c1ae8e3a91 30132 
meli_0.8.12+dfsg-4_amd64.buildinfo
Files:
 06042caf6ad69cd17ee562be636ccafe 4143 mail optional meli_0.8.12+dfsg-4.dsc
 6eb376cda375273af722a9ecca35e95f 19404 mail optional 
meli_0.8.12+dfsg-4.debian.tar.xz
 37a1e8ea6ea63140f504946940f5cdf9 30132 mail optional 
meli_0.8.12+dfsg-4_amd64.buildinfo

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

iQJABAEBCgAqFiEEn+Ppw2aRpp/1PMaELHwxRsGgASEFAmkusAAMHGRyQGpvbmVz
LmRrAAoJECx8MUbBoAEhbFoP/3/Jb9MgbLNVrHHoGmsjxgD+v6DI5DruEAa2XzZd
TavlRcxTYLqLqghCLhWlbT4TLvUSjoTtZtwqTdhf1vf3zrClj2JQx0ABSanhZ3pv
TledDsLQgqKeeDpI80LHsAq9Q/tJyEYNwFnNGXAF+i8o26XZVt7u+2Mv0kDaHhGL
q4gFXY1RkwbXjdg1pCnDDdSFuvhY58zaB6R5vPuNtyL6KVjDup+1zciGbu95E0nf
QmVyXBXv9dJjS/9Ug7hZFnfm7kMvPmFBvFXmNy7pggz30gEgQdBkAzcUuggocnwy
mFKAUhROsq5/wbelBQjf9KmkHobUal3Ai+RhXnjnZspFHxEClprT3BxTBFj0QvsM
6w8L/ONCPMhuLQA10tA9vt5g7Ofae8fkEKzNmrC5/uQTxDf3XsKzWzTDwr3jNcbD
dMnry16hcVaLnZAIsujNx0VUi3fwb4FW+/1t5FVty/rXjonwSeFqfBAdrOqY6amd
pdhRpfSOGJOp1AyGKtIc8uXG0Gdmbc0KrWzu5Md8U9rAbteKT/cybMjMG8GcNxKu
JMdHl28l5Cl1GQN5fP1fVROUk+ccRCmJuNtITJzsysQcgIhHuXLPD8CGGieqxr3M
Vn6z1+jylpmx71juZyDXZLMljmOEf34oSJ/tlA09xpVzgQHIeIX2BZOVYVKZIvcJ
gL8j
=UvlV
-----END PGP SIGNATURE-----

Attachment: pgpwLgaOR22WJ.pgp
Description: PGP signature


--- End Message ---

Reply via email to