Your message dated Fri, 17 Oct 2025 12:51:12 +0000
with message-id <[email protected]>
and subject line Bug#1116313: fixed in fish 4.0.2-1.1
has caused the Debian Bug report #1116313,
regarding fish - 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.)


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

I hope to update the nix crate to 0.30.1 soon. I put together
a patch to make fish build with the new upstream version.

Debdiff is attached.
diff -Nru fish-4.0.2/debian/changelog fish-4.0.2/debian/changelog
--- fish-4.0.2/debian/changelog 2025-04-20 17:01:54.000000000 +0000
+++ fish-4.0.2/debian/changelog 2025-09-25 11:25:33.000000000 +0000
@@ -1,3 +1,11 @@
+fish (4.0.2-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add upstream patch for nix 0.30
+  * Tighten debian build-dependency on nix to match Cargo dependency.
+
+ -- Peter Michael Green <[email protected]>  Thu, 25 Sep 2025 11:25:33 +0000
+
 fish (4.0.2-1) unstable; urgency=medium
 
   * New upstream version 4.0.2
diff -Nru fish-4.0.2/debian/control fish-4.0.2/debian/control
--- fish-4.0.2/debian/control   2025-02-27 21:55:28.000000000 +0000
+++ fish-4.0.2/debian/control   2025-09-25 11:25:33.000000000 +0000
@@ -20,7 +20,7 @@
                librust-lazy-static-dev,
                librust-libc-dev (>= 0.2.169~),
                librust-lru-dev,
-               librust-nix-dev,
+               librust-nix-0.30-dev (>= 0.30.1),
                librust-num-traits-dev,
                librust-once-cell-dev,
                librust-portable-atomic-dev,
diff -Nru fish-4.0.2/debian/patches/nix-0.31.patch 
fish-4.0.2/debian/patches/nix-0.31.patch
--- fish-4.0.2/debian/patches/nix-0.31.patch    1970-01-01 00:00:00.000000000 
+0000
+++ fish-4.0.2/debian/patches/nix-0.31.patch    2025-09-25 11:25:33.000000000 
+0000
@@ -0,0 +1,144 @@
+commit c2eaef7273c5558678bc0465bdf5bdaef90859cd
+Author: Yuyi Wang <[email protected]>
+Date:   Tue May 6 16:52:54 2025 +0800
+
+    Update nix to 0.30.1 (#11458)
+    
+    After nix updated to 0.30, all functions related to file descriptor 
accepts impl AsFd, e.g., BorrowedFd. This PR is a minimal update. It tries to 
use impl AsFd as long as possible, but uses BorrowedFd in some places. Yes it 
introduces unsafe, but doesn't introduce new unsafe code.
+
+Index: fish-4.0.2/Cargo.toml
+===================================================================
+--- fish-4.0.2.orig/Cargo.toml
++++ fish-4.0.2/Cargo.toml
+@@ -46,7 +46,7 @@ libc = "0.2.155"
+ # disabling default features uses the stdlib instead, but it doubles the time 
to rewrite the history
+ # files as of 22 April 2024.
+ lru = "0.12.3"
+-nix = { version = "0.29.0", default-features = false, features = [
++nix = { version = "0.30.1", default-features = false, features = [
+     "event",
+     "inotify",
+     "resource",
+Index: fish-4.0.2/src/common.rs
+===================================================================
+--- fish-4.0.2.orig/src/common.rs
++++ fish-4.0.2/src/common.rs
+@@ -1340,7 +1340,7 @@ fn can_be_encoded(wc: char) -> bool {
+ /// Return the number of bytes read, or 0 on EOF, or an error.
+ pub fn read_blocked(fd: RawFd, buf: &mut [u8]) -> nix::Result<usize> {
+     loop {
+-        let res = nix::unistd::read(fd, buf);
++        let res = nix::unistd::read(unsafe { BorrowedFd::borrow_raw(fd) }, 
buf);
+         if let Err(nix::Error::EINTR) = res {
+             continue;
+         }
+@@ -1387,7 +1387,7 @@ pub fn write_loop<Fd: AsRawFd>(fd: &Fd,
+ pub fn read_loop<Fd: AsRawFd>(fd: &Fd, buf: &mut [u8]) -> 
std::io::Result<usize> {
+     let fd = fd.as_raw_fd();
+     loop {
+-        match nix::unistd::read(fd, buf) {
++        match nix::unistd::read(unsafe { BorrowedFd::borrow_raw(fd) }, buf) {
+             Ok(read) => {
+                 return Ok(read);
+             }
+Index: fish-4.0.2/src/fds.rs
+===================================================================
+--- fish-4.0.2.orig/src/fds.rs
++++ fish-4.0.2/src/fds.rs
+@@ -34,7 +34,7 @@ pub struct AutoCloseFd {
+ 
+ impl Read for AutoCloseFd {
+     fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
+-        nix::unistd::read(self.as_raw_fd(), buf).map_err(std::io::Error::from)
++        nix::unistd::read(self, buf).map_err(std::io::Error::from)
+     }
+ }
+ 
+@@ -191,7 +191,7 @@ fn heightenize_fd(fd: OwnedFd, input_has
+     }
+ 
+     // Here we are asking the kernel to give us a cloexec fd.
+-    let newfd = match nix::fcntl::fcntl(raw_fd, 
FcntlArg::F_DUPFD_CLOEXEC(FIRST_HIGH_FD)) {
++    let newfd = match nix::fcntl::fcntl(&fd, 
FcntlArg::F_DUPFD_CLOEXEC(FIRST_HIGH_FD)) {
+         Ok(newfd) => newfd,
+         Err(err) => {
+             perror("fcntl");
+@@ -244,7 +244,7 @@ pub fn open_cloexec(path: &CStr, flags:
+     // If it is that's our cancel signal, so we abort.
+     loop {
+         let ret = nix::fcntl::open(path, flags | OFlag::O_CLOEXEC, mode);
+-        let ret = ret.map(|raw_fd| unsafe { File::from_raw_fd(raw_fd) });
++        let ret = ret.map(File::from);
+         match ret {
+             Ok(file) => {
+                 set_errno(saved_errno);
+Index: fish-4.0.2/src/reader.rs
+===================================================================
+--- fish-4.0.2.orig/src/reader.rs
++++ fish-4.0.2/src/reader.rs
+@@ -29,6 +29,7 @@ use std::io::Write;
+ use std::num::NonZeroUsize;
+ use std::ops::ControlFlow;
+ use std::ops::Range;
++use std::os::fd::BorrowedFd;
+ use std::os::fd::RawFd;
+ use std::pin::Pin;
+ use std::rc::Rc;
+@@ -752,7 +753,7 @@ fn read_ni(parser: &Parser, fd: RawFd, i
+     loop {
+         let mut buff = [0_u8; 4096];
+ 
+-        match nix::unistd::read(fd, &mut buff) {
++        match nix::unistd::read(unsafe { BorrowedFd::borrow_raw(fd) }, &mut 
buff) {
+             Ok(0) => {
+                 // EOF.
+                 break;
+Index: fish-4.0.2/src/tests/fd_monitor.rs
+===================================================================
+--- fish-4.0.2.orig/src/tests/fd_monitor.rs
++++ fish-4.0.2/src/tests/fd_monitor.rs
+@@ -82,7 +82,7 @@ impl ItemMaker {
+             }
+             ItemWakeReason::Readable => {
+                 let mut buf = [0u8; 1024];
+-                let res = nix::unistd::read(fd.as_raw_fd(), &mut buf);
++                let res = nix::unistd::read(&fd, &mut buf);
+                 let amt = res.expect("read error!");
+                 self.length_read.fetch_add(amt as usize, Ordering::Relaxed);
+                 was_closed = amt == 0;
+Index: fish-4.0.2/src/topic_monitor.rs
+===================================================================
+--- fish-4.0.2.orig/src/topic_monitor.rs
++++ fish-4.0.2/src/topic_monitor.rs
+@@ -243,7 +243,7 @@ impl BinarySemaphore {
+                         let _ = FdReadableSet::is_fd_readable(fd, 
FdReadableSet::kNoTimeout);
+                     }
+                     let mut ignored: u8 = 0;
+-                    match unistd::read(fd, std::slice::from_mut(&mut 
ignored)) {
++                    match unistd::read(&pipes.read, std::slice::from_mut(&mut 
ignored)) {
+                         Ok(1) => break,
+                         Ok(_) => continue,
+                         // EAGAIN should only be possible if TSAN workarounds 
have been applied
+Index: fish-4.0.2/src/universal_notifier/notifyd.rs
+===================================================================
+--- fish-4.0.2.orig/src/universal_notifier/notifyd.rs
++++ fish-4.0.2/src/universal_notifier/notifyd.rs
+@@ -5,7 +5,7 @@ use crate::universal_notifier::Universal
+ use crate::wchar::prelude::*;
+ use libc::{c_char, c_int};
+ use std::ffi::CString;
+-use std::os::fd::RawFd;
++use std::os::fd::{BorrowedFd, RawFd};
+ 
+ extern "C" {
+     fn notify_register_file_descriptor(
+@@ -114,7 +114,8 @@ impl UniversalNotifier for NotifydNotifi
+         let mut read_something = false;
+         let mut buff: [u8; 64] = [0; 64];
+         loop {
+-            let res = nix::unistd::read(self.notify_fd, &mut buff);
++            let res =
++                nix::unistd::read(unsafe { 
BorrowedFd::borrow_raw(self.notify_fd) }, &mut buff);
+ 
+             if let Ok(amt_read) = res {
+                 read_something |= amt_read > 0;
diff -Nru fish-4.0.2/debian/patches/series fish-4.0.2/debian/patches/series
--- fish-4.0.2/debian/patches/series    2025-03-13 22:52:49.000000000 +0000
+++ fish-4.0.2/debian/patches/series    2025-09-25 11:25:33.000000000 +0000
@@ -2,3 +2,4 @@
 relax-deps.patch
 fix-libc-timespec.patch
 ignore-unused-signals.patch
+nix-0.31.patch

--- End Message ---
--- Begin Message ---
Source: fish
Source-Version: 4.0.2-1.1
Done: Nilesh Patra <[email protected]>

We believe that the bug you reported is fixed in the latest version of
fish, 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.
Nilesh Patra <[email protected]> (supplier of updated fish 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, 17 Oct 2025 17:52:00 +0530
Source: fish
Architecture: source
Version: 4.0.2-1.1
Distribution: unstable
Urgency: medium
Maintainer: Mo Zhou <[email protected]>
Changed-By: Nilesh Patra <[email protected]>
Closes: 1116313
Changes:
 fish (4.0.2-1.1) unstable; urgency=medium
 .
   * Non-maintainer upload.
 .
   [ Mo Zhou ]
   * correct the blhc regex
 .
   [ Peter Green ]
   * Add upstream patch for nix 0.30
   * Tighten debian build-dependency on nix to match Cargo dependency.
     Closes: #1116313
Checksums-Sha1:
 f29a2b0ee292a6c040b79e10cc0825a828fa4cef 1868 fish_4.0.2-1.1.dsc
 8b7420a6809f1a2210ec413b897c434a2aabc23c 61684 fish_4.0.2-1.1.debian.tar.xz
 94d8d3df3fa374af96ffa6f5f9c862bd1e61ce50 22222 fish_4.0.2-1.1_amd64.buildinfo
Checksums-Sha256:
 74450a32817bae8b39917c1d1dd6fb34c35d936b078ba2a1d5e3630d4d8622e7 1868 
fish_4.0.2-1.1.dsc
 feea69634137aa254f34589a8f6dadbe32cac96f80c162cc3c4c559b7bfbc054 61684 
fish_4.0.2-1.1.debian.tar.xz
 d4c137bb7cb491e6cd20801c47a8ba9fb78742092c66b3d60db1bd3da12c53ea 22222 
fish_4.0.2-1.1_amd64.buildinfo
Files:
 ff17f54ed0b533e7c8304cae4d9afce5 1868 shells optional fish_4.0.2-1.1.dsc
 c2222461eabb648e8390fbeb8b3e73d8 61684 shells optional 
fish_4.0.2-1.1.debian.tar.xz
 763bac488d15dc17c80888e626e707a6 22222 shells optional 
fish_4.0.2-1.1_amd64.buildinfo

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

iIgEARYKADAWIQSglbZu4JAkvuai8HIqJ5BL1yQ+2gUCaPI34hIcbmlsZXNoQGRl
Ymlhbi5vcmcACgkQKieQS9ckPtqJ6AEAvNssuhJnC5Lc/2POBdcNR8x40COuM8oe
J1v0DCRdAB0A/jS1kvNZCbe0eOfCL4rEyxMsWw3sqKtsnRMQO/YPfb4A
=F84q
-----END PGP SIGNATURE-----

Attachment: pgp_lNLWbMxwi.pgp
Description: PGP signature


--- End Message ---

Reply via email to