From owner-freebsd-ports@FreeBSD.ORG Mon Apr 21 21:46:37 2014 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D262A0 for ; Mon, 21 Apr 2014 21:46:37 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 724541AC9 for ; Mon, 21 Apr 2014 21:46:37 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3LLkbjF095882 for ; Mon, 21 Apr 2014 21:46:37 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3LLkbHJ095880 for ports@freebsd.org; Mon, 21 Apr 2014 21:46:37 GMT (envelope-from bdrewery) Received: (qmail 66937 invoked from network); 21 Apr 2014 16:46:32 -0500 Received: from unknown (HELO roundcube.xk42.net) (10.10.5.5) by sweb.xzibition.com with SMTP; 21 Apr 2014 16:46:32 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 21 Apr 2014 16:46:32 -0500 From: Bryan Drewery To: Konstantin Belousov Subject: Re: bash usage of fdescfs [was: Re: amd64/188699: Dev tree] Organization: FreeBSD In-Reply-To: <20140421214046.GS4016@kib.kiev.ua> References: <201404171850.s3HIo1am064874@freefall.freebsd.org> <201404211431.12922.jhb@freebsd.org> <20140421195133.GO4016@kib.kiev.ua> <201404211723.04580.jhb@freebsd.org> <20140421214046.GS4016@kib.kiev.ua> Message-ID: <8e2622634c9f220edfeb990fbd668b9e@shatow.net> X-Sender: bdrewery@FreeBSD.org User-Agent: Roundcube Webmail/0.9.5 Cc: ports@freebsd.org, ehaupt@freebsd.org, John Baldwin X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Apr 2014 21:46:37 -0000 On 2014-04-21 16:40, Konstantin Belousov wrote: > On Mon, Apr 21, 2014 at 05:23:04PM -0400, John Baldwin wrote: >> On Monday, April 21, 2014 3:51:33 pm Konstantin Belousov wrote: >> > On Mon, Apr 21, 2014 at 02:31:12PM -0400, John Baldwin wrote: >> > > On Thursday, April 17, 2014 2:50:01 pm Konstantin Belousov wrote: >> > > > The following reply was made to PR amd64/188699; it has been noted by >> GNATS. >> > > > >> > > > From: Konstantin Belousov >> > > > To: John Allman >> > > > Cc: freebsd-gnats-submit@FreeBSD.org >> > > > Subject: Re: amd64/188699: Dev tree >> > > > Date: Thu, 17 Apr 2014 21:44:52 +0300 >> > > > >> > > > On Wed, Apr 16, 2014 at 05:32:45PM +0000, John Allman wrote: >> > > > > This is how to reproduce it: >> > > > > >> > > > > Fresh install of 10 on AMD 64 >> > > > > install bash `pkg install bash` >> > > > > Switch to bash `bash` >> > > > > push a here document into a loop: `while true ; do echo; done< <(echo >> "123")` >> > > > > receive an error: "-su: /dev/fd/62: No such file or directory" >> > > > > >> > > > > I'm sorry I haven't been able to research this any further. I found >> how while working on some important matters. As I mentioned the above >> works >> fine in all >> > > previous versions of FreeBSD up until 10. >> > > > > >How-To-Repeat: >> > > > > Fresh install >> > > > > pkg install bash >> > > > > bash >> > > > > while true; do echo foo done< <(echo "123") >> > > > > >> > > > > -su: /dev/fd/62: No such file or directory >> > > > >> > > > So do you have fdescfs mounted on /dev/fd on the machine where the >> > > > test fails ? It works for me on head, and if unmounted, I get the >> > > > same failure message as yours. I very much doubt that it has anything >> > > > to do with a system version. >> > > >> > > Question I have is why is bash deciding to use /dev/fd/ and require >> > > fdescfs? On older releases bash uses named pipes for this instead. >> > >> > The aclocal.m4 contains the test which verifies the presence and usability >> > of /dev/fd/n for n>=3 on the _build_ host. The result of the test >> > is used on the installation host afterward. >> > >> > Such kinds of bugs are endemic in our ports, but apparently upstreams >> > are guilty too. >> >> Yuck, yuck. Should we fix our default package builders to not mount >> fdescfs? > > IMO, using /dev/fd is more efficient since it avoids pipe inode > creation > for the 'document here' interpretation. The /dev/fd is also needed for > fexecve(2) to work (with the shebang scripts). Also, I believe that > some other high-profile ports require it (OpenJDK ?). > > That said, the solution is to have fdescfs mounted on /dev/fd. > This probably should be done by an installer. Yup, we mount it mostly for the java ports. -- Regards, Bryan Drewery