Bug 256488 - mail/roundcube: newsyslog file makes little sense
Summary: mail/roundcube: newsyslog file makes little sense
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: Alex Dupre
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-08 18:16 UTC by Marko Cupać
Modified: 2021-06-09 09:34 UTC (History)
0 users

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


Attachments
newsyslog conf file patch (653 bytes, text/plain)
2021-06-08 18:16 UTC, Marko Cupać
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marko Cupać 2021-06-08 18:16:49 UTC
Created attachment 225644 [details]
newsyslog conf file patch

Hi,

I noticed that roundcube port installs roundcube.conf newsyslog file into /usr/local/etc/newsyslog.conf.d. Content of this file currently makes little sense for new installs and default setups, as neither directory in which logs reside, nor log filenames correspond to defaults.

default.inc.php defines log dir as follows:

// use this folder to store log files
// must be writeable for the user who runs PHP process (Apache user if mod_php is being used)
// This is used by the 'file' log driver.
$config['log_dir'] = RCUBE_INSTALL_PATH . 'logs/';

Unless overriden in config.inc.php, logs will reside in "/usr/local/www/roundcube/logs", and not in "/usr/local/www/roundcube/roundcube/logs" while roundcube.conf has "/usr/local/www/roundcube/roundcube/logs".

default.inc.php states that .log extension will be appended to each log file:

// Default extension used for log file name
$config['log_file_ext'] = '.log';

Unles overriden in config.inc.php, log filenames will be "errors.log" and "sendmail.log", while roundcube.conf has "errors" and "sendmail"

I have attached the patch. I haven't tested, but I would say %%WWWDIR%% here expands to roundcube install dir of /usr/local/www/roundcube, and not FreeBSD's global WWWDIR, /usr/local/www.
Comment 1 commit-hook freebsd_committer freebsd_triage 2021-06-09 09:33:17 UTC
A commit in branch main references this bug:

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

commit 9bda07e17cf0d755a91494832780b825ba6ca947
Author:     Alex Dupre <ale@FreeBSD.org>
AuthorDate: 2021-06-09 09:29:21 +0000
Commit:     Alex Dupre <ale@FreeBSD.org>
CommitDate: 2021-06-09 09:29:21 +0000

    mail/roundcube: fix newsyslog.d default config file.

    PR:             256488
    Submitted by:   Marko CupaÄ <marko.cupac@mimar.rs>

 mail/roundcube/Makefile                | 1 +
 mail/roundcube/files/newsyslog.conf.in | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)