Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jun 2015 13:58:29 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 201045] www/nginx: tmpdir removed on binary package upgrade using pkg, breaking running instance
Message-ID:  <bug-201045-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201045

            Bug ID: 201045
           Summary: www/nginx: tmpdir removed on binary package upgrade
                    using pkg, breaking running instance
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: osa@FreeBSD.org
          Reporter: grembo@FreeBSD.org
          Assignee: osa@FreeBSD.org
             Flags: maintainer-feedback?(osa@FreeBSD.org)

When upgrading nginx using pkg, NGINX_TMPDIR (usually /var/tmp/nginx) is
removed. In setups relying on tmpdir this breaks the webserver (file upload,
caches etc.) and therefore an immediate restart of nginx is required right
after the upgrade (plus user experience might by suboptimal due to removed
files).

The plist already contains a fix for portmaster (which sets UPGRADE_PORT when
upgrading the port):

nginx/pkg-plist:@unexec if [ -z ${UPGRADE_PORT} ] ; then rm -fr
%%NGINX_TMPDIR%%; fi

Unfortunately this doesn't help when using pkg, so pkg install will remove
/var/tmp/nginx, essentially breaking the webserver.

The workaround is to set UPGRADE_PORT yourself on pkg install, e.g.:

UPGRADE_PORT=nginx pkg install nginx

This is not really user friendly though, so it might be better to simply not
remove the temporary directory on pkg delete by default.

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-201045-13>