From bryan@shatow.net  Wed May 16 22:09:27 2012
Return-Path: <bryan@shatow.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0D734106564A
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 May 2012 22:09:27 +0000 (UTC)
	(envelope-from bryan@shatow.net)
Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92])
	by mx1.freebsd.org (Postfix) with ESMTP id ADB538FC08
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 16 May 2012 22:09:26 +0000 (UTC)
Received: (qmail 99478 invoked from network); 16 May 2012 17:09:23 -0500
Received: from unknown (HELO test8.xzibition.com) (10.10.0.34)
  by sweb.xzibition.com with SMTP; 16 May 2012 17:09:23 -0500
Received: by test8.xzibition.com (sSMTP sendmail emulation); Wed, 16 May 2012 17:08:58 -0500
Message-Id: <20120516220927.0D734106564A@hub.freebsd.org>
Date: Wed, 16 May 2012 17:08:58 -0500
From: "Bryan Drewery" <bryan@shatow.net>
Reply-To: Bryan Drewery <bryan@shatow.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: ale@freebsd.org
Subject: [PATCH] lang/php5: Fix wrong PHP_EXT_DIR / ZEND_MODULE_API_NO
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         167984
>Category:       ports
>Synopsis:       [PATCH] lang/php5: Fix wrong PHP_EXT_DIR / ZEND_MODULE_API_NO
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    ale
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 16 22:10:01 UTC 2012
>Closed-Date:    Thu May 24 21:02:01 UTC 2012
>Last-Modified:  Thu May 24 21:10:03 UTC 2012
>Originator:     Bryan Drewery
>Release:        FreeBSD 8.3-RELEASE i386
>Organization:
>Environment:

	
>Description:
	The updated lang/php5 port with 5.4.3 is actually installing extensions to the 20100525 directory, but the bsd.php.mk is using 20100412.

	For example, when building www/phpmyadm, it checks for converters/php5-mbstring existing with 20100412
		===>    Verifying install for /usr/local/lib/php/20100412/mbstring.so in /usr/ports/converters/php5-mbstring

	However, the actual extension was installing to:
		/usr/local/lib/php/20100525/mbstring.so
>How-To-Repeat:
	
>Fix:

	Took 20100525 from Zend/zend_modules.h
	./work/php-5.4.3/Zend/zend_modules.h:#define ZEND_MODULE_API_NO 20100525

--- patch-php-ext-api.txt begins here ---
diff --git bsd.php.mk bsd.php.mk
index 0150230..8c57de7 100644
--- bsd.php.mk
+++ bsd.php.mk
@@ -53,7 +53,7 @@ PHP_EXT_DIR=	20060613
 PHP_EXT_DIR=	20090626
 PHP_EXT_INC=	pcre spl
 .else
-PHP_EXT_DIR=	20100412
+PHP_EXT_DIR=	20100525
 PHP_EXT_INC=	pcre spl
 .endif
 
--- patch-php-ext-api.txt ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ale 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed May 16 22:10:16 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=167984 
State-Changed-From-To: open->feedback 
State-Changed-By: ale 
State-Changed-When: Thu May 17 05:49:42 UTC 2012 
State-Changed-Why:  
PHP_EXT_DIR is taken from PHP_API_VERSION, not ZEND_MODULE_API_NO. 
Probably you have a screwed up installation, remove all PHP ports, 
delete /usr/local/include/php and reinstall again. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=167984 

