From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jul 19 04:40:03 2008 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 7C80A1065679 for ; Sat, 19 Jul 2008 04:40:03 +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 538658FC17 for ; Sat, 19 Jul 2008 04:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m6J4e2ZK040260 for ; Sat, 19 Jul 2008 04:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m6J4e2GO040259; Sat, 19 Jul 2008 04:40:02 GMT (envelope-from gnats) Resent-Date: Sat, 19 Jul 2008 04:40:02 GMT Resent-Message-Id: <200807190440.m6J4e2GO040259@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, Maxim Dounin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE3BA1065675 for ; Sat, 19 Jul 2008 04:32:15 +0000 (UTC) (envelope-from mdounin@mdounin.ru) Received: from mdounin.cust.ramtel.ru (mdounin.cust.ramtel.ru [81.19.69.81]) by mx1.freebsd.org (Postfix) with ESMTP id 7FBB38FC15 for ; Sat, 19 Jul 2008 04:32:15 +0000 (UTC) (envelope-from mdounin@mdounin.ru) Received: by mdounin.cust.ramtel.ru (Postfix, from userid 1000) id 1632F17051; Sat, 19 Jul 2008 08:14:08 +0400 (MSD) Message-Id: <20080719041408.1632F17051@mdounin.cust.ramtel.ru> Date: Sat, 19 Jul 2008 08:14:08 +0400 (MSD) From: Maxim Dounin To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/125762: [patch] www/nginx-devel - don't remove nginx temp directory on port upgrades X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Maxim Dounin List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jul 2008 04:40:03 -0000 >Number: 125762 >Category: ports >Synopsis: [patch] www/nginx-devel - don't remove nginx temp directory on port upgrades >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Jul 19 04:40:02 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Maxim Dounin >Release: FreeBSD 7.0-RC2 i386 >Organization: >Environment: System: FreeBSD mdounin.cust.ramtel.ru 7.0-RC2 FreeBSD 7.0-RC2 #1: Mon Feb 18 19:55:43 MSK 2008 root@mdounin.cust.ramtel.ru:/usr/obj/usr/src/sys/GENERIC i386 >Description: Since nginx creates client_body_temp/fastcgi_temp/proxy_temp subdirectories only at start/reconfiguration, removing temporary directory causes nginx to stop processing requests that require them (e.g. big proxied replies) untill nginx is reconfigured or restarted. This is especially painfull if done during long portupgrade process. >How-To-Repeat: >Fix: # HG changeset patch # User Maxim Dounin # Date 1216427715 -14400 # Node ID 695fa767cf2984222d07b57f288c27f1d54c9706 # Parent c5de146135c64aa025d302f941891287bc7e62a1 Don't remove nginx temp directory if we are upgrading. Since nginx creates client_body_temp/fastcgi_temp/proxy_temp subdirectories only at start/reconfiguration, removing temporary directory causes nginx to stop processing requests that require them (e.g. big proxied replies) untill nginx is reconfigured or restarted. This is especially painfull if done during long portupgrade process. So check if we are upgrading and don't remove temp directory if we are. diff --git a/pkg-plist b/pkg-plist --- a/pkg-plist +++ b/pkg-plist @@ -21,4 +21,4 @@ sbin/nginx sbin/nginx @exec [ -d %%NGINX_TMPDIR%% ] || mkdir -p %%NGINX_TMPDIR%% @exec chown %%WWWOWN%%:%%WWWGRP%% %%NGINX_TMPDIR%% -@unexec rm -fr %%NGINX_TMPDIR%% +@unexec if [ -z ${UPGRADE_PORT} ] ; then rm -fr %%NGINX_TMPDIR%%; fi >Release-Note: >Audit-Trail: >Unformatted: