From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jan 24 15:10:16 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 805D816A406 for ; Wed, 24 Jan 2007 15:10:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 62E3813C448 for ; Wed, 24 Jan 2007 15:10:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l0OFAGW5076922 for ; Wed, 24 Jan 2007 15:10:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l0OFAGTI076920; Wed, 24 Jan 2007 15:10:16 GMT (envelope-from gnats) Resent-Date: Wed, 24 Jan 2007 15:10:16 GMT Resent-Message-Id: <200701241510.l0OFAGTI076920@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Lars Erik Gullerud Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 087C416A40B; Wed, 24 Jan 2007 15:06:14 +0000 (UTC) (envelope-from lerik@saturn.noc.catch.no) Received: from saturn.noc.catch.no (c51008B25.inet.catch.no [81.0.139.37]) by mx1.freebsd.org (Postfix) with ESMTP id 867A113C4D3; Wed, 24 Jan 2007 15:06:13 +0000 (UTC) (envelope-from lerik@saturn.noc.catch.no) Received: from saturn.noc.catch.no (localhost [127.0.0.1]) by saturn.noc.catch.no (8.13.8/8.13.8) with ESMTP id l0ODn4dY081725; Wed, 24 Jan 2007 14:49:04 +0100 (CET) (envelope-from lerik@saturn.noc.catch.no) Received: (from root@localhost) by saturn.noc.catch.no (8.13.8/8.13.8/Submit) id l0ODn4HV081724; Wed, 24 Jan 2007 14:49:04 +0100 (CET) (envelope-from lerik) Message-Id: <200701241349.l0ODn4HV081724@saturn.noc.catch.no> Date: Wed, 24 Jan 2007 14:49:04 +0100 (CET) From: Lars Erik Gullerud To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Shaun Amott Subject: ports/108311: [PATCH] Restore openpty() use in Expect X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Lars Erik Gullerud List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jan 2007 15:10:16 -0000 >Number: 108311 >Category: ports >Synopsis: [PATCH] Restore openpty() use in Expect >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jan 24 15:10:15 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Lars Erik Gullerud >Release: FreeBSD 6.2-STABLE i386 >Organization: >Environment: System: FreeBSD saturn.noc.catch.no 6.2-STABLE FreeBSD 6.2-STABLE #0: Wed Jan 17 13:46:31 CET 2007 root@saturn.noc.catch.no:/usr/obj/usr/src/sys/SATURN i386 >Description: - Remove CONFIGURE_ENV from Makefile, configure picks this up itself - Retire patch-pty_termios.c >How-To-Repeat: >Fix: Makefile revision 1.61 introduced "LDFLAGS -lutil" to CONFIGURE_ENV to solve a build error. This problem has since been fixed upstream in the configure script which now checks for -lutil. However, the CONFIGURE_ENV in our Makefile now causes the HAVE_OPENPTY #define in expect_cf.h to be dropped, leading to openpty() no longer being used, and PTY_TYPE to be termios (legacy). This is the root cause of the "only 64 pty's" problem that was worked around with the patch-pty_termios.c patch introduced at the PORTREVISION bump in Makefile 1.70. The patch only corrects the symptom (wrong master/slave pty names in pty_termios.c) not the root cause, as Expect should not be using termios at all but rather openpty() which supports any number of pty's available on the system and is POSIX supported. Removing the now unnecessary CONFIGURE_ENV allows the configure script to correctly pick up HAVE_OPENPTY and use openpty() instead. /leg --- diff.txt begins here --- diff -ruN /usr/ports/lang/expect/Makefile ./expect/Makefile --- /usr/ports/lang/expect/Makefile Fri Dec 29 03:29:19 2006 +++ ./expect/Makefile Wed Jan 24 14:30:34 2007 @@ -44,7 +44,6 @@ --with-tclconfig=${LOCALBASE}/lib/tcl8.4 \ --with-tclinclude=${LOCALBASE}/include/tcl8.4 \ ${TK_CONFIG_ARGS} -CONFIGURE_ENV= LDFLAGS="-lutil" .if !defined(NO_MAN_INSTALL) MAN1= autoexpect.1 cryptdir.1 decryptdir.1 dislocate.1 \ diff -ruN /usr/ports/lang/expect/files/patch-pty_termios.c ./expect/files/patch-pty_termios.c --- /usr/ports/lang/expect/files/patch-pty_termios.c Fri Oct 6 03:47:56 2006 +++ ./expect/files/patch-pty_termios.c Thu Jan 1 01:00:00 1970 @@ -1,20 +0,0 @@ ---- pty_termios.c.orig Fri May 7 17:46:03 2004 -+++ pty_termios.c Fri Oct 6 01:17:48 2006 -@@ -166,7 +166,7 @@ - static char *slave_bank; - static char *slave_num; - #else --static char banks[] = "pqrstuvwxyzPQRSTUVWXYZ"; -+static char banks[] = "pqrsPQRS"; /* FreeBSD scheme */ - static char master_name[] = "/dev/ptyXX"; - static char slave_name [] = "/dev/ttyXX"; - #endif /* HAVE_PTYM */ -@@ -489,7 +489,7 @@ - *tty_bank = *bank; - *tty_num = '0'; - if (stat(master_name, &stat_buf) < 0) break; -- for (hex = "0123456789abcdef";*hex;hex++) { -+ for (hex = "0123456789abcdefghijklmnopqrstuv";*hex;hex++) { - *tty_num = *hex; - strcpy(slave_name,master_name); - *tty_type = 't'; --- diff.txt ends here --- >Release-Note: >Audit-Trail: >Unformatted: