Bug 232926

Summary: www/mini_httpd: directory test for 500.mini_httpd-rotate
Product: Ports & Packages Reporter: Oleg Streejak <oleg>
Component: Individual Port(s)Assignee: Craig Leres <leres>
Status: Closed FIXED    
Severity: Affects Only Me CC: w.schwarzenfeld
Priority: --- Flags: bugzilla: maintainer-feedback? (leres)
Version: Latest   
Hardware: Any   
OS: Any   

Description Oleg Streejak 2018-11-03 07:30:35 UTC
it seems to me, that file work/mini_httpd-1.30/scripts/500.mini_httpd-rotate should be patched like this (files/patch-scripts_500.mini__httpd-rotate):

--- scripts/500.mini_httpd-rotate.old	2018-11-01 23:18:22.904844000 +0300
+++ scripts/500.mini_httpd-rotate	2018-11-03 10:15:24.670561238 +0300
@@ -5,7 +5,7 @@
 # This goes in /etc/periodic/daily.  It rotates the log files and then
 # tells mini_httpd to re-open its log file.
 
-cd /usr/local/www/chroot/logs
+test -d /usr/local/www/chroot/logs || return && cd /usr/local/www/chroot/logs
 rm -f mini_httpd_log.7.gz
 mv mini_httpd_log.6.gz mini_httpd_log.7.gz
 mv mini_httpd_log.5.gz mini_httpd_log.6.gz
Comment 1 commit-hook freebsd_committer freebsd_triage 2018-11-04 17:51:11 UTC
A commit references this bug:

Author: leres
Date: Sun Nov  4 17:50:53 UTC 2018
New revision: 484114
URL: https://svnweb.freebsd.org/changeset/ports/484114

Log:
  Create log directory on install so that it exists when
  500.mini_httpd-rotate runs.

  While we're here quiet new portlint nit (move CPE_VENDOR to its own
  block).

  PR:		232926
  Reported by:	Oleg Strizhak
  Approved by:	ler (mentor, implicit)

Changes:
  head/www/mini_httpd/Makefile
  head/www/mini_httpd/pkg-plist
Comment 2 Craig Leres freebsd_committer freebsd_triage 2018-11-04 17:56:49 UTC
There is no issue if the directory exists so I did that.

Thanks for the report.
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-11-04 18:18:38 UTC
A commit references this bug:

Author: leres
Date: Sun Nov  4 18:17:43 UTC 2018
New revision: 484119
URL: https://svnweb.freebsd.org/changeset/ports/484119

Log:
  After consulting with upstream it turns out 500.mini_httpd-rotate
  is supposed to be an example so add an EXAMPLES option and install
  (or not) appropriately.

  PR:		232926
  Reported by:	Oleg Strizhak
  Approved by:	ler (mentor, implicit)

Changes:
  head/www/mini_httpd/Makefile
  head/www/mini_httpd/pkg-plist
Comment 4 Craig Leres freebsd_committer freebsd_triage 2018-11-04 18:20:11 UTC
Actually 500.mini_httpd-rotate is supposed to be an example so let's not even install it in the periodic tree.