From bkoenig@alpha-tierchen.de  Sun Feb 10 15:20:19 2008
Return-Path: <bkoenig@alpha-tierchen.de>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 217DC16A418
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 10 Feb 2008 15:20:19 +0000 (UTC)
	(envelope-from bkoenig@alpha-tierchen.de)
Received: from mail.liberty-hosting.de (mail.smartterra.de [195.225.132.203])
	by mx1.freebsd.org (Postfix) with ESMTP id EBCA413C457
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 10 Feb 2008 15:20:18 +0000 (UTC)
	(envelope-from bkoenig@alpha-tierchen.de)
Received: from home.alpha-tierchen.de (port-212-202-40-215.dynamic.qsc.de [212.202.40.215])
	by mail.liberty-hosting.de (Postfix) with ESMTP id 07D593E8FA7
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 10 Feb 2008 16:19:06 +0100 (CET)
Received: from muhkuh.lan (muhkuh.lan [192.168.1.2])
	by home.alpha-tierchen.de (Postfix) with SMTP id B4FAB2842D
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 10 Feb 2008 16:20:12 +0100 (CET)
Received: by muhkuh.lan (sSMTP sendmail emulation); Sun, 10 Feb 2008 16:20:17 +0000
Message-Id: <20080210152012.B4FAB2842D@home.alpha-tierchen.de>
Date: Sun, 10 Feb 2008 16:20:17 +0000
From: "Bjrn Knig" <bkoenig@alpha-tierchen.de>
Reply-To: Bjrn Knig <bkoenig@alpha-tierchen.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] Fix www/eaccelerator to use shm and sysvipc semaphores
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         120504
>Category:       ports
>Synopsis:       [patch] Fix www/eaccelerator to use shm and sysvipc semaphores
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    ale
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 10 15:30:01 UTC 2008
>Closed-Date:    Mon Feb 11 07:13:05 UTC 2008
>Last-Modified:  Mon Feb 11 07:20:01 UTC 2008
>Originator:     Bjrn Knig
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->ale 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Feb 10 15:30:08 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=120504 
State-Changed-From-To: open->closed 
State-Changed-By: ale 
State-Changed-When: Mon Feb 11 07:12:49 UTC 2008 
State-Changed-Why:  
Committed, thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/120504: commit references a PR
Date: Mon, 11 Feb 2008 07:12:39 +0000 (UTC)

 ale         2008-02-11 07:12:34 UTC
 
   FreeBSD ports repository
 
   Modified files:
     www/eaccelerator     Makefile 
   Log:
   Enable shared memory and content caching api.
   Fix userid.
   
   PR:             ports/120504
   Submitted by:   Bjrn Knig <bkoenig@alpha-tierchen.de>
   
   Revision  Changes    Path
   1.38      +4 -1      ports/www/eaccelerator/Makefile
 _______________________________________________
 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:
