From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Jul 15 11:50:10 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59223106567F for ; Fri, 15 Jul 2011 11:50:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id CA9248FC1B for ; Fri, 15 Jul 2011 11:50:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p6FBo9GX070694 for ; Fri, 15 Jul 2011 11:50:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p6FBo9dR070693; Fri, 15 Jul 2011 11:50:09 GMT (envelope-from gnats) Resent-Date: Fri, 15 Jul 2011 11:50:09 GMT Resent-Message-Id: <201107151150.p6FBo9dR070693@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, C-S Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFDDB1065673 for ; Fri, 15 Jul 2011 11:41:19 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id B5E3E8FC0C for ; Fri, 15 Jul 2011 11:41:19 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p6FBfJ9L098999 for ; Fri, 15 Jul 2011 11:41:19 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p6FBfJln098998; Fri, 15 Jul 2011 11:41:19 GMT (envelope-from nobody) Message-Id: <201107151141.p6FBfJln098998@red.freebsd.org> Date: Fri, 15 Jul 2011 11:41:19 GMT From: C-S To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/158944: www/hiawatha -- add rc file for php-fcgi X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2011 11:50:10 -0000 >Number: 158944 >Category: ports >Synopsis: www/hiawatha -- add rc file for php-fcgi >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Fri Jul 15 11:50:09 UTC 2011 >Closed-Date: >Last-Modified: >Originator: C-S >Release: >Organization: >Environment: >Description: Fix the rc files for hiawatha and add rc file for php-fcgi. >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ruN hiawatha.orig/Makefile hiawatha/Makefile --- hiawatha.orig/Makefile 2011-07-15 13:25:55.589944903 +0200 +++ hiawatha/Makefile 2011-07-15 13:31:39.598404104 +0200 @@ -7,6 +7,7 @@ PORTNAME= hiawatha PORTVERSION= 7.5 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://www.hiawatha-webserver.org/files/ \ http://www.c-s.li/ports/ @@ -21,7 +22,7 @@ CONFIG_FILES= hiawatha.conf mimetype.conf cgi-wrapper.conf php-fcgi.conf MAN1= cgi-wrapper.1 hiawatha.1 newroot.1 php-fcgi.1 ssi-cgi.1 wigwam.1 -USE_RC_SUBR= hiawatha +USE_RC_SUBR= hiawatha php-fcgi SUB_FILES= pkg-message WANT_GNOME= yes @@ -86,6 +87,8 @@ CPPFLAGS+= -I${LOCALBASE}/include/libxml2 .endif +SUB_LIST+= REQUIRE="DAEMON" + post-install: .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} diff -ruN hiawatha.orig/files/hiawatha.in hiawatha/files/hiawatha.in --- hiawatha.orig/files/hiawatha.in 2011-07-15 13:25:55.589944903 +0200 +++ hiawatha/files/hiawatha.in 2011-07-15 13:31:39.582401646 +0200 @@ -1,11 +1,12 @@ #!/bin/sh # -# $FreeBSD: ports/www/hiawatha/files/hiawatha.in,v 1.2 2010/03/27 00:15:13 dougb Exp $ +# $FreeBSD$ # -# PROVIDE: httpd -# REQUIRE: NETWORKING SERVERS -# BEFORE: DAEMON +# PROVIDE: hiawatha +# REQUIRE: LOGIN cleanvar +# BEFORE: DAEMON +# KEYWORD: shutdown # Add the following line(s) to /etc/rc.conf: # hiawatha_enable (bool): Set to "NO" by default, set it to "YES" to enable hiawatha @@ -14,9 +15,20 @@ name="hiawatha" rcvar=`set_rcvar` -command="%%PREFIX%%/sbin/${name}" -pidfile="/var/run/${name}.pid" load_rc_config $name + : ${hiawatha_enable="NO"} +: ${hiawatha_pidfile="/var/run/hiawatha.pid"} + +command="%%PREFIX%%/sbin/${name}" +pidfile=${hiawatha_pidfile} + +stop_postcmd="${name}_stop_postcmd" + +hiawatha_stop_postcmd() +{ + rm -f ${pidfile} +} + run_rc_command "$1" diff -ruN hiawatha.orig/files/php-fcgi.in hiawatha/files/php-fcgi.in --- hiawatha.orig/files/php-fcgi.in 1970-01-01 01:00:00.000000000 +0100 +++ hiawatha/files/php-fcgi.in 2011-07-15 13:31:39.582401646 +0200 @@ -0,0 +1,36 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: php_fcgi +# REQUIRE: %%REQUIRE%% +# BEFORE: LOGIN +# KEYWORD: shutdown + +# Add the following line(s) to /etc/rc.conf: +# php_fcgi_enable (bool): Set to "NO" by default, set it to "YES" to enable php_fcgi + +. /etc/rc.subr + +name="php_fcgi" +rcvar=`set_rcvar` + +load_rc_config $name + +: ${php_fcgi_enable="NO"} +: ${php_fcgi_app="%%LOCALBASE%%/bin/php-cgi"} +: ${php_fcgi_pidfile="/var/run/php-fcgi.pid"} + +command="%%PREFIX%%/sbin/php-fcgi" +pidfile=${php_fcgi_pidfile} +procname=${php_fcgi_app} + +stop_postcmd="${name}_stop_postcmd" + +php_fcgi_stop_postcmd() +{ + rm -f ${pidfile} +} + +run_rc_command "$1" diff -ruN hiawatha.orig/files/pkg-message.in hiawatha/files/pkg-message.in --- hiawatha.orig/files/pkg-message.in 2011-07-15 13:25:55.589944903 +0200 +++ hiawatha/files/pkg-message.in 2011-07-15 13:31:39.582401646 +0200 @@ -7,6 +7,9 @@ Add hiawatha_enable="YES" to rc.conf and start Hiawatha by running: %%PREFIX%%/etc/rc.d/hiawatha start +To use php-fcgi, add php_fcgi_enable="YES" to rc.conf and start it by running: +%%PREFIX%%/etc/rc.d/php-fcgi start + If you configured Hiawatha with Monitor, download and install the respective files needed to monitor your webserver: http://www.hiawatha-webserver.org/monitor >Release-Note: >Audit-Trail: >Unformatted: