From fmysh@quad.dyndns.org  Mon May 10 04:37:37 2004
Return-Path: <fmysh@quad.dyndns.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id AF57A16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 10 May 2004 04:37:37 -0700 (PDT)
Received: from prime.quad.dyndns.org (12.57.138.210.xn.2iij.net [210.138.57.12])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B4A4C43D49
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 10 May 2004 04:37:36 -0700 (PDT)
	(envelope-from fmysh@quad.dyndns.org)
Received: from localhost (localhost [127.0.0.1])
	by prime.quad.dyndns.org (Postfix) with ESMTP
	id 139A8F18A4; Mon, 10 May 2004 20:37:35 +0900 (JST)
Received: from prime.quad.dyndns.org ([127.0.0.1])
 by localhost (prime.quad.dyndns.org [127.0.0.1]) (amavisd-new, port 10024)
 with LMTP id 00659-04; Mon, 10 May 2004 20:37:33 +0900 (JST)
Received: by prime.quad.dyndns.org (Postfix, from userid 1001)
	id 9CD75F18A3; Mon, 10 May 2004 20:37:33 +0900 (JST)
Message-Id: <20040510113733.9CD75F18A3@prime.quad.dyndns.org>
Date: Mon, 10 May 2004 20:37:33 +0900 (JST)
From: TAOKA Fumiyoshi <fmysh@iijmio-mail.jp>
Reply-To: TAOKA Fumiyoshi <fmysh@iijmio-mail.jp>
To: FreeBSD-gnats-submit@freebsd.org
Cc: ZERO <zaq75082@fox.zero.ad.jp>
Subject: www/mod_throttle doesn't preserve its runtime information
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         66451
>Category:       ports
>Synopsis:       www/mod_throttle doesn't preserve its runtime information
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    anders
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 10 04:40:13 PDT 2004
>Closed-Date:    Thu Jun 03 06:08:28 PDT 2004
>Last-Modified:  Thu Jun 03 06:08:28 PDT 2004
>Originator:     TAOKA Fumiyoshi
>Release:        FreeBSD 5.2.1-RELEASE-p6 i386
>Organization:
>Environment:
System: FreeBSD prime.quad.dyndns.org 5.2.1-RELEASE-p6 FreeBSD 5.2.1-RELEASE-p6 #33: Fri May 7 03:14:02 JST 2004 fmysh@prime.quad.dyndns.org:/usr/obj/usr/src/sys/DPI533 i386

>Description:
	www/mod_throttle can't preserve its runtime information across
	shutdown and restarts because the runtime directory is defined 
	as "logs/..." in mod_throttle.c, which doesn't fit with FreeBSD's
	Apache directory layout. 

>How-To-Repeat:
	Restart httpd.

>Fix:
	Use /var/run/mod_throttle as a runtime directory.


-- Makefile.orig       Mon May 10 16:03:21 2004
+++ Makefile    Mon May 10 19:49:12 2004
@@ -21,6 +21,8 @@

 DOCS=          CHANGES.txt LICENSE.txt index.shtml

+RUNTIMEDIR=    /var/run/mod_throttle
+
 do-build:
        @cd ${WRKSRC} && \
        ${APXS} -c mod_throttle.c
@@ -33,6 +35,8 @@
        ${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/share/doc/mod_throttle/
 .endfor
 .endif
+       ${MKDIR} ${RUNTIMEDIR}
+       ${CHOWN} -R www:www ${RUNTIMEDIR}
        ${CAT} ${PKGMESSAGE}

 .include <bsd.port.mk>
--- files/patch-mod_throttle.c.orig     Mon May 10 19:54:11 2004
+++ files/patch-mod_throttle.c  Mon May 10 19:59:39 2004
@@ -11,3 +11,17 @@
  /***********************************************************************
   *** Pick one that best suits your system.
   ***********************************************************************/
+--- mod_throttle.c.orig Mon May 10 15:59:10 2004
++++ mod_throttle.c      Mon May 10 16:00:45 2004
+@@ -215,8 +215,8 @@
+ static const char dtype[] = "Directory";
+ static const char text_html[] = "text/html";
+ static const char text_plain[] = "text/plain";
+-static const char file_lock[] = "logs/mod_throttle.lock";
+-static const char file_runtime[] = "logs/mod_throttle.runtime";
++static const char file_lock[] = "/var/run/mod_throttle/mod_throttle.lock";
++static const char file_runtime[] = "/var/run/mod_throttle/mod_throttle.runtime";
+
+ static const char x_is_subrequest[] = "x-is-subrequest";
+ static const char request_handler[] = "request-handler";
+



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->anders  
Responsible-Changed-By: krion 
Responsible-Changed-When: Mon May 10 04:48:46 PDT 2004 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=66451 
State-Changed-From-To: open->closed 
State-Changed-By: anders 
State-Changed-When: Thu Jun 3 06:08:11 PDT 2004 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=66451 
>Unformatted:
