Date: Sat, 19 Jul 2008 08:14:08 +0400 (MSD) From: Maxim Dounin <mdounin@mdounin.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/125762: [patch] www/nginx-devel - don't remove nginx temp directory on port upgrades Message-ID: <20080719041408.1632F17051@mdounin.cust.ramtel.ru> Resent-Message-ID: <200807190440.m6J4e2GO040259@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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 <mdounin@mdounin.ru> # 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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080719041408.1632F17051>