Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 617686 - net-irc/inspircd-2.0.23 Double logging when log file is configured
Summary: net-irc/inspircd-2.0.23 Double logging when log file is configured
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 620356
  Show dependency tree
 
Reported: 2017-05-07 01:23 UTC by Wade Cline
Modified: 2017-10-04 09:45 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Proposed patch (realpatch,3.04 KB, patch)
2017-05-07 03:06 UTC, Wade Cline
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wade Cline 2017-05-07 01:23:04 UTC
Each message (sans the first two) in the log appears twice when logging is configured via the 'inspircd.conf' file:

  Sat May  6 16:56:40 2017: WARNING: <dns:server> not defined, attempting to find working server in /etc/resolv.conf...
  Sat May  6 16:56:40 2017: <dns:server> set to '10.0.2.3' as first resolver in /etc/resolv.conf.
  Sat May  6 16:56:40 2017: New module introduced: cmd_pong.so (Module version InspIRCd-2.0.23 r0)
  Sat May  6 16:56:40 2017: Log started for InspIRCd-2.0.23 (0, inspircd_module_200_10) - compiled on Linux test 4.9.20
  Sat May  6 16:56:40 2017: New module introduced: cmd_pong.so (Module version InspIRCd-2.0.23 r0)
  Sat May  6 16:56:40 2017: New module introduced: cmd_squit.so (Module version InspIRCd-2.0.23 r0)
  Sat May  6 16:56:40 2017: New module introduced: cmd_squit.so (Module version InspIRCd-2.0.23 r0)
  Sat May  6 16:56:40 2017: New module introduced: cmd_ison.so (Module version InspIRCd-2.0.23 r0)
  Sat May  6 16:56:40 2017: New module introduced: cmd_ison.so (Module version InspIRCd-2.0.23 r0)

This is because the OpenRC init script invokes the 'inspircd' binary with the '--logfile' option:

  command_args="${INSPIRCD_OPTS} --config \"${INSPIRCD_CONFIGFILE}\" --logfile \"${INSPIRCD_LOGFILE}\""

Since InspIRCd contains flexible logging options via the '<log>' tag in 'inspircd.conf', the binary should not be invoked with the '--logfile' option.
Comment 1 Wade Cline 2017-05-07 03:06:10 UTC
Created attachment 471848 [details, diff]
Proposed patch
Comment 2 Wade Cline 2017-05-07 03:08:01 UTC
So I went ahead and made a patch for this before reading: https://devmanual.gentoo.org/ebuild-maintenance/index.html#touching-other-developers-ebuilds

I'm not sure if I should submit a pull request or not, but attached^Win the above comment thingy is my patch, and my repo with the committed patch is on GitHub at https://github.com/clinew/gentoo
Comment 3 Jonas Stein gentoo-dev 2017-05-14 18:13:37 UTC
Thank you for the patch.
Unfortunately this package has no maintainer at the moment. 
I suggest to contact the proxy maintainer team.
https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers
Comment 4 Wade Cline 2017-06-16 03:55:30 UTC
I think this is minor enough it can wait for the next stable version (2.0.25) rather than creating a new version (2.0.24-r2).  If someone disagrees then I can port the fix sooner.
Comment 5 Larry the Git Cow gentoo-dev 2017-10-04 09:45:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ea7dc6c0571ba1b675fd6db286b88df2041437d

commit 3ea7dc6c0571ba1b675fd6db286b88df2041437d
Author:     Wade Cline <wadecline@hotmail.com>
AuthorDate: 2017-09-29 05:24:21 +0000
Commit:     Patrice Clement <monsieurp@gentoo.org>
CommitDate: 2017-10-04 09:45:23 +0000

    net-irc/inspircd: revbump to 2.0.24-r1.
    
    * Install documentation with proper permissions, it was previously only
    viewable by the root user.
    
    * Remove --logfile option when starting the daemon via OpenRC, this prevents
    double-logging when the user has configured logging by the more featureful
    InspIRCd configuration file.
    
    Closes: https://bugs.gentoo.org/617686
    Closes: https://github.com/gentoo/gentoo/pull/5821

 net-irc/inspircd/files/inspircd-r3.confd           | 33 +++++++++++++++
 net-irc/inspircd/files/inspircd-r3.initd           | 48 ++++++++++++++++++++++
 ...rcd-2.0.24.ebuild => inspircd-2.0.24-r1.ebuild} | 20 ++++++---
 3 files changed, 96 insertions(+), 5 deletions(-)