From: Bryan Drewery <bryan@shatow.net>
To: bug-followup@FreeBSD.org, ale@FreeBSD.org
Cc:  
Subject: Re: ports/167984: [PATCH] lang/php5: Fix wrong PHP_EXT_DIR / ZEND_MODULE_API_NO
Date: Thu, 17 May 2012 14:11:03 -0500

 This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
 --------------enigF726B8CF90EFDD1EABC81571
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 Yes I think you are correct. I've been unable to recreate this myself
 after more testing.
 
 I wiped everything and rebuilt and it all seems fine.
 
 Also, I see that if /usr/local/etc/php.conf exists it is using
 php-config to find the directory, so my patch doesn't help anyway.
 
 You can close this.
 
 Thanks,
 Bryan Drewery
 
 
 --------------enigF726B8CF90EFDD1EABC81571
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: OpenPGP digital signature
 Content-Disposition: attachment; filename="signature.asc"
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iQIcBAEBAgAGBQJPtU1MAAoJEG54KsA8mwz5COgQAIjB9U9/LtqzTyjCAZV9xYPa
 dn1dMvci934I+4NFeC1J8pIa5vdeYDOtRyWIGQelRV5u11kcVyUgOhaySSQy6OGZ
 U0VYG9pwjYeEidXc5gZY4Wi7BokaiuKxqL8/L0Wl0kiqHSdpoKUmS2jT9wesHvJ0
 K/vls2+Ns+DEj3T6uyM6Pa77kzmz49J1k/zK8YPzkUWUXa8fBG2U0JnAladkyD6G
 29wZX7eqEWV4fsd0GDTdJZrYcAgshgKQe56H3tu1MLqCTNIJJO0ETP60vmTQ3tup
 E+N+JlaJzoTsU5M7wy1QxbI+bLBxI4QanY6L7TcG+RgX72gboAMkKsA0pAZLLTOE
 NxZGg7JFkoZSmsgc2SUyplGz7L2GmnQYrrgVUUsNEqmma9GLjC/9+0WFveQnwiJA
 sXY4JK75lFJV/q6AmLh5kEqmlmmYIb+swiO2O7A2LTDvozcZyDldf+rtbRJncQJc
 VZH1nPN0G50E+EAVml5dikwmH4LxiCuMRFE4pCzD67gV9vmwQnLttNVvssAH6WPb
 NkcxOMTsDN2QBJjboJhbXKHCg1kgq2ynBdFm+lvWc+EMB3BtfP4WMWrs0rJBf5Kv
 M6q/luzO2Z/NDryId+mtSIPnQPwqhA3RWL+oFuzeY3kJngBPSlTrt0ac1j7jy2iX
 Ijt7D0TgeAGkoUH8W73N
 =MsGC
 -----END PGP SIGNATURE-----
 
 --------------enigF726B8CF90EFDD1EABC81571--
State-Changed-From-To: feedback->closed 
State-Changed-By: ale 
State-Changed-When: Thu May 17 20:45:35 UTC 2012 
State-Changed-Why:  
Closed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=167984 

