Bug 212416 - www/nginx-devel: compiled-in error log location is littering /var/log
Summary: www/nginx-devel: compiled-in error log location is littering /var/log
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Sergey A. Osokin
URL:
Keywords: easy, patch
Depends on:
Blocks:
 
Reported: 2016-09-06 15:42 UTC by VK
Modified: 2016-09-14 22:29 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (osa)


Attachments
Consolidate logs under /var/log/nginx, minor cleanups (4.07 KB, patch)
2016-09-06 15:42 UTC, VK
vlad-fbsd: maintainer-approval? (osa)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description VK 2016-09-06 15:42:39 UTC
Created attachment 174419 [details]
Consolidate logs under /var/log/nginx, minor cleanups

Like in bug #195916, the same problem exists for nginx-devel, default (compiled-in) log location is littering /var/log. Attached is a patch that consolidates nginx logs under /var/log/nginx, and cleans up some tabs to quiet portlint.

Portlint  OK (some warnings from before)
Poudriere OK (11.0-RC2, amd64)
Comment 1 VK 2016-09-06 15:45:55 UTC
For /usr/ports/UPDATING:

"""
  AFFECTS: users of www/nginx-devel
  AUTHOR: 

  Nginx now creates logs under /var/log/nginx/ and changes default log
  names from "nginx-access.log" and "nginx-error.log" to "access.log" and
  "error.log" respectively. This is important for the error log because
  the location is encoded and touched by nginx during startup regardless
  of the configured location for the error log.

  See http://trac.nginx.org/nginx/ticket/147 for additional information
  on why this happens.
"""
Comment 2 John Marino freebsd_committer freebsd_triage 2016-09-06 16:05:09 UTC
I'll add myself to CC.
Vladimir, feel free to ping this PR in two weeks.  If osa@ hasn't responded by then, I'll take over the PR and commit it.
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-09-14 22:25:25 UTC
A commit references this bug:

Author: osa
Date: Wed Sep 14 22:25:07 UTC 2016
New revision: 422166
URL: https://svnweb.freebsd.org/changeset/ports/422166

Log:
  Do not littering /var/log by compiled-in error log.
  Bump PORTREVISION.

  PR:	212416

Changes:
  head/www/nginx-devel/Makefile
  head/www/nginx-devel/files/patch-conf-nginx.conf
  head/www/nginx-devel/pkg-plist
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-09-14 22:29:27 UTC
A commit references this bug:

Author: osa
Date: Wed Sep 14 22:28:40 UTC 2016
New revision: 422167
URL: https://svnweb.freebsd.org/changeset/ports/422167

Log:
  www/nginx-devel: Change default log locations to avoid /var/log pollution

  The nginx error log default will always be touched regardless of the value
  of the error_log directive in nginx.conf.  This is not a bug.  It also
  breaks shell tab completion for the sane default of /var/log/nginx.

  This change aligns the compiled-in default and the configuration default
  of error log to a new default /var/log/nginx directory.

  PR:	212416

Changes:
  head/UPDATING
Comment 5 Sergey A. Osokin freebsd_committer freebsd_triage 2016-09-14 22:29:36 UTC
Committed, thanks!