From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Feb 4 11:50:01 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 937E7362 for ; Mon, 4 Feb 2013 11:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 636BF15AB for ; Mon, 4 Feb 2013 11:50:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r14Bo19M039538 for ; Mon, 4 Feb 2013 11:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r14Bo1N8039533; Mon, 4 Feb 2013 11:50:01 GMT (envelope-from gnats) Resent-Date: Mon, 4 Feb 2013 11:50:01 GMT Resent-Message-Id: <201302041150.r14Bo1N8039533@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, Andrej Zverev Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E723923B for ; Mon, 4 Feb 2013 11:48:09 +0000 (UTC) (envelope-from az@sunner.semmy.ru) Received: from sunner.semmy.ru (sunner.semmy.ru [IPv6:2a00:14d0:0:20::3]) by mx1.freebsd.org (Postfix) with ESMTP id 95C051589 for ; Mon, 4 Feb 2013 11:48:09 +0000 (UTC) Received: from az by sunner.semmy.ru with local (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1U2KWt-000FpQ-Nx for FreeBSD-gnats-submit@freebsd.org; Mon, 04 Feb 2013 15:48:07 +0400 Message-Id: Date: Mon, 04 Feb 2013 15:48:07 +0400 From: Andrej Zverev Sender: Andrej Zverev To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/175823: [patch] www/nginx - better handling of profiles X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Andrej Zverev List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2013 11:50:01 -0000 >Number: 175823 >Category: ports >Synopsis: [patch] www/nginx - better handling of profiles >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Mon Feb 04 11:50:01 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Andrej Zverev >Release: >Organization: >Environment: >Description: By default using profiles using rc.d/nginx will create .pid file in NGINX_RUNDIR (/var/run/) and names it as profile name + '.pid'. This can make surpise for people who will name profile as syslog, exim, etc. Following patch add prefix for pid file as "nginx_", so instead of /var/run/syslog.pid nginx will create /var/run/nginx_syslog.pid. People who are using nginx's profiles must be aware of these changes. No bump portrevision since this not default behavior. >How-To-Repeat: >Fix: --- nginx_coll.diff begins here --- Index: www/nginx/files/nginx.in =================================================================== --- www/nginx/files/nginx.in (revision 311575) +++ www/nginx/files/nginx.in (working copy) @@ -33,6 +33,7 @@ upgrade_cmd="nginx_upgrade" command="%%PREFIX%%/sbin/nginx" _pidprefix="%%NGINX_RUNDIR%%" +_pidprofile_prefix="nginx_" pidfile="${_pidprefix}/${name}.pid" _tmpprefix="%%NGINX_TMPDIR%%" required_files=%%PREFIX%%/etc/nginx/nginx.conf @@ -47,7 +48,7 @@ if [ -n "$2" ]; then profile="$2" if [ "x${nginx_profiles}" != "x" ]; then - pidfile="${_pidprefix}/${profile}.pid" + pidfile="${_pidprefix}/${_pidprofile_prefix}${profile}.pid" eval nginx_configfile="\${nginx_${profile}_configfile:-}" if [ "x${nginx_configfile}" = "x" ]; then echo "You must define a configuration file (nginx_${profile}_configfile)" --- nginx_coll.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: