ports/120504: [patch] Fix www/eaccelerator to use shm and sysvipc semaphores

Björn König bkoenig at alpha-tierchen.de
Sun Feb 10 15:30:01 UTC 2008


>Number:         120504
>Category:       ports
>Synopsis:       [patch] Fix www/eaccelerator to use shm and sysvipc semaphores
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 10 15:30:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Björn König
>Release:        
>Organization:
>Environment:
>Description:
	This patch fixes two issues.

	The first is that eaccelerator does not use shared memory at all.
	Shared memory is a prerequisite for some important eaccelerator_*
	functions: put, get, rm, rc, lock, unlock. Therefore I added the
	configure switch --with-eaccelerator-shared-memory.

	The second problem is that --with-eaccelerator-userid=www sets the
	user ID to the string "www", but eaccelerator expects a numerical
	value. For this reason eaccelerator do not use SystemV IPC
	semaphores currently. I changed the port that it will investigate
	the user ID of "www" from /etc/passwd and use 0 if the user does
	not exist.

>How-To-Repeat:
>Fix:

--- ports-www-eaccelerator.diff begins here ---
diff -ruN ports/www/eaccelerator.orig/Makefile ports/www/eaccelerator/Makefile
--- ports/www/eaccelerator.orig/Makefile	2007-09-03 16:06:27.000000000 +0200
+++ ports/www/eaccelerator/Makefile	2008-02-10 15:59:56.000000000 +0100
@@ -18,8 +18,9 @@
 USE_PHP_BUILD=	yes
 
 CONFIGURE_ARGS=	--enable-eaccelerator=shared \
+		--with-eaccelerator-shared-memory \
 		--with-eaccelerator-sessions \
-		--with-eaccelerator-userid=www
+		--with-eaccelerator-userid=${WWW_UID}
 
 USE_BZIP2=	yes
 SUB_FILES=	pkg-message
@@ -29,6 +30,8 @@
 
 .include <bsd.port.pre.mk>
 
+WWW_UID!=	(${GREP} "^www:" /etc/passwd || ${ECHO} "::0") | ${CUT} -d: -f3
+
 .if ${PHP_VER} == 5
 CONFIGURE_ARGS+=	--without-eaccelerator-encoder
 PLIST_SUB+=		ENCODER="@comment "
--- ports-www-eaccelerator.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list