From: Bryan Drewery <bryan@shatow.net>
To: Alex Dupre <ale@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/167984: [PATCH] lang/php5: Fix wrong PHP_EXT_DIR / ZEND_MODULE_API_NO
Date: Wed, 23 May 2012 17:38:19 -0500

 This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
 --------------enig14404217B95E04C41A4A56CA
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 I actually think this is still needed and have found an easy way to
 reproduce the problem.
 
 Normally, if php is already installed (checking for
 /usr/local/etc/php.conf), it will run `php-config --extension-dir` to
 find the directory. If it is not installed, it falls back on PHP_EXT_DIR
 in bsd.php.mk.
 
 On every installation I've done with php54 the extension dir is coming
 out as the Zend API of 20100525 and *not* 20100412. This creates an
 invalid RUN_DEPENDS for ports if PHP is not installed (yet).
 
 You can easily see the problem if you create a new jail, mount ports,
 then try to install databases/phpmyadmin without having PHP already
 installed.
 
     9# make -C /usr/ports/databases/phpmyadmin -VPHP_EXT_DIR
     20100412
     9# make -C /usr/ports/databases/phpmyadmin -VRUN_DEPENDS
     /usr/local/include/php/main/php.h:/usr/ports/lang/php5
 /usr/local/lib/php/20100412/ctype.so:/usr/ports/textproc/php5-ctype
 /usr/local/lib/php/20100412/session.so:/usr/ports/www/php5-session
 /usr/local/lib/php/20100412/filter.so:/usr/ports/security/php5-filter
 /usr/local/lib/php/20100412/mbstring.so:/usr/ports/converters/php5-mbstri=
 ng
 /usr/local/lib/php/20100412/json.so:/usr/ports/devel/php5-json
 /usr/local/lib/php/20100412/bz2.so:/usr/ports/archivers/php5-bz2
 /usr/local/lib/php/20100412/gd.so:/usr/ports/graphics/php5-gd
 /usr/local/lib/php/20100412/openssl.so:/usr/ports/security/php5-openssl
 /usr/local/lib/php/20100412/pdf.so:/usr/ports/print/pecl-pdflib
 /usr/local/lib/php/20100412/zlib.so:/usr/ports/archivers/php5-zlib
 /usr/local/lib/php/20100412/mcrypt.so:/usr/ports/security/php5-mcrypt
 /usr/local/lib/php/20100412/mbstring.so:/usr/ports/converters/php5-mbstri=
 ng
 /usr/local/lib/php/20100412/zip.so:/usr/ports/archivers/php5-zip
 /usr/local/lib/php/20100412/apc.so:/usr/ports/www/pecl-APC
 /usr/local/lib/php/20100412/mysqli.so:/usr/ports/databases/php5-mysqli
     9# make -C /usr/ports/lang/php5 install
     <snip>
     9# make -C /usr/ports/databases/phpmyadmin -VPHP_EXT_DIR
     20100525
     9# php-config --extension-dir
     /usr/local/lib/php/20100525
     9# make -C /usr/ports/databases/phpmyadmin -VRUN_DEPENDS
     /usr/local/include/php/main/php.h:/usr/ports/lang/php5
 /usr/local/lib/php/20100525/ctype.so:/usr/ports/textproc/php5-ctype
 /usr/local/lib/php/20100525/session.so:/usr/ports/www/php5-session
 /usr/local/lib/php/20100525/filter.so:/usr/ports/security/php5-filter
 /usr/local/lib/php/20100525/mbstring.so:/usr/ports/converters/php5-mbstri=
 ng
 /usr/local/lib/php/20100525/json.so:/usr/ports/devel/php5-json
 /usr/local/lib/php/20100525/bz2.so:/usr/ports/archivers/php5-bz2
 /usr/local/lib/php/20100525/gd.so:/usr/ports/graphics/php5-gd
 /usr/local/lib/php/20100525/openssl.so:/usr/ports/security/php5-openssl
 /usr/local/lib/php/20100525/pdf.so:/usr/ports/print/pecl-pdflib
 /usr/local/lib/php/20100525/zlib.so:/usr/ports/archivers/php5-zlib
 /usr/local/lib/php/20100525/mcrypt.so:/usr/ports/security/php5-mcrypt
 /usr/local/lib/php/20100525/mbstring.so:/usr/ports/converters/php5-mbstri=
 ng
 /usr/local/lib/php/20100525/zip.so:/usr/ports/archivers/php5-zip
 /usr/local/lib/php/20100525/apc.so:/usr/ports/www/pecl-APC
 /usr/local/lib/php/20100525/mysqli.so:/usr/ports/databases/php5-mysqli
 
 As you can see, the RUN_DEPENDS have changed just by installing PHP. The
 impact of this is that by not having PHP already installed, and going
 straight to something that depends on PHP and extensions, it will keep
 the PHP_EXT_DIR=3D20100412 in its environment, and expect the extensions
 to be there later, when they really are in 20100525.
 
     9# pkg_delete -af
     9# make -C /usr/ports/databases/phpmyadmin -VPHP_EXT_DIR
     20100412
     9# make -C /usr/ports/databases/phpmyadmin install
     <snip>
     =3D=3D=3D>   phpMyAdmin-3.5.1 depends on file:
 /usr/local/lib/php/20100412/ctype.so - not found
     =3D=3D=3D>    Verifying install for /usr/local/lib/php/20100412/ctype=
 =2Eso
 in /usr/ports/textproc/php5-ctype
     ^C
     9# pkg_info -L php5-ctype-5.4.3|grep lib
     /usr/local/lib/php/20100525/ctype.so
 
 You can see here that the RUN_DEPENDS does not match the actual
 installed file.
 
 Of course, now that PHP is installed, running -VPHP_EXT_DIR, or make
 install on phpmyadmin, properly uses the 20100525 API.
 
 This is causing problems when building packages with
 ports-mgmt/poudriere with ports-mgmt/pkgng, since files are not being
 installed where expected.
 
 
 Regards,
 Bryan Drewery
 
 
 --------------enig14404217B95E04C41A4A56CA
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: OpenPGP digital signature
 Content-Disposition: attachment; filename="signature.asc"
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.9 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
 iQIcBAEBAgAGBQJPvWbfAAoJEG54KsA8mwz51VAP/RZwR5lSKE9mF0aomvkZK8Ot
 zQqjM7QFXHeAZ8itld+QJ4/pslRDtDpyVKGkE9Mv7HviVCSn3jnBs6w+Fy4W01TD
 hzoAAzPmfjVdQo6ccIKuj9bddEjKXI1tIKr2QNdMSwsWzt0erVx+VeQW1KHN6yib
 4GKE1OJSEsixRiE7T0swvm43V33uXuYV8VCen7wk3hG4afrKz2d/IE9R/ELmhzIl
 o77quTIOw0EH8pWHP3NAP1xE7bFQhh3inD98yxyxXSBOOZkvQZcbQYAAiYjYY755
 W0WKJveUwDJvUZXWhcSldXWM9h+m3hcYkwZHwAKCrtpDflUJg77a3ZowwGFY2WUi
 8MemlunyqPKqZLMH5DLVXJkTjOBZj/P0vUCrFx5GMdDzK0olJFLGU9UbEJ9W9OPq
 daCe9VcON9DT2WK4J0VJhsnyYSXozi9pORQzCH2SbjQtZzwix820MpOOcFCq9r39
 tRATFUAu6MHMcbfD3mSOAUHDC8Kx5mW9vWzcsG3dyWSJ2d/XRbQpFOVsfl7pYtpM
 D0qVWONmc/tB/znOWcUhMI3Toi2LQz4RUgv3Bm+Q7Rt0GfVMP1hfO6crjpEgOBa/
 Kc38rsG9xiK//BquZUTQE5ehpeKtdBGGDTpG/dWqJ/7GVe6LRS+70oAPJjl47mmo
 d+PGtkYHWOQUZmlo1HWG
 =rxtd
 -----END PGP SIGNATURE-----
 
 --------------enig14404217B95E04C41A4A56CA--
State-Changed-From-To: closed->open 
State-Changed-By: des 
State-Changed-When: Thu May 24 16:00:57 UTC 2012 
State-Changed-Why:  
The originator reports that the problem still exists, and I have 
experienced it myself while trying to build www/horde-base. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=167984 
State-Changed-From-To: open->closed 
State-Changed-By: ale 
State-Changed-When: Thu May 24 21:01:45 UTC 2012 
State-Changed-Why:  
Fixed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=167984 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/167984: commit references a PR
Date: Thu, 24 May 2012 21:01:50 +0000 (UTC)

 ale         2012-05-24 21:01:35 UTC
 
   FreeBSD ports repository
 
   Modified files:
     Mk                   bsd.php.mk 
   Log:
   Fix PHP_EXT_DIR.
   
   PR:             ports/167984
   Submitted by:   "Bryan Drewery" <bryan@shatow.net>
   
   Revision  Changes    Path
   1.71      +2 -2      ports/Mk/bsd.php.mk
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
