Bug 232926 - www/mini_httpd: directory test for 500.mini_httpd-rotate
Summary: www/mini_httpd: directory test for 500.mini_httpd-rotate
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Craig Leres
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-03 07:30 UTC by Oleg Streejak
Modified: 2018-11-04 18:20 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.