Bug 184721 - [pkgng] www/nginx: purges /var/tmp/nginx on pkg upgrade
Summary: [pkgng] www/nginx: purges /var/tmp/nginx on pkg upgrade
Status: Closed DUPLICATE of bug 201045
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Sergey A. Osokin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-12 12:20 UTC by m.tsatsenko
Modified: 2015-10-12 01:29 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description m.tsatsenko 2013-12-12 12:20:00 UTC
While updating www/nginx from binary packages its tmp directory being deleted, resulting requests errors
2013/12/12 15:12:58 [crit] 34584#0: *118412 open() "/var/tmp/nginx/client_body_temp/0000013299" failed (2: No such file or directory)
After that it is required to manually create /var/tmp/nginx or restart nginx (rc.d script takes care of it).

Looks like pkgng does not set UPGRADE_PORT variable and plist knows nothing about upgrade.

Fix: 

Perhaps add an plist entry to create tmp directory on pkg installation or just remove following line:
@unexec if [ -z ${UPGRADE_PORT} ] ; then rm -fr %%NGINX_TMPDIR%%; fi
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-12-12 12:20:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->osa

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Phil Pennock 2014-09-27 02:42:37 UTC
This affects me too; using `chflags` to set the `sunlink` flag on `/jails/*/var/tmp/nginx` works and is a reasonable mitigation, pending a fix; extract from a forced upgrade to test that pkg is not broken follows:

Installed packages to be REINSTALLED:
        nginx-1.6.2,2

Proceed with this action? [y/N]: y
rm: /var/tmp/nginx: Operation not permitted
===> Creating users and/or groups.
Using existing group 'www'.
Using existing user 'www'.
Comment 3 Jason Unovitch freebsd_committer freebsd_triage 2015-10-12 01:29:36 UTC
Duplicate of bug 201045 which was fixed in https://svnweb.freebsd.org/changeset/ports/390602.

*** This bug has been marked as a duplicate of bug 201045 ***