From nobody@FreeBSD.org  Thu Mar 31 19:54:11 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1724A1065673
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 31 Mar 2011 19:54:11 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 03B7E8FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 31 Mar 2011 19:54:11 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p2VJsAua057502
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 31 Mar 2011 19:54:10 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p2VJsAxQ057501;
	Thu, 31 Mar 2011 19:54:10 GMT
	(envelope-from nobody)
Message-Id: <201103311954.p2VJsAxQ057501@red.freebsd.org>
Date: Thu, 31 Mar 2011 19:54:10 GMT
From: Oleg Ginzburg <olevole@olevole.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: devel/pear fix temp_dir location
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         156096
>Category:       ports
>Synopsis:       devel/pear fix temp_dir location
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    miwi
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 31 20:00:24 UTC 2011
>Closed-Date:    Sat Jul 02 16:19:17 UTC 2011
>Last-Modified:  Sat Jul 02 16:19:17 UTC 2011
>Originator:     Oleg Ginzburg
>Release:        9-CURRENT
>Organization:
>Environment:
>Description:
this line:
+       $temp_dir   = '%%TMPDIR%%';
in a FreeBSD patch for pear (/usr/ports/devel/pear/files/patch-go-pear)
does not make PHP to use TMPDIR. Instead, the variable $temp_dir during installation has the "/go-pear" values. This make problem during installation where system are have no write permissions in the / (such a classical freebsd jail with read-only base via nullfs). It is useful to change this behavior to /tmp by hard-code (Do not know a better option)

>How-To-Repeat:
Have read-only base (for example from http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/jails-application.html scenario) then try to install devel/pear. Installation will be interrupted with
"
******************************************************************************
FATAL ERROR! We cannot initialize the temp directory. Please be sure to give
full write access to this directory and the install directory.
"
message
>Fix:


Patch attached with submission follows:

diff -ruN pear.bak/files/patch-go-pear pear/files/patch-go-pear
--- pear.bak/files/patch-go-pear	2011-03-31 23:47:38.468442047 +0400
+++ pear/files/patch-go-pear	2011-03-31 23:47:46.066442910 +0400
@@ -156,7 +156,7 @@
          $test_dir  = '$php_dir/tests';
 -        $temp_dir   = '$prefix/temp';
 -
-+  	$temp_dir   = '%%TMPDIR%%';
++  	$temp_dir   = '/tmp';
 +/*
          // check if the user has installed PHP with PHP or GNU layout
          if (@is_dir("$prefix/lib/php/.registry")) {


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->miwi 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Mar 31 20:00:37 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=156096 
State-Changed-From-To: open->closed 
State-Changed-By: miwi 
State-Changed-When: Sat Jul 2 16:19:15 UTC 2011 
State-Changed-Why:  
should be fixed now 

http://www.freebsd.org/cgi/query-pr.cgi?pr=156096 
>Unformatted:
