From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Sep 27 13:20:07 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A54116A417 for ; Thu, 27 Sep 2007 13:20:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3B43813C458 for ; Thu, 27 Sep 2007 13:20:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l8RDK1xx088702 for ; Thu, 27 Sep 2007 13:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l8RDK1Ar088701; Thu, 27 Sep 2007 13:20:01 GMT (envelope-from gnats) Resent-Date: Thu, 27 Sep 2007 13:20:01 GMT Resent-Message-Id: <200709271320.l8RDK1Ar088701@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, Martin Kammerhofer Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB19D16A417 for ; Thu, 27 Sep 2007 13:13:58 +0000 (UTC) (envelope-from dada@pluto.tugraz.at) Received: from mailrelay.tugraz.at (mailrelay.tu-graz.ac.at [129.27.2.202]) by mx1.freebsd.org (Postfix) with ESMTP id 5CFC813C457 for ; Thu, 27 Sep 2007 13:13:57 +0000 (UTC) (envelope-from dada@pluto.tugraz.at) Received: from pluto.tugraz.at (pluto.tu-graz.ac.at [129.27.3.200]) by mailrelay2.tugraz.at (8.14.1/8.14.1) with ESMTP id l8RDDriU029232 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 27 Sep 2007 15:13:53 +0200 (CEST) Received: from pluto.tugraz.at (localhost.localdomain [127.0.0.1]) by pluto.tugraz.at (8.13.8/8.13.8) with ESMTP id l8RDDkdj015106 for ; Thu, 27 Sep 2007 15:13:46 +0200 Received: (from dada@localhost) by pluto.tugraz.at (8.13.8/8.13.8/Submit) id l8RDDkwt015105 for freebsd-gnats-submit@freebsd.org; Thu, 27 Sep 2007 15:13:46 +0200 Message-Id: <200709271313.l8RDDkwt015105@pluto.tugraz.at> Date: Thu, 27 Sep 2007 15:13:46 +0200 From: Martin Kammerhofer To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: ports/116690: Update port: devel/rlwarp fix broken pty search on devfs X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Sep 2007 13:20:07 -0000 >Number: 116690 >Category: ports >Synopsis: Update port: devel/rlwarp fix broken pty search on devfs >Confidential: no >Severity: non-critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Sep 27 13:20:01 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Martin Kammerhofer >Release: FreeBSD 6.2-STABLE i386 >Organization: >Environment: System: FreeBSD Martin.liebt.Susi 6.2-STABLE FreeBSD 6.2-STABLE #0: Sun Aug 19 14:22:22 CEST 2007 toor@Martin.liebt.Susi:/usr/obj/usr/src/sys/P2B-S i386 >Description: The configure script of the devel/rlwrap port searches for the names of pseudo terminals. Found /dev/pty?? files are then hard-coded into the $PREFIX/bin/rlwrap executable. This does not work well with FreeBSD where /dev/* nodes are dynamic. The resulting behaviour is highly undesirable: Only pseudo terminals in use at configure time are considered. If none of those is free at run time then pseudo tty allocation fails with a fatal error! The fix is of course to let the binary know about valid pseudo tty names on FreeBSD, i.e. /dev/[pt]ty[p-sP-S][0-9a-v]. While at it also s/PREFIX/LOCALBASE/ where appropriate. >How-To-Repeat: >Fix: diff -ruN /usr/ports/devel/rlwrap/Makefile devel/rlwrap/Makefile --- /usr/ports/devel/rlwrap/Makefile 2007-07-23 11:35:45.000000000 +0200 +++ devel/rlwrap/Makefile 2007-09-27 14:23:12.000000000 +0200 @@ -8,6 +8,7 @@ PORTNAME= rlwrap PORTVERSION= 0.28 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://utopia.knoware.nl/~hlub/uck/rlwrap/ @@ -26,11 +27,11 @@ .if ${OSVERSION} < 500018 # This port requires readline 4.2 or newer, which is only available # in the base system in FreeBSD 5.x. -BUILD_DEPENDS+= ${PREFIX}/lib/libreadline.so.5:${PORTSDIR}/devel/readline +BUILD_DEPENDS+= ${LOCALBASE}/lib/libreadline.so.5:${PORTSDIR}/devel/readline RUN_DEPENDS+= ${BUILD_DEPENDS} # Make sure the dynamic linker does not pick up # the older libreadline library from the base system. -LDFLAGS+= -rpath ${PREFIX}/lib +LDFLAGS+= -rpath ${LOCALBASE}/lib .endif .include diff -ruN /usr/ports/devel/rlwrap/files/patch-src::ptytty.c devel/rlwrap/files/patch-src::ptytty.c --- /usr/ports/devel/rlwrap/files/patch-src::ptytty.c 2005-11-01 11:03:23.000000000 +0100 +++ devel/rlwrap/files/patch-src::ptytty.c 2007-09-27 14:23:12.000000000 +0200 @@ -1,5 +1,5 @@ ---- src/ptytty.c.orig Mon Oct 31 16:01:11 2005 -+++ src/ptytty.c Mon Oct 31 16:01:57 2005 +--- src/ptytty.c.orig 2005-10-17 09:36:46.000000000 +0200 ++++ src/ptytty.c 2007-09-27 14:12:26.000000000 +0200 @@ -41,7 +41,7 @@ #ifdef HAVE_SYS_IOCTL_H # include @@ -9,3 +9,28 @@ # include /* for I_PUSH */ #endif +@@ -159,11 +159,19 @@ + char pty_name[] = "/dev/pty??"; + char tty_name[] = "/dev/tty??"; + +-# ifndef PTYCHAR1 +-# define PTYCHAR1 "pqrstuvwxyz" +-# endif +-# ifndef PTYCHAR2 +-# define PTYCHAR2 "0123456789abcdef" ++# ifdef __FreeBSD__ ++/* Auto-detected pty names do not work well with devfs! */ ++# undef PTYCHAR1 ++# define PTYCHAR1 "pqrsPQRS" ++# undef PTYCHAR2 ++# define PTYCHAR2 "0123456789abcdefghijklmnopqrstuv" ++# else ++# ifndef PTYCHAR1 ++# define PTYCHAR1 "pqrstuvwxyz" ++# endif ++# ifndef PTYCHAR2 ++# define PTYCHAR2 "0123456789abcdef" ++# endif + # endif + for (c1 = PTYCHAR1; *c1; c1++) { + pty_name[(sizeof(pty_name) - 3)] = >Release-Note: >Audit-Trail: >Unformatted: