Package: release.debian.org Severity: normal Tags: buster User: release.debian....@packages.debian.org Usertags: pu X-Debbugs-CC: shankerwangm...@gmail.com f...@packages.debian.org
Hi, I am working on solving https://bugs.debian.org/970777 , a bug that made package fish in Debian 10 unusable with sudo in terminal. The patch comes from upstream trunk. This will be a NMU but under permission from both the maintainer and uploader. The full debdiff is attached below as well as in the attachment. Regards, Boyuan Yang =========================== diff -Nru fish-3.0.2/debian/changelog fish-3.0.2/debian/changelog --- fish-3.0.2/debian/changelog 2019-03-26 09:16:52.000000000 -0400 +++ fish-3.0.2/debian/changelog 2020-10-04 19:37:04.000000000 -0400 @@ -1,3 +1,15 @@ +fish (3.0.2-2+deb10u1) buster; urgency=medium + + * Non-maintainer upload. + + With permission from package maintainer and uploader. + + [ Miao Wang ] + * debian/patches: Add patch to ensure tty options are restored on exit. + This fixes upstream issue 5663. + (Closes: #970777) + + -- Boyuan Yang <by...@debian.org> Sun, 04 Oct 2020 19:37:04 -0400 + fish (3.0.2-2) unstable; urgency=medium * Discard stderr message from systemd 241 when doing completion. diff -Nru fish- 3.0.2/debian/patches/2418e1e50b636a3457b58a77feb0a2b14cbf82f9.patch fish- 3.0.2/debian/patches/2418e1e50b636a3457b58a77feb0a2b14cbf82f9.patch --- fish- 3.0.2/debian/patches/2418e1e50b636a3457b58a77feb0a2b14cbf82f9.patch 1969-12-31 19:00:00.000000000 -0500 +++ fish- 3.0.2/debian/patches/2418e1e50b636a3457b58a77feb0a2b14cbf82f9.patch 2020-10-04 19:37:04.000000000 -0400 @@ -0,0 +1,31 @@ +From: Fabian Homborg <fhomb...@gmail.com> +Date: Mon, 25 Feb 2019 20:23:34 +0100 +Subject: [PATCH] Don't mix up pgroup and pid + +This is another case where we used pid when we meant pgroup. + +Since 55b3c45f95ba09efa4b9eaad8ec49256a7435823, the assumption that +both are the same no longer holds in all cases, so this check was wrong. + +Might fix #5663. + +Bug-Debian: https://bugs.debian.org/970777 +Forwarded: https://github.com/fish-shell/fish-shell/issues/5663 +Applied-Upstream: https://github.com/fish-shell/fish-shell/commit/2418e1e50b636a3457b58a77feb0a2b14cbf82f9 +--- + src/reader.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/reader.cpp b/src/reader.cpp +index a370e2719f..9821482d7f 100644 +--- a/src/reader.cpp ++++ b/src/reader.cpp +@@ -966,7 +966,7 @@ void reader_init() { + /// Restore the term mode if we own the terminal. It's important we do this before + /// restore_foreground_process_group, otherwise we won't think we own the terminal. + void restore_term_mode() { +- if (getpid() != tcgetpgrp(STDIN_FILENO)) return; ++ if (getpgrp() != tcgetpgrp(STDIN_FILENO)) return; + + if (tcsetattr(STDIN_FILENO, TCSANOW, &terminal_mode_on_startup) == -1 && errno == EIO) { + redirect_tty_output(); diff -Nru fish-3.0.2/debian/patches/series fish- 3.0.2/debian/patches/series --- fish-3.0.2/debian/patches/series 2019-03-26 09:16:52.000000000 -0400 +++ fish-3.0.2/debian/patches/series 2020-10-04 19:37:04.000000000 -0400 @@ -2,3 +2,4 @@ isolate-home-tests use-curdir-not-pwd c6ec4235136e82c709e8d7b455f7c463f9714b48.diff +2418e1e50b636a3457b58a77feb0a2b14cbf82f9.patch ================================
diff -Nru fish-3.0.2/debian/changelog fish-3.0.2/debian/changelog --- fish-3.0.2/debian/changelog 2019-03-26 09:16:52.000000000 -0400 +++ fish-3.0.2/debian/changelog 2020-10-04 19:37:04.000000000 -0400 @@ -1,3 +1,15 @@ +fish (3.0.2-2+deb10u1) buster; urgency=medium + + * Non-maintainer upload. + + With permission from package maintainer and uploader. + + [ Miao Wang ] + * debian/patches: Add patch to ensure tty options are restored on exit. + This fixes upstream issue 5663. + (Closes: #970777) + + -- Boyuan Yang <by...@debian.org> Sun, 04 Oct 2020 19:37:04 -0400 + fish (3.0.2-2) unstable; urgency=medium * Discard stderr message from systemd 241 when doing completion. diff -Nru fish-3.0.2/debian/patches/2418e1e50b636a3457b58a77feb0a2b14cbf82f9.patch fish-3.0.2/debian/patches/2418e1e50b636a3457b58a77feb0a2b14cbf82f9.patch --- fish-3.0.2/debian/patches/2418e1e50b636a3457b58a77feb0a2b14cbf82f9.patch 1969-12-31 19:00:00.000000000 -0500 +++ fish-3.0.2/debian/patches/2418e1e50b636a3457b58a77feb0a2b14cbf82f9.patch 2020-10-04 19:37:04.000000000 -0400 @@ -0,0 +1,31 @@ +From: Fabian Homborg <fhomb...@gmail.com> +Date: Mon, 25 Feb 2019 20:23:34 +0100 +Subject: [PATCH] Don't mix up pgroup and pid + +This is another case where we used pid when we meant pgroup. + +Since 55b3c45f95ba09efa4b9eaad8ec49256a7435823, the assumption that +both are the same no longer holds in all cases, so this check was wrong. + +Might fix #5663. + +Bug-Debian: https://bugs.debian.org/970777 +Forwarded: https://github.com/fish-shell/fish-shell/issues/5663 +Applied-Upstream: https://github.com/fish-shell/fish-shell/commit/2418e1e50b636a3457b58a77feb0a2b14cbf82f9 +--- + src/reader.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/reader.cpp b/src/reader.cpp +index a370e2719f..9821482d7f 100644 +--- a/src/reader.cpp ++++ b/src/reader.cpp +@@ -966,7 +966,7 @@ void reader_init() { + /// Restore the term mode if we own the terminal. It's important we do this before + /// restore_foreground_process_group, otherwise we won't think we own the terminal. + void restore_term_mode() { +- if (getpid() != tcgetpgrp(STDIN_FILENO)) return; ++ if (getpgrp() != tcgetpgrp(STDIN_FILENO)) return; + + if (tcsetattr(STDIN_FILENO, TCSANOW, &terminal_mode_on_startup) == -1 && errno == EIO) { + redirect_tty_output(); diff -Nru fish-3.0.2/debian/patches/series fish-3.0.2/debian/patches/series --- fish-3.0.2/debian/patches/series 2019-03-26 09:16:52.000000000 -0400 +++ fish-3.0.2/debian/patches/series 2020-10-04 19:37:04.000000000 -0400 @@ -2,3 +2,4 @@ isolate-home-tests use-curdir-not-pwd c6ec4235136e82c709e8d7b455f7c463f9714b48.diff +2418e1e50b636a3457b58a77feb0a2b14cbf82f9.patch
signature.asc
Description: This is a digitally signed message part