public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/expect] rawhide: Use binary mode in unbuffer (#2489967)
@ 2026-06-17 17:12 Florian Weimer
  0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2026-06-17 17:12 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/expect
Branch : rawhide
Commit : bd83e4c4233fe582b7d2edf3a4e678727cafa85e
Author : Florian Weimer <fweimer@redhat.com>
Date   : 2026-06-17T18:44:38+02:00
Stats  : +43/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/expect/c/bd83e4c4233fe582b7d2edf3a4e678727cafa85e?branch=rawhide

Log:
Use binary mode in unbuffer (#2489967)

---
diff --git a/expect-5.45.4-tcl9-unbuffer.patch b/expect-5.45.4-tcl9-unbuffer.patch
new file mode 100644
index 0000000..c2a3821
--- /dev/null
+++ b/expect-5.45.4-tcl9-unbuffer.patch
@@ -0,0 +1,37 @@
+With this change, invalid input bytes that are not UTF-8
+are no longer rejected by unbuffer and parsed through verbatim.
+
+This avoids an error:
+
+  i_read(spawn_id fd=6): invalid or incomplete multibyte or wide character
+
+Submitted upstream: <https://sourceforge.net/p/expect/patches/34/>
+
+diff --git a/example/unbuffer b/example/unbuffer
+index ad5db7bd85086586..c12dcaf494bd9588 100755
+--- a/example/unbuffer
++++ b/example/unbuffer
+@@ -5,6 +5,7 @@ exec tclsh "$0" ${1+"$@"}
+ 
+ package require Expect
+ 
++fconfigure $user_spawn_id -translation binary
+ 
+ # -*- tcl -*-
+ # Description: unbuffer stdout of a program
+@@ -14,6 +15,7 @@ if {[string compare [lindex $argv 0] "-p"] == 0} {
+     # pipeline
+     set stty_init "-echo"
+     eval [list spawn -noecho] [lrange $argv 1 end]
++    fconfigure $spawn_id -translation binary
+     close_on_eof -i $user_spawn_id 0
+     interact {
+ 	eof {
+@@ -26,6 +28,7 @@ if {[string compare [lindex $argv 0] "-p"] == 0} {
+     set stty_init "-opost"
+     set timeout -1
+     eval [list spawn -noecho] $argv
++    fconfigure $spawn_id -translation binary
+     expect
+     exit [lindex [wait] 3]
+ }

diff --git a/expect.spec b/expect.spec
index 941fef3..6b15194 100644
--- a/expect.spec
+++ b/expect.spec
@@ -5,7 +5,7 @@
 Summary: A program-script interaction and testing utility
 Name: expect
 Version: %{majorver}
-Release: 31%{?dist}
+Release: 32%{?dist}
 License: LicenseRef-Fedora-Public-Domain
 URL: https://core.tcl.tk/expect/index
 Source: http://downloads.sourceforge.net/%{name}/%{name}%{version}.tar.gz
@@ -67,6 +67,7 @@ Patch103: expect-5.45-passmass-su-full-path.patch
 Patch104: expect-5.45-mkpasswd-man.patch
 # Patch105: fix mkpasswd to read /dev/urandom in binary mode for tcl9
 Patch105: expect-5.45.4-tcl9-mkpasswd.patch
+Patch106: expect-5.45.4-tcl9-unbuffer.patch
 
 %description
 Expect is a tcl application for automating and testing
@@ -134,6 +135,7 @@ of expectk.
 %patch -P103 -p1 -b .passmass-su-full-path
 %patch -P104 -p1 -b .mkpasswd-man
 %patch -P105 -p1 -b .tcl9-mkpasswd
+%patch -P 106 -p1
 # -pkgpath.patch touch configure.in
 aclocal
 autoconf
@@ -217,6 +219,9 @@ chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libexpect%{version}.so
 %{_mandir}/man1/tknewsbiff.1*
 
 %changelog
+* Wed Jun 17 2026 Florian Weimer  <fweimer@redhat.com> - 5.45.4-32
+- Use binary mode in unbuffer (#2489967)
+
 * Tue Feb 17 2026 Vitezslav Crhonek <vcrhonek@redhat.com> - 5.45.4-31
 - Port to tcl9
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-17 17:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-17 17:12 [rpms/expect] rawhide: Use binary mode in unbuffer (#2489967) Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox