Subject: pkg/33424: [PATCH] www/php-apc httpd core dump fix
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <fun@naobsd.org>
List: pkgsrc-bugs
Date: 05/04/2006 18:55:00
>Number: 33424
>Category: pkg
>Synopsis: [PATCH] www/php-apc httpd dumps core
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu May 04 18:55:00 +0000 2006
>Originator: FUKAUMI Naoki
>Release: NetBSD 3.99.17
>Organization:
FUKAUMI Naoki
>Environment:
System: NetBSD gigalandisk.naobsd.org 3.99.17 NetBSD 3.99.17 (GENERIC) #0: Sun Apr 9 22:46:24 JST 2006 root@build.naobsd.org:/usr/obj/gigalandisk/sys/arch/gigalandisk/compile/GENERIC gigalandisk
Architecture: arm
Machine: gigalandisk
apache-2.0.55nb7
php-4.4.2nb1
ap-php-4.4.2nb6
php-apc-4.4.2.3.0.10
>Description:
httpd (apache2) dumps core when it starts. I think this problem
may not occur on i386 machine.
The type of apc.optimization and apc.slam_defense are int(long)
but they are treated as boolean in some places.
This bug should be related with
http://pecl.php.net/bugs/bug.php?id=7489
>How-To-Repeat:
install www/php-apc
/etc/rc.d/apache start
>Fix:
- Fix for httpd dumps core
- Install apc.php for convenience
- Add optimization flags for PHP 4
(See "PHP 4 Optimization" section in INSTALL file)
I've tested these changes with apache2 & php4 on arm machine.
XXX www/php-apc works with php4. www/php4-apc is not needed
XXX anymore.
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/php-apc/Makefile,v
retrieving revision 1.1
diff -p -r1.1 Makefile
*** Makefile 3 May 2006 14:02:30 -0000 1.1
--- Makefile 4 May 2006 18:00:16 -0000
***************
*** 2,22 ****
--- 2,41 ----
MODNAME= apc
PECL_VERSION= 3.0.10
+ PKGREVISION= 1
CATEGORIES+= sysutils
COMMENT= Alternative PHP Cache
MAINTAINER= pkgsrc-users@NetBSD.org
CONFIGURE_ARGS+= --enable-${MODNAME}
+ #CONFIGURE_ARGS+= --enable-apc-mmap
+ #CONFIGURE_ARGS+= --enable-apc-sem
+
+ .include "../../lang/php/phpversion.mk"
+
+ .if ${PKG_PHP_VERSION} == 4
+ APACHE_MODULE= YES # XXX
+ CONFIGURE_ARGS+= --with-apxs=${APXS:Q}
+ CPPFLAGS+= -DAPC_PHP4_STAT
+ .endif
+
WRKSRC= ${WRKDIR}/APC-${PECL_VERSION}
PLIST_SRC+= ${.CURDIR}/PLIST.extras
PLIST_SUBST+= PKGBASE=${PKGBASE:Q}
+
+ CGIDIR= ${PREFIX}/libexec/cgi-bin
DOCDIR= ${PREFIX}/share/doc/${PKGBASE}
post-install:
+ ${INSTALL_DATA_DIR} ${CGIDIR}
+ ${INSTALL_DATA} ${WRKSRC}/apc.php ${CGIDIR}
${INSTALL_DATA_DIR} ${DOCDIR}
${INSTALL_DATA} ${WRKSRC}/INSTALL ${DOCDIR}
.include "../../lang/php/ext.mk"
+ .if ${PKG_PHP_VERSION} == 4
+ .include "../../mk/apache.mk"
+ .endif
.include "../../mk/bsd.pkg.mk"
Index: PLIST.extras
===================================================================
RCS file: /cvsroot/pkgsrc/www/php-apc/PLIST.extras,v
retrieving revision 1.1
diff -p -r1.1 PLIST.extras
*** PLIST.extras 3 May 2006 14:02:30 -0000 1.1
--- PLIST.extras 4 May 2006 17:42:51 -0000
***************
*** 1,3 ****
--- 1,4 ----
@comment $NetBSD: PLIST.extras,v 1.1 2006/05/03 14:02:30 tv Exp $
+ libexec/cgi-bin/apc.php
share/doc/${PKGBASE}/INSTALL
@dirrm share/doc/${PKGBASE}
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/www/php-apc/distinfo,v
retrieving revision 1.1
diff -p -r1.1 distinfo
*** distinfo 3 May 2006 14:02:30 -0000 1.1
--- distinfo 4 May 2006 16:58:20 -0000
*************** $NetBSD: distinfo,v 1.1 2006/05/03 14:02
*** 3,5 ****
--- 3,7 ----
SHA1 (php-apc/apc-3.0.10.tgz) = c442e933affac7f5d143de4970874d9426aca9de
RMD160 (php-apc/apc-3.0.10.tgz) = 6ceec8c14ece7f8e887a621a914b9f265513b22d
Size (php-apc/apc-3.0.10.tgz) = 85818 bytes
+ SHA1 (patch-aa) = e09cab569bfcc5d75863322cfdbd72aa97717b22
+ SHA1 (patch-ab) = 780e8f44a1b749d34842ba173fc516e09b8abe2d
begin 644 php-apc-patches.tgz
M'XL(`/4_6D0``^U675/;.!3E=?D5FK0/A=@@.W:R)2]`2Z?,I($I]*%/'L=1
M$DUMRV/)G<*O[[UR/NR0D`0FV]E=G6&0(_D>'>OJ'BD+531A\F"?H-2C'=^'
MECH=GU;;&0X<ZKEMK^4X+0?Z'=IV.P?^7E5-44@5YC#EJ$B??6_3^+\469G_
M4]W:8;B/.2"=M.UYZ_+O^)W.-/]NQV^W,?]NJ]4YH/L0LXS_>?[?]IFZO/OX
M]O#0MFT29E$PCL4@C.7)Y$3D?/R7"[FS:<MV7.+0,\\]H\[)O&Q)D[ZG]+#9
M;-9#IU$^_!'JG'FM,]=_$G5^3NRV8W5(4_\_/S\D""2"G$0_`G5,HA!V9_FS
MBX.GQT1-&-$=1(S*\2%AOUA4J'`0,Q*)(2/'IR77(TN'P4"(>$HT>`B&;!06
ML>J67'G!"!^1$8^9)'(BBGA(!FQ&6Z30+7%4L1Q^BT+-J9\%4(]@(9YRBS1^
MJ$Q0#I?D/$5NNRY;QF&"DEDJ67?.?9O#.@]XS-4#+D)(LEQ$J#052E/S=$S"
M%/1/YT$-R-Y$@EC`Z`KB5[-K`LD?&68N84F@GS.5=ROLV(>T@UA$/R0)8VA#
M!2Q*E$0#AOQ3ZG?];[T>KKODD-;D(8A$DL%;`;YZ-)]4?Q)V!44V!+8`)"L6
M*2[2+DYZ,6:XOI)%(AU*F&(D<@9?IB?DDK"8CSGN'A"QR(Y-*'8,N=0[Z^FF
M8BD.!%',JU_X*0['&"=^LCQ'V:K(4_RFB]L/\.60<I&3#[UK)/S3Y;_L_X-]
M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