From owner-freebsd-ports@FreeBSD.ORG Thu Jun 9 16:37:24 2005 Return-Path: X-Original-To: freebsd-ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2DC1816A41C; Thu, 9 Jun 2005 16:37:24 +0000 (GMT) (envelope-from gad@FreeBSD.org) Received: from smtp3.server.rpi.edu (smtp3.server.rpi.edu [128.113.2.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id D279F43D49; Thu, 9 Jun 2005 16:37:23 +0000 (GMT) (envelope-from gad@FreeBSD.org) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp3.server.rpi.edu (8.13.0/8.13.0) with ESMTP id j59GbKGF010029; Thu, 9 Jun 2005 12:37:21 -0400 Mime-Version: 1.0 Message-Id: In-Reply-To: <20050609160316.GC16677@over-yonder.net> References: <200506090027.j590R2t0070899@repoman.freebsd.org> <20050609003619.GA10578@xor.obsecurity.org> <20050609100815.GB16677@over-yonder.net> <20050609160316.GC16677@over-yonder.net> Date: Thu, 9 Jun 2005 12:37:20 -0400 To: "Matthew D. Fuller" From: Garance A Drosehn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-CanItPRO-Stream: default X-RPI-SA-Score: undef - spam-scanning disabled X-Scanned-By: CanIt (www . canit . ca) on 128.113.2.3 Cc: freebsd-arch@FreeBSD.org, freebsd-ports@FreeBSD.org, Kris Kennaway Subject: Re: Bug in #! processing - "pear broken on current" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2005 16:37:24 -0000 [moved over from the thread: Re: cvs commit: src/sys/kern imgact_shell.c on the cvs-src mailing list...] At 11:03 AM -0500 6/9/05, Matthew D. Fuller wrote: >On Thu, Jun 09, 2005 at 12:00:17PM -0400 I heard the voice of >Garance A Drosehn, and lo! it spake thus: > > Matthew wrote: > > ] See also the "pear broken on current" thread on -current > > ] and -ports around last weekend. Of course, I don't know > > ] if pear is wrong in what it's trying to do, but the change > > ] does appear to throw it off. > > > > I'm also willing to write some more changes to sh/options.c, if > > that is the best place to fix the problems that these ports are > > running into. > >Well, I dunno what part of it is giving troubles (and I haven't seen >it myself, since I'm still on RELENG_5 for the moment; just keeping my >eyes open). It doesn't seem like a terribly esoteric line though: > >#!/usr/local/bin/php -n -q -dsafe_mode=0 -doutput_buffering=1 It is very likely that the problem which is being seen with this script is due to the change in parsing I committed on May 28th. Before the change, php would have been started up with: [0] -> /usr/local/bin/php [1] -> -n [2] -> -q [3] -> -dsafe_mode=0 [4] -> -doutput_buffering=1 [5] -> /usr/local/bin/name-of-script [6...] -> parameters specified by user and now php is being started with: [0] -> /usr/local/bin/php [1] -> -n -q -dsafe_mode=0 -doutput_buffering=1 [2] -> /usr/local/bin/name-of-script [3...] -> parameters specified by user Assuming 'php' does not know what to do when all those options are glommed together in a single argument, then the above script would not work right on any other operating systems either. The change I made on the 28th gets FreeBSD to work more like other OS's when it comes to parsing that #!-line in scripts. Changes to /bin/sh would not fix this, because /bin/sh is not involved in this situation. But the change I'm thinking of for /usr/bin/env could be used to fix this, once I write up that change... -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA