Bug 268641 - www/redmine50: fix logfile path for thin server
Summary: www/redmine50: fix logfile path for thin server
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: Mikael Urankar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-29 14:34 UTC by Oleg Ginzburg
Modified: 2023-01-02 16:25 UTC (History)
0 users

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


Attachments
www/redmine50: fix logfile path for thin server (1.02 KB, patch)
2022-12-29 14:34 UTC, Oleg Ginzburg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Ginzburg 2022-12-29 14:34:48 UTC
Created attachment 239120 [details]
www/redmine50: fix logfile path for thin server

The ruby 'thin' server does not use an absolute path for logs file/dir. 
This leads to problems running Redmine on readonly bases (for example in jails with nullfs RO base):

--
redmine5:/@[17:26] # service redmine start
2022-12-29 17:26:32 +0300 Deleting stale PID file tmp/pids/thin.pid
/usr/local/lib/ruby/3.0/fileutils.rb:253:in `mkdir': Read-only file system @ dir_s_mkdir - /log (Errno::EROFS)
        from /usr/local/lib/ruby/3.0/fileutils.rb:253:in `fu_mkdir'
        from /usr/local/lib/ruby/3.0/fileutils.rb:231:in `block (2 levels) in mkdir_p'
        from /usr/local/lib/ruby/3.0/fileutils.rb:229:in `reverse_each'
        from /usr/local/lib/ruby/3.0/fileutils.rb:229:in `block in mkdir_p'
        from /usr/local/lib/ruby/3.0/fileutils.rb:211:in `each'
        from /usr/local/lib/ruby/3.0/fileutils.rb:211:in `mkdir_p'
        from /usr/local/lib/ruby/gems/3.0/gems/thin-1.8.1/lib/thin/daemonizing.rb:56:in `daemonize'
        from /usr/local/lib/ruby/gems/3.0/gems/thin-1.8.1/lib/thin/controllers/controller.rb:62:in `start'
        from /usr/local/lib/ruby/gems/3.0/gems/thin-1.8.1/lib/thin/runner.rb:203:in `run_command'
        from /usr/local/lib/ruby/gems/3.0/gems/thin-1.8.1/lib/thin/runner.rb:159:in `run!'
        from /usr/local/lib/ruby/gems/3.0/gems/thin-1.8.1/bin/thin:6:in `<top (required)>'
        from /usr/local/bin/thin:25:in `load'
        from /usr/local/bin/thin:25:in `<main>'
--

We can fix the logfile path via rc.d/redmine script ( check `thin -h` for --log args )
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-01-02 16:21:12 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a95cefb83ffa8ded832dc7dafbc50064acb1213e

commit a95cefb83ffa8ded832dc7dafbc50064acb1213e
Author:     Oleg Ginzburg <olevole@olevole.ru>
AuthorDate: 2023-01-02 16:19:12 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2023-01-02 16:20:11 +0000

    www/redmine50: fix logfile path for thin server

    The ruby 'thin' server does not use an absolute path for logs file/dir.
    This leads to problems running Redmine on readonly bases.

    PR:             268641

 www/redmine50/Makefile         | 1 +
 www/redmine50/files/redmine.in | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
Comment 2 Mikael Urankar freebsd_committer freebsd_triage 2023-01-02 16:25:32 UTC
Thanks!