Received: by mail.netbsd.org (Postfix, from userid 605) id 2573B84E83; Sun, 19 Jun 2022 22:20:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 5F8D084E5A for ; Sun, 19 Jun 2022 22:20:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id Au3t5mNqnSoP for ; Sun, 19 Jun 2022 22:20:29 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id B0DC284D51 for ; Sun, 19 Jun 2022 22:20:29 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 4754DFB1A; Sun, 19 Jun 2022 22:22:22 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_165567734292720" MIME-Version: 1.0 Date: Sun, 19 Jun 2022 22:22:22 +0000 From: "Greg Troxel" Subject: CVS commit: pkgsrc/lang/tcl-expect To: pkgsrc-changes@NetBSD.org Reply-To: gdt@netbsd.org X-Mailer: log_accum Message-Id: <20220619222222.4754DFB1A@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_165567734292720 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: gdt Date: Sun Jun 19 22:22:22 UTC 2022 Modified Files: pkgsrc/lang/tcl-expect: Makefile distinfo pkgsrc/lang/tcl-expect/patches: patch-exp__chan.c Log Message: lang/tcl-expect: Limit deadlock workaround to affected platforms This caused a build failure on OpenServer. As the comment hinted would be necessary, limit the workaround to linux and sunos, which are known to have poll. (expect does not have a configure test for poll already.) To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 pkgsrc/lang/tcl-expect/Makefile cvs rdiff -u -r1.25 -r1.26 pkgsrc/lang/tcl-expect/distinfo cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/tcl-expect/patches/patch-exp__chan.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_165567734292720 Content-Disposition: inline Content-Length: 3522 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/lang/tcl-expect/Makefile diff -u pkgsrc/lang/tcl-expect/Makefile:1.35 pkgsrc/lang/tcl-expect/Makefile:1.36 --- pkgsrc/lang/tcl-expect/Makefile:1.35 Sun May 15 01:56:24 2022 +++ pkgsrc/lang/tcl-expect/Makefile Sun Jun 19 22:22:21 2022 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.35 2022/05/15 01:56:24 dholland Exp $ +# $NetBSD: Makefile,v 1.36 2022/06/19 22:22:21 gdt Exp $ .include "Makefile.common" PKGNAME= tcl-expect-${EXPECT_VERSION} -PKGREVISION= 5 +PKGREVISION= 6 CATEGORIES= lang MAINTAINER= pkgsrc-users@NetBSD.org Index: pkgsrc/lang/tcl-expect/distinfo diff -u pkgsrc/lang/tcl-expect/distinfo:1.25 pkgsrc/lang/tcl-expect/distinfo:1.26 --- pkgsrc/lang/tcl-expect/distinfo:1.25 Sun Jun 19 14:43:28 2022 +++ pkgsrc/lang/tcl-expect/distinfo Sun Jun 19 22:22:21 2022 @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.25 2022/06/19 14:43:28 gdt Exp $ +$NetBSD: distinfo,v 1.26 2022/06/19 22:22:21 gdt Exp $ BLAKE2s (expect5.45.tar.gz) = 38c440ed0868322b6ec7438decaa036a636e7d700191b754c1e4a7dc0fdd0c46 SHA512 (expect5.45.tar.gz) = be991c68241e607b3a689eae7e7966056dbfb577e857331d54a4911bd178c1816425217603b43918ad1b6d2e966271a0f01e79d7028a22e223562d59d10c8c51 Size (expect5.45.tar.gz) = 628808 bytes SHA1 (patch-Makefile.in) = 06858e50b7517901d0a7dc58f2149e7ef09b615b SHA1 (patch-configure) = 51ae6c4aaf6ff1ac510aec0d062310a91cb959c2 -SHA1 (patch-exp__chan.c) = 045d3442cfdc0976c8767a6cbdd9bbf2dcc8ed87 +SHA1 (patch-exp__chan.c) = 20fa6d6902f0a60c6f9767de60178ad8860a2229 Index: pkgsrc/lang/tcl-expect/patches/patch-exp__chan.c diff -u pkgsrc/lang/tcl-expect/patches/patch-exp__chan.c:1.2 pkgsrc/lang/tcl-expect/patches/patch-exp__chan.c:1.3 --- pkgsrc/lang/tcl-expect/patches/patch-exp__chan.c:1.2 Sun Jun 19 14:43:28 2022 +++ pkgsrc/lang/tcl-expect/patches/patch-exp__chan.c Sun Jun 19 22:22:22 2022 @@ -1,4 +1,4 @@ -$NetBSD: patch-exp__chan.c,v 1.2 2022/06/19 14:43:28 gdt Exp $ +$NetBSD: patch-exp__chan.c,v 1.3 2022/06/19 22:22:22 gdt Exp $ Add hack to work around deadlock situation that occurs on Solaris and Linux. See PR 34442. @@ -13,27 +13,32 @@ cause problems, we can wrap it in ifdefs --- exp_chan.c.orig 2010-07-01 00:53:49.000000000 +0000 +++ exp_chan.c -@@ -7,6 +7,7 @@ +@@ -7,6 +7,9 @@ */ #include ++#if defined(linux) || defined(sunos) +#include ++#endif #include #include #include -@@ -205,6 +206,8 @@ ExpInputProc(instanceData, buf, toRead, +@@ -205,6 +208,10 @@ ExpInputProc(instanceData, buf, toRead, ExpState *esPtr = (ExpState *) instanceData; int bytesRead; /* How many bytes were actually * read from the input device? */ ++#if defined(linux) || defined(sunos) + struct pollfd fds[1]; + int pollResult; ++#endif *errorCodePtr = 0; -@@ -215,6 +218,18 @@ ExpInputProc(instanceData, buf, toRead, +@@ -215,6 +222,20 @@ ExpInputProc(instanceData, buf, toRead, * nonblocking, the read will never block. */ ++#if defined(linux) || defined(sunos) + /* Update: there isn't always, which can lead to hangs. See PR 34442. */ + fds[0].fd = esPtr->fdin; + fds[0].events = POLLIN | POLLERR | POLLHUP | POLLNVAL; @@ -45,6 +50,7 @@ cause problems, we can wrap it in ifdefs + *errorCodePtr = EBADF; + return -1; + } ++#endif + bytesRead = read(esPtr->fdin, buf, (size_t) toRead); /*printf("ExpInputProc: read(%d,,) = %d\r\n",esPtr->fdin,bytesRead);*/ --_----------=_165567734292720--