Bug 188061

Summary: lang/php55: Extensions emit warning DEFAULT_PHP_VER is defined when it's not
Product: Ports & Packages Reporter: Bernard Spil <brnrd>
Component: Individual Port(s)Assignee: Florian Smeets <flo>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Bernard Spil freebsd_committer freebsd_triage 2014-03-29 21:30:00 UTC
When building a php 5.5 extension make emits warnings 

/!\ WARNING /!\
DEFAULT_PHP_VER is defined, consider using DEFAULT_VERSIONS=php=55 instead

even when DEFAULT_PHP_VER is not set but it is properly defined using DEFAULT_VERSIONS=       php=5.5
(or DEFAULT_VERSIONS=       php=55)

Fix: Problem is in Makefile.ext. lang/php55/Makefile contains DEFAULT_VERSIONS= php=55 when PKGNAMESUFFIX is undefined (i.e. not building an extension) but Makefile.ext which it includes when PKGNAMESUFFIX is defined contains DEFAULT_PHP_VER=55 causing the warning. Replacing DEFAULT_PHP_VER in Makefile.ext quenches the error.



EXTSUBDIR=     ${DISTNAME}/ext/${PHP_MODNAME}--yd6XMjIcvsBVNjNncXfGQKnmVHX1h2hsV3aPDGwpI6AZza1W
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- Makefile.ext.orig   2014-03-29 22:11:26.000000000 +0100
+++ Makefile.ext        2014-03-29 22:09:43.000000000 +0100
@@ -3,7 +3,8 @@
 USE_PHP=       yes
 USE_PHPEXT=    yes
 PHP_MODNAME=   ${PKGNAMESUFFIX:S/-//}
-DEFAULT_PHP_VER=55
+#DEFAULT_PHP_VER=55
+DEFAULT_VERSIONS=       php=55
 IGNORE_WITH_PHP=52 53 54 5
How-To-Repeat: cd /usr/ports/www/php55-opcache
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2014-03-29 21:30:03 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ale

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Mark Linimon 2014-03-30 14:44:50 UTC
----- Forwarded message from Spil Oss <spil.oss@gmail.com> -----

Date: Sun, 30 Mar 2014 10:43:34 +0200
From: Spil Oss <spil.oss@gmail.com>
To: freebsd-ports-bugs@freebsd.org, Alex Dupre <ale@freebsd.org>
Subject: Re: ports/188061: [lang/php55] Extensions emit warning DEFAULT_PHP_VER is defined when it's not

Hi Alex,

Just checked, the other versions php ports have the same 'problem'
Additionally lang/php53 was missing an IGNORE_WITH_PHP for version 5.5

--- lang/php5/Makefile.ext.orig   2014-01-29 21:41:27.000000000 +0100
+++ lang/php5/Makefile.ext        2014-03-30 10:30:09.907132927 +0200
@@ -3,7 +3,7 @@
 USE_PHP=       yes
 USE_PHPEXT=    yes
 PHP_MODNAME=   ${PKGNAMESUFFIX:S/-//}
-DEFAULT_PHP_VER=5
+DEFAULT_VERSIONS=php=5
 IGNORE_WITH_PHP=52 53 55

 EXTSUBDIR=     ${DISTNAME}/ext/${PHP_MODNAME}
--- lang/php53/Makefile.ext.orig        2014-01-29 21:41:27.000000000 +0100
+++ lang/php53/Makefile.ext     2014-03-30 10:42:07.154082615 +0200
@@ -3,8 +3,8 @@
 USE_PHP=       yes
 USE_PHPEXT=    yes
 PHP_MODNAME=   ${PKGNAMESUFFIX:S/-//}
-DEFAULT_PHP_VER=53
-IGNORE_WITH_PHP=52 5
+DEFAULT_VERSIONS=      php=53
+IGNORE_WITH_PHP=52 5 55

 EXTSUBDIR=     ${DISTNAME}/ext/${PHP_MODNAME}
 WRKSRC=                ${WRKDIR}/${EXTSUBDIR}

Kind regards,

Spil.

----- End forwarded message -----
Comment 3 Alex Dupre freebsd_committer freebsd_triage 2014-03-31 12:03:23 UTC
Responsible Changed
From-To: ale->flo

Fixed in php 5.4/5.4, to maintainer of php 5.3
Comment 4 dfilter service freebsd_committer freebsd_triage 2014-03-31 12:03:25 UTC
Author: ale
Date: Mon Mar 31 11:03:12 2014
New Revision: 349728
URL: http://svnweb.freebsd.org/changeset/ports/349728
QAT: https://qat.redports.org/buildarchive/r349728/

Log:
  No-op, use DEFAULT_VERSIONS.
  
  PR:		ports/188061
  Submitted by:	Spil <spil.oss@gmail.com>

Modified:
  head/lang/php5/Makefile.ext
  head/lang/php55/Makefile.ext

Modified: head/lang/php5/Makefile.ext
==============================================================================
--- head/lang/php5/Makefile.ext	Mon Mar 31 11:00:46 2014	(r349727)
+++ head/lang/php5/Makefile.ext	Mon Mar 31 11:03:12 2014	(r349728)
@@ -3,7 +3,7 @@ COMMENT=	The ${PHP_MODNAME} shared exten
 USE_PHP=	yes
 USE_PHPEXT=	yes
 PHP_MODNAME=	${PKGNAMESUFFIX:S/-//}
-DEFAULT_PHP_VER=5
+DEFAULT_VERSIONS=	php=5
 IGNORE_WITH_PHP=52 53 55
 
 EXTSUBDIR=	${DISTNAME}/ext/${PHP_MODNAME}

Modified: head/lang/php55/Makefile.ext
==============================================================================
--- head/lang/php55/Makefile.ext	Mon Mar 31 11:00:46 2014	(r349727)
+++ head/lang/php55/Makefile.ext	Mon Mar 31 11:03:12 2014	(r349728)
@@ -3,7 +3,7 @@ COMMENT=	The ${PHP_MODNAME} shared exten
 USE_PHP=	yes
 USE_PHPEXT=	yes
 PHP_MODNAME=	${PKGNAMESUFFIX:S/-//}
-DEFAULT_PHP_VER=55
+DEFAULT_VERSIONS=	php=55
 IGNORE_WITH_PHP=52 53 54 5
 
 EXTSUBDIR=	${DISTNAME}/ext/${PHP_MODNAME}
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 dfilter service freebsd_committer freebsd_triage 2014-05-02 18:48:19 UTC
Author: flo
Date: Fri May  2 17:48:14 2014
New Revision: 352831
URL: http://svnweb.freebsd.org/changeset/ports/352831
QAT: https://qat.redports.org/buildarchive/r352831/

Log:
  - Fix CVE-2014-0185 via patch until 5.3.29 is released
  - Use DEFAULT_VERSIONS [1]
  
  PR:		ports/188061 [1]
  Submitted by:	Spil <spil.oss@gmail.com> [1]
  MFH:		2014Q2

Added:
  head/lang/php53/files/patch-cve-2014-0185   (contents, props changed)
Modified:
  head/lang/php53-extensions/Makefile
  head/lang/php53/Makefile
  head/lang/php53/Makefile.ext

Modified: head/lang/php53-extensions/Makefile
==============================================================================
--- head/lang/php53-extensions/Makefile	Fri May  2 17:23:53 2014	(r352830)
+++ head/lang/php53-extensions/Makefile	Fri May  2 17:48:14 2014	(r352831)
@@ -11,8 +11,8 @@ EXTRACT_ONLY=	# none
 MAINTAINER=	flo@FreeBSD.org
 COMMENT=	A "meta-port" to install PHP extensions
 
-DEFAULT_PHP_VER=53
-IGNORE_WITH_PHP=5 52
+PHP_DEFAULT=	53
+IGNORE_WITH_PHP=5 52 55
 USE_PHP_BUILD=	yes
 
 NO_BUILD=	yes

Modified: head/lang/php53/Makefile
==============================================================================
--- head/lang/php53/Makefile	Fri May  2 17:23:53 2014	(r352830)
+++ head/lang/php53/Makefile	Fri May  2 17:48:14 2014	(r352831)
@@ -3,7 +3,7 @@
 
 PORTNAME=	php53
 PORTVERSION=	5.3.28
-PORTREVISION?=	1
+PORTREVISION?=	2
 CATEGORIES?=	lang devel www
 MASTER_SITES=	${MASTER_SITE_PHP}
 MASTER_SITE_SUBDIR=	distributions
@@ -14,7 +14,7 @@ COMMENT=	PHP Scripting Language
 
 LATEST_LINK=	${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
 
-USE_BZIP2=	yes
+USES=tar:bzip2
 .if !defined(PKGNAMESUFFIX)
 USE_AUTOTOOLS=	autoconf
 

Modified: head/lang/php53/Makefile.ext
==============================================================================
--- head/lang/php53/Makefile.ext	Fri May  2 17:23:53 2014	(r352830)
+++ head/lang/php53/Makefile.ext	Fri May  2 17:48:14 2014	(r352831)
@@ -3,8 +3,8 @@ COMMENT=	The ${PHP_MODNAME} shared exten
 USE_PHP=	yes
 USE_PHPEXT=	yes
 PHP_MODNAME=	${PKGNAMESUFFIX:S/-//}
-DEFAULT_PHP_VER=53
-IGNORE_WITH_PHP=52 5
+PHP_DEFAULT=	53
+IGNORE_WITH_PHP=52 5 55
 
 EXTSUBDIR=	${DISTNAME}/ext/${PHP_MODNAME}
 WRKSRC=		${WRKDIR}/${EXTSUBDIR}

Added: head/lang/php53/files/patch-cve-2014-0185
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/php53/files/patch-cve-2014-0185	Fri May  2 17:48:14 2014	(r352831)
@@ -0,0 +1,26 @@
+--- sapi/fpm/fpm/fpm_unix.c.orig	2014-05-02 19:01:53.759889551 +0200
++++ sapi/fpm/fpm/fpm_unix.c	2014-05-02 19:02:05.029888255 +0200
+@@ -35,7 +35,7 @@
+ 	/* uninitialized */
+ 	wp->socket_uid = -1;
+ 	wp->socket_gid = -1;
+-	wp->socket_mode = 0666;
++	wp->socket_mode = 0660;
+ 
+ 	if (!c) {
+ 		return 0;
+--- sapi/fpm/php-fpm.conf.in.orig	2014-05-02 19:03:03.746956989 +0200
++++ sapi/fpm/php-fpm.conf.in	2014-05-02 19:02:37.651887275 +0200
+@@ -158,10 +158,10 @@
+ ; permissions must be set in order to allow connections from a web server. Many
+ ; BSD-derived systems allow connections regardless of permissions. 
+ ; Default Values: user and group are set as the running user
+-;                 mode is set to 0666
++;                 mode is set to 0660
+ ;listen.owner = @php_fpm_user@
+ ;listen.group = @php_fpm_group@
+-;listen.mode = 0666
++;listen.mode = 0660
+  
+ ; List of ipv4 addresses of FastCGI clients which are allowed to connect.
+ ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 6 dfilter service freebsd_committer freebsd_triage 2014-05-02 18:57:53 UTC
Author: flo
Date: Fri May  2 17:57:48 2014
New Revision: 352832
URL: http://svnweb.freebsd.org/changeset/ports/352832
QAT: https://qat.redports.org/buildarchive/r352832/

Log:
  MFH: r352831
  
  - Fix CVE-2014-0185 via patch until 5.3.29 is released
  - Use DEFAULT_VERSIONS [1]
  
  PR:		ports/188061 [1]
  Submitted by:	Spil <spil.oss@gmail.com> [1]
  Approved by:	portmgr (bdrewery)

Added:
  branches/2014Q2/lang/php53/files/patch-cve-2014-0185
     - copied unchanged from r352831, head/lang/php53/files/patch-cve-2014-0185
Modified:
  branches/2014Q2/lang/php53-extensions/Makefile
  branches/2014Q2/lang/php53/Makefile
  branches/2014Q2/lang/php53/Makefile.ext
Directory Properties:
  branches/2014Q2/   (props changed)

Modified: branches/2014Q2/lang/php53-extensions/Makefile
==============================================================================
--- branches/2014Q2/lang/php53-extensions/Makefile	Fri May  2 17:48:14 2014	(r352831)
+++ branches/2014Q2/lang/php53-extensions/Makefile	Fri May  2 17:57:48 2014	(r352832)
@@ -11,8 +11,8 @@ EXTRACT_ONLY=	# none
 MAINTAINER=	flo@FreeBSD.org
 COMMENT=	A "meta-port" to install PHP extensions
 
-DEFAULT_PHP_VER=53
-IGNORE_WITH_PHP=5 52
+PHP_DEFAULT=	53
+IGNORE_WITH_PHP=5 52 55
 USE_PHP_BUILD=	yes
 
 NO_BUILD=	yes

Modified: branches/2014Q2/lang/php53/Makefile
==============================================================================
--- branches/2014Q2/lang/php53/Makefile	Fri May  2 17:48:14 2014	(r352831)
+++ branches/2014Q2/lang/php53/Makefile	Fri May  2 17:57:48 2014	(r352832)
@@ -3,7 +3,7 @@
 
 PORTNAME=	php53
 PORTVERSION=	5.3.28
-PORTREVISION?=	0
+PORTREVISION?=	2
 CATEGORIES?=	lang devel www
 MASTER_SITES=	${MASTER_SITE_PHP}
 MASTER_SITE_SUBDIR=	distributions
@@ -14,7 +14,7 @@ COMMENT=	PHP Scripting Language
 
 LATEST_LINK=	${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
 
-USE_BZIP2=	yes
+USES=tar:bzip2
 .if !defined(PKGNAMESUFFIX)
 USE_AUTOTOOLS=	autoconf
 

Modified: branches/2014Q2/lang/php53/Makefile.ext
==============================================================================
--- branches/2014Q2/lang/php53/Makefile.ext	Fri May  2 17:48:14 2014	(r352831)
+++ branches/2014Q2/lang/php53/Makefile.ext	Fri May  2 17:57:48 2014	(r352832)
@@ -3,8 +3,8 @@ COMMENT=	The ${PHP_MODNAME} shared exten
 USE_PHP=	yes
 USE_PHPEXT=	yes
 PHP_MODNAME=	${PKGNAMESUFFIX:S/-//}
-DEFAULT_PHP_VER=53
-IGNORE_WITH_PHP=52 5
+PHP_DEFAULT=	53
+IGNORE_WITH_PHP=52 5 55
 
 EXTSUBDIR=	${DISTNAME}/ext/${PHP_MODNAME}
 WRKSRC=		${WRKDIR}/${EXTSUBDIR}

Copied: branches/2014Q2/lang/php53/files/patch-cve-2014-0185 (from r352831, head/lang/php53/files/patch-cve-2014-0185)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2014Q2/lang/php53/files/patch-cve-2014-0185	Fri May  2 17:57:48 2014	(r352832, copy of r352831, head/lang/php53/files/patch-cve-2014-0185)
@@ -0,0 +1,26 @@
+--- sapi/fpm/fpm/fpm_unix.c.orig	2014-05-02 19:01:53.759889551 +0200
++++ sapi/fpm/fpm/fpm_unix.c	2014-05-02 19:02:05.029888255 +0200
+@@ -35,7 +35,7 @@
+ 	/* uninitialized */
+ 	wp->socket_uid = -1;
+ 	wp->socket_gid = -1;
+-	wp->socket_mode = 0666;
++	wp->socket_mode = 0660;
+ 
+ 	if (!c) {
+ 		return 0;
+--- sapi/fpm/php-fpm.conf.in.orig	2014-05-02 19:03:03.746956989 +0200
++++ sapi/fpm/php-fpm.conf.in	2014-05-02 19:02:37.651887275 +0200
+@@ -158,10 +158,10 @@
+ ; permissions must be set in order to allow connections from a web server. Many
+ ; BSD-derived systems allow connections regardless of permissions. 
+ ; Default Values: user and group are set as the running user
+-;                 mode is set to 0666
++;                 mode is set to 0660
+ ;listen.owner = @php_fpm_user@
+ ;listen.group = @php_fpm_group@
+-;listen.mode = 0666
++;listen.mode = 0660
+  
+ ; List of ipv4 addresses of FastCGI clients which are allowed to connect.
+ ; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 7 Florian Smeets freebsd_committer freebsd_triage 2014-05-11 10:39:13 UTC
State Changed
From-To: open->closed

Committed. Thanks!