NetBSD Problem Report #39312

From riz@newdev.local  Thu Aug  7 17:16:24 2008
Return-Path: <riz@newdev.local>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id CD7E763BB81
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  7 Aug 2008 17:16:23 +0000 (UTC)
Message-Id: <20080807113954.10D8AC0982@newdev.local>
Date: Thu,  7 Aug 2008 04:39:53 -0700 (PDT)
From: riz@newdev.local
Reply-To: riz@newdev.local
To: gnats-bugs@gnats.NetBSD.org
Subject: lang/php5 has no way to enable thread safety or outgoing ftp
X-Send-Pr-Version: 3.95

>Number:         39312
>Category:       pkg
>Synopsis:       No way to enable certain options when building PHP
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    adrianp
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 07 17:20:00 +0000 2008
>Closed-Date:    Fri Aug 08 20:08:08 +0000 2008
>Last-Modified:  Fri Aug 08 20:08:08 +0000 2008
>Originator:     Jeff Rizzo <riz@tastylime.net>
>Release:        NetBSD 4.99.72
>Organization:
>Environment:
System: NetBSD newdev.local 4.99.72 NetBSD 4.99.72 (GENERIC) #0: Mon Aug 4 19:04:59 PDT 2008 builds@wb28:/home/builds/ab/HEAD/amd64/200808040002Z-obj/home/builds/ab/HEAD/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
	When running Apache 2.2 with the worker MPM, php does not behave
	itself unless thread safety is on, using the --enable-maintainer-zts
	option at build time.  Also, our application needs to make
	outgoing ftp connections, which also needs to be enabled at
	build time.
>How-To-Repeat:
	Build lang/php5, try to enable those options
>Fix:
	Apply the following patch, then build using the new options.
	Not sure how correct this is in the current pkgsrc scheme, so
	feel free to alter.  The patch applies in pkgsrc/lang/php5 .


