[Bug 201045] www/nginx: tmpdir removed on binary package upgrade using pkg, breaking running instance

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jun 22 13:58:29 UTC 2015


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 at FreeBSD.org
          Reporter: grembo at FreeBSD.org
          Assignee: osa at FreeBSD.org
             Flags: maintainer-feedback?(osa at 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.


More information about the freebsd-ports-bugs mailing list