From owner-freebsd-ports-bugs Tue Feb 18 11: 0:11 2003 Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E32B837B401 for ; Tue, 18 Feb 2003 11:00:07 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C3FD43F93 for ; Tue, 18 Feb 2003 11:00:05 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h1IJ05NS043222 for ; Tue, 18 Feb 2003 11:00:05 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h1IJ05gH043221; Tue, 18 Feb 2003 11:00:05 -0800 (PST) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D00F437B401; Tue, 18 Feb 2003 10:57:25 -0800 (PST) Received: from mail.inka.de (quechua.inka.de [193.197.184.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 976A843FAF; Tue, 18 Feb 2003 10:57:24 -0800 (PST) (envelope-from naddy@mips.inka.de) Received: from kemoauc.mips.inka.de (uucp@) by mail.inka.de with gbsmtp id 18lCvj-0002Vd-09; Tue, 18 Feb 2003 19:57:23 +0100 Received: from kemoauc.mips.inka.de (localhost [127.0.0.1]) by kemoauc.mips.inka.de (8.12.6/8.12.6) with ESMTP id h1IItKt0008380; Tue, 18 Feb 2003 19:55:20 +0100 (CET) (envelope-from naddy@localhost.mips.inka.de) Received: (from naddy@localhost) by kemoauc.mips.inka.de (8.12.6/8.12.6/Submit) id h1IItJXw008372; Tue, 18 Feb 2003 19:55:19 +0100 (CET) Message-Id: <200302181855.h1IItJXw008372@kemoauc.mips.inka.de> Date: Tue, 18 Feb 2003 19:55:19 +0100 (CET) From: Christian Weisgerber Reply-To: Christian Weisgerber To: FreeBSD-gnats-submit@FreeBSD.org Cc: obrien@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/48434: shells/bash2: process substitution broken on 5.0 Sender: owner-freebsd-ports-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 48434 >Category: ports >Synopsis: shells/bash2: process substitution broken on 5.0 >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: Tue Feb 18 11:00:05 PST 2003 >Closed-Date: >Last-Modified: >Originator: Christian Weisgerber >Release: FreeBSD 5.0-CURRENT alpha >Organization: >Environment: System: FreeBSD kemoauc.mips.inka.de 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Wed Feb 5 13:01:08 CET 2003 naddy@kemoauc.mips.inka.de:/usr/obj/usr/src/sys/KEMOAUC alpha >Description: bash's process substitution feature is implemented by way of either /dev/fd/* or named pipes in /tmp. The configure script detects the existence of /dev/fd/ and chooses that scheme. However, 5.0's devfs only provides for /dev/fd/[0-2]. bash tries to use other descriptors and fails: bash$ cat <(cat /COPYRIGHT) cat: /dev/fd/63: No such file or directory The patch below checks whether higher descriptors are available before enabling the use of /dev/fd for process substitution. If the check fails, named pipes will be used instead. Note that mounting fdescfs on /dev/fd will enable higher descriptors. >How-To-Repeat: >Fix: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/shells/bash2/Makefile,v retrieving revision 1.60 diff -u -r1.60 Makefile --- Makefile 29 Sep 2002 01:44:12 -0000 1.60 +++ Makefile 18 Feb 2003 18:34:33 -0000 @@ -8,7 +8,7 @@ PORTNAME= bash PORTVERSION= 2.05b.004 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= shells MASTER_SITES= ${MASTER_SITE_GNU} \ ftp://ftp.cwru.edu/pub/bash/ Index: files/patch-ac =================================================================== RCS file: /home/ncvs/ports/shells/bash2/files/patch-ac,v retrieving revision 1.5 diff -u -r1.5 patch-ac --- files/patch-ac 4 Aug 2002 06:57:11 -0000 1.5 +++ files/patch-ac 18 Feb 2003 18:34:33 -0000 @@ -1,8 +1,8 @@ $FreeBSD: ports/shells/bash2/files/patch-ac,v 1.5 2002/08/04 06:57:11 obrien Exp $ ---- configure.orig Tue Jul 16 22:31:47 2002 -+++ configure Wed Jul 24 23:54:26 2002 +--- configure.orig Tue Jul 16 15:31:47 2002 ++++ configure Tue Feb 18 14:14:28 2003 @@ -1132,7 +1132,7 @@ mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir @@ -12,3 +12,19 @@ *-openbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment *-aix*) opt_bash_malloc=no ;; # AIX machines *-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep +@@ -15218,7 +15218,14 @@ + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -d /dev/fd && test -r /dev/fd/0; then +- bash_cv_dev_fd=standard ++ # FreeBSD's devfs only provides /dev/fd/[0-2] ++ exec 3<&0 ++ if test -r /dev/fd/3; then ++ bash_cv_dev_fd=standard ++ else ++ bash_cv_dev_fd=absent ++ fi ++ exec 3<&- + elif test -d /proc/self/fd && test -r /proc/self/fd/0; then + bash_cv_dev_fd=whacky + else >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports-bugs" in the body of the message