Index: Makefile.php
===================================================================
RCS file: /cvsroot/pkgsrc/lang/php5/Makefile.php,v
retrieving revision 1.27
diff -u -r1.27 Makefile.php
--- Makefile.php	8 Jul 2008 20:28:55 -0000	1.27
+++ Makefile.php	7 Aug 2008 15:49:29 -0000
@@ -41,7 +41,7 @@
 # Note: This expression is the same as ${PKGBASE}, but the latter is
 # not defined yet, so we cannot use it here.
 PKG_OPTIONS_VAR=	PKG_OPTIONS.${PKGNAME:C/-[0-9].*//}
-PKG_SUPPORTED_OPTIONS+=	inet6 ssl
+PKG_SUPPORTED_OPTIONS+=	inet6 ssl maintainer-zts ftp
 PKG_SUGGESTED_OPTIONS+=	ssl

 .include "../../mk/bsd.options.mk"
@@ -58,3 +58,11 @@
 .else
 CONFIGURE_ARGS+=	--without-openssl
 .endif
+
+.if !empty(PKG_OPTIONS:Mftp)
+CONFIGURE_ARGS+=	--enable-ftp
+.endif
+
+.if !empty(PKG_OPTIONS:Mmaintainer-zts)
+CONFIGURE_ARGS+=	--enable-maintainer-zts
+.endif

>Release-Note:

>Audit-Trail:
From: Adrian Portelli <adrianp@stindustries.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/39312: lang/php5 has no way to enable thread safety or outgoing
 ftp
Date: Thu, 07 Aug 2008 20:00:37 +0100

 riz@newdev.local wrote:
 >> Number:         39312
 >> Category:       pkg
 >> Synopsis:       No way to enable certain options when building PHP
 >> Confidential:   no
 >> Severity:       serious
 >> Priority:       medium
 >> Responsible:    pkg-manager
 >> State:          open
 >> Class:          change-request
 >> Submitter-Id:   net
 >> Arrival-Date:   Thu Aug 07 17:20:00 +0000 2008
 >> Originator:     Jeff Rizzo <riz@tastylime.net>
 >> Release:        NetBSD 4.99.72
 >> Organization:
 >> Environment:
 > System: NetBSD newdev.local 4.99.72 NetBSD 4.99.72 (GENERIC) #0: Mon Aug 4 19:04:59 PDT 2008 builds@wb28:/home/builds/ab/HEAD/amd64/200808040002Z-obj/home/builds/ab/HEAD/src/sys/arch/amd64/compile/GENERIC amd64
 > Architecture: x86_64
 > Machine: amd64
 >> Description:
 > 	When running Apache 2.2 with the worker MPM, php does not behave
 > 	itself unless thread safety is on, using the --enable-maintainer-zts
 > 	option at build time.  Also, our application needs to make
 > 	outgoing ftp connections, which also needs to be enabled at
 > 	build time.
 >> How-To-Repeat:
 > 	Build lang/php5, try to enable those options
 >> Fix:
 > 	Apply the following patch, then build using the new options.
 > 	Not sure how correct this is in the current pkgsrc scheme, so
 > 	feel free to alter.  The patch applies in pkgsrc/lang/php5 .
 > 
 > 
 > Index: Makefile.php
 > ===================================================================
 > RCS file: /cvsroot/pkgsrc/lang/php5/Makefile.php,v
 > retrieving revision 1.27
 > diff -u -r1.27 Makefile.php
 > --- Makefile.php	8 Jul 2008 20:28:55 -0000	1.27
 > +++ Makefile.php	7 Aug 2008 15:49:29 -0000
 > @@ -41,7 +41,7 @@
 >  # Note: This expression is the same as ${PKGBASE}, but the latter is
 >  # not defined yet, so we cannot use it here.
 >  PKG_OPTIONS_VAR=	PKG_OPTIONS.${PKGNAME:C/-[0-9].*//}
 > -PKG_SUPPORTED_OPTIONS+=	inet6 ssl
 > +PKG_SUPPORTED_OPTIONS+=	inet6 ssl maintainer-zts ftp
 >  PKG_SUGGESTED_OPTIONS+=	ssl
 >  
 >  .include "../../mk/bsd.options.mk"
 > @@ -58,3 +58,11 @@
 >  .else
 >  CONFIGURE_ARGS+=	--without-openssl
 >  .endif
 > +
 > +.if !empty(PKG_OPTIONS:Mftp)
 > +CONFIGURE_ARGS+=	--enable-ftp
 > +.endif
 > +
 > +.if !empty(PKG_OPTIONS:Mmaintainer-zts)
 > +CONFIGURE_ARGS+=	--enable-maintainer-zts
 > +.endif
 > 

 For at least the ftp portion of this issue is there any reason you can't 
 install net/php-ftp ?

 adrian.

Responsible-Changed-From-To: pkg-manager->jdolecek
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Fri, 08 Aug 2008 02:56:30 +0000
Responsible-Changed-Why:
Over to maintainer.


From: Jeff Rizzo <riz@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/39312: lang/php5 has no way to enable thread safety or outgoing
 ftp
Date: Fri, 08 Aug 2008 12:39:24 -0700

 Adrian Portelli wrote:
 >  
 >  For at least the ftp portion of this issue is there any reason you can't 
 >  install net/php-ftp ?
 >   


 Hm, I thought I had looked for a package that did this, but apparently I 
 was mistaken.

 This should certainly work;  I wonder if a similar approach shouldn't be 
 taken with the maintainer-zts bit as well.

 +j


From: Adrian Portelli <adrianp@stindustries.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/39312: lang/php5 has no way to enable thread safety or outgoing
  ftp
Date: Fri, 08 Aug 2008 20:47:52 +0100

 Jeff Rizzo wrote:
 > The following reply was made to PR pkg/39312; it has been noted by GNATS.
 > 
 > From: Jeff Rizzo <riz@NetBSD.org>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: pkg/39312: lang/php5 has no way to enable thread safety or outgoing
 >  ftp
 > Date: Fri, 08 Aug 2008 12:39:24 -0700
 > 
 >  Adrian Portelli wrote:
 >  >  
 >  >  For at least the ftp portion of this issue is there any reason you can't 
 >  >  install net/php-ftp ?
 >  >   
 >  
 >  
 >  Hm, I thought I had looked for a package that did this, but apparently I 
 >  was mistaken.
 >  
 >  This should certainly work;  I wonder if a similar approach shouldn't be 
 >  taken with the maintainer-zts bit as well.
 >  
 >  +j
 >  
 >  

 If it's possible to package it then, IMHO, that would be the best way to go.

 adrian.

From: Adrian Portelli <adrianp@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/39312 CVS commit: pkgsrc/lang/php5
Date: Fri,  8 Aug 2008 20:01:34 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	adrianp
 Date:		Fri Aug  8 20:01:34 UTC 2008

 Modified Files:
 	pkgsrc/lang/php5: Makefile.php

 Log Message:
 Add maintainer-zts option
 Suggested by riz@ in PR 39312


 To generate a diff of this commit:
 cvs rdiff -r1.27 -r1.28 pkgsrc/lang/php5/Makefile.php

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: jdolecek->adrianp
Responsible-Changed-By: adrianp@NetBSD.org
Responsible-Changed-When: Fri, 08 Aug 2008 20:08:08 +0000
Responsible-Changed-Why:
AFAIK it's not possible to build maintainer-zts as a PHP module so expose an options to do this using the options.mk framework.  As regards to the FTP side of this PR then net/php-ftp can be used.


State-Changed-From-To: open->closed
State-Changed-By: adrianp@NetBSD.org
State-Changed-When: Fri, 08 Aug 2008 20:08:08 +0000
State-Changed-Why:


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.