diff options
Diffstat (limited to 'system/expect')
-rw-r--r-- | system/expect/APKBUILD | 9 | ||||
-rw-r--r-- | system/expect/linux-5.10-tty.patch | 25 |
2 files changed, 31 insertions, 3 deletions
diff --git a/system/expect/APKBUILD b/system/expect/APKBUILD index b2b2a5475..2afe30858 100644 --- a/system/expect/APKBUILD +++ b/system/expect/APKBUILD @@ -2,14 +2,16 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=expect pkgver=5.45.4 -pkgrel=0 +pkgrel=1 pkgdesc="A tool for automating interactive applications" url="https://www.nist.gov/services-resources/software/expect" arch="all" license="Public-Domain" makedepends="tcl-dev" subpackages="$pkgname-dev $pkgname-doc" -source="https://downloads.sourceforge.net/project/expect/Expect/$pkgver/$pkgname$pkgver.tar.gz" +source="https://downloads.sourceforge.net/project/expect/Expect/$pkgver/$pkgname$pkgver.tar.gz + linux-5.10-tty.patch + " builddir="$srcdir"/$pkgname$pkgver prepare() { @@ -39,4 +41,5 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="a8dc25e8175f67e029e15cbcfca1705165c1c4cb2dd37eaaaebffb61e3ba132d9519cd73ca5add4c3358a2b0b7a91e878279e8d0b72143ff2c287fce07e4659a expect5.45.4.tar.gz" +sha512sums="a8dc25e8175f67e029e15cbcfca1705165c1c4cb2dd37eaaaebffb61e3ba132d9519cd73ca5add4c3358a2b0b7a91e878279e8d0b72143ff2c287fce07e4659a expect5.45.4.tar.gz +779ac78250ca89e289a717b29f47daf099a9aa1fcf8b37e90cfaacbb6c70de0648c856820a2c6e072d5f179587a870286441b61819703fd9bd2fb558472ec21d linux-5.10-tty.patch" diff --git a/system/expect/linux-5.10-tty.patch b/system/expect/linux-5.10-tty.patch new file mode 100644 index 000000000..807f519b2 --- /dev/null +++ b/system/expect/linux-5.10-tty.patch @@ -0,0 +1,25 @@ +From: Adam Sampson <ats@offog.org> +Subject: Re: dejagnu-1.6.3 test failure +Message-ID: <YXNTBvEAQP0jAgiq@cartman.at.offog.org> + +After a bit of debugging, the cause seems to be that expect uses +Tcl_GetsObj to read from stdin, and treats a -1 return value as an +error. However, Tcl_GetsObj can also return -1 to indicate that input +was blocked, i.e. it didn't manage to read a complete line -- expect +didn't handle this case. + +This patch seems to fix the problem: + +--- expect5.45.4/exp_main_sub.c 2018-02-04 10:43:58.000000000 +0000 ++++ expect5.45.4/exp_main_sub.c 2021-10-23 00:39:09.375404444 +0100 +@@ -326,7 +326,9 @@ + + if (code != EXP_EOF) { + inChannel = expStdinoutGet()->channel; +- code = Tcl_GetsObj(inChannel, commandPtr); ++ do { ++ code = Tcl_GetsObj(inChannel, commandPtr); ++ } while (code < 0 && Tcl_InputBlocked(inChannel)); + #ifdef SIMPLE_EVENT + if (code == -1 && errno == EINTR) { + if (Tcl_AsyncReady()) { |