Package: release.debian.org
Severity: normal
Tags: stretch
User: release.debian....@packages.debian.org
Usertags: pu

Hi Release team.

I'd like to update the expect package in stretch. The current version
has a bug which has been discovered recently, it affects GCC regression
tests.

There wasn't a bugreport for this in Debian itself, so you can look at
a pretty long thread starting from [1]. The interesting part can be
found at [2].

In summary, sometimes Expect truncates input data (when EOF flag is
already set and there's some unprocessed data in an internal buffer).

And while there are workarounds, it'd be better to fix the bug in Expect
itself.

I'm attaching the diff between the package currently in stretch and the
proposed update.

[1] https://gcc.gnu.org/ml/gcc/2017-06/msg00000.html
[2] https://gcc.gnu.org/ml/gcc/2017-07/msg00081.html

-- System Information:
Debian Release: 9.0
  APT prefers proposed-updates
  APT policy: (500, 'proposed-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru expect-5.45/debian/changelog expect-5.45/debian/changelog
--- expect-5.45/debian/changelog        2015-10-23 11:28:54.000000000 +0300
+++ expect-5.45/debian/changelog        2017-07-16 12:50:18.000000000 +0300
@@ -1,3 +1,11 @@
+expect (5.45-7+deb9u1) stable; urgency=medium
+
+  * Added a patch by Georg-Johann Lay which now properly checks for EOF
+    and doesn't lose input when there are some characters in the input buffer
+    and EOF flag happens.
+
+ -- Sergei Golovan <sgolo...@debian.org>  Sun, 16 Jul 2017 12:50:18 +0300
+
 expect (5.45-7) unstable; urgency=medium
 
   * Applied a few fixes by upstream which were included in Expect 5.45.3
diff -Nru expect-5.45/debian/patches/26-eof-handling.patch 
expect-5.45/debian/patches/26-eof-handling.patch
--- expect-5.45/debian/patches/26-eof-handling.patch    2015-10-23 
11:28:54.000000000 +0300
+++ expect-5.45/debian/patches/26-eof-handling.patch    2017-07-16 
12:50:18.000000000 +0300
@@ -1,9 +1,10 @@
-Author: Upstream
-Description: Report and fix both by Nils Carlson.
+Author: Georg-Johann Lay
+Description: Enhancement of a bugfix by Nils Carlson.
  Replaced a cc==0 check with proper Tcl_Eof() check.
-Last-Modified: Fri, 23 Oct 2015 11:09:07 +0300
+Last-Modified: Fri, 14 Jul 2017 17:07:47 +0300
 Bug: http://sourceforge.net/p/expect/patches/18/
 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=799301
+See-Also: https://gcc.gnu.org/ml/gcc/2017-06/msg00000.html
 
 --- a/expect.c
 +++ b/expect.c
@@ -17,7 +18,7 @@
 -      /* but it should be looked at again anyway". */
 -      if (cc == 0) {
 +
-+      if (Tcl_Eof(esPtr->channel)) {
++      if (cc == 0 && Tcl_Eof(esPtr->channel)) {
            cc = EXP_EOF;
 -      } else if (cc > 0) {
 -          /* successfully read data */

Reply via email to