Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 508520 - app-antivirus/clamav - add logrotate.d entry that works with systemd
Summary: app-antivirus/clamav - add logrotate.d entry that works with systemd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Antivirus Team
URL:
Whiteboard:
Keywords:
: 649762 684774 (view as bug list)
Depends on: 272963
Blocks:
  Show dependency tree
 
Reported: 2014-04-23 14:23 UTC by Sławomir Nizio
Modified: 2023-10-22 22:15 UTC (History)
9 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sławomir Nizio 2014-04-23 14:23:39 UTC
This package installs systemd files, yet its logrotate file assumes OpenRC.

Reproducible: Always
Comment 1 Pacho Ramos gentoo-dev 2014-05-02 11:00:04 UTC
Why do we need that "logfix" magic in init.d file? Not sure if also needed with systemd (in that case, we would probably need to split it out of init.d file to let us share that "logfix")
Comment 2 Thomas Raschbacher gentoo-dev 2014-06-17 08:29:06 UTC
I don't use systemd (and don't intend to set up a box with it) so if you want this, please submit a new init script / patch

re-assigned it to antivirus@g.o for now since it is clearly antivirus mainly and not net-mail (i know both herds are in metadata.xml

@systemd@g.o If you want to feel free to take this bug (if not i would appreciate if you could look at any patches/init scripts that might get attached )
Comment 3 Mike Gilbert gentoo-dev 2015-06-07 14:42:55 UTC
(In reply to Thomas Raschbacher from comment #2)
> re-assigned it to antivirus@g.o for now since it is clearly antivirus mainly
> and not net-mail (i know both herds are in metadata.xml

If antivirus is the primary maintainer, please re-order the herd tags so that it comes first in metadata.xml. Thanks.
Comment 4 Thomas Raschbacher gentoo-dev 2018-04-20 12:20:53 UTC
someone from systemd project please check this - or take the bug if you want to
Comment 5 Thomas Raschbacher gentoo-dev 2018-04-20 12:22:39 UTC
@pachos: the init script is not from me, i intend to rework the init files anyway to split it for the seperate services ( marking this depending on Bug #272963 )
Comment 6 Thomas Raschbacher gentoo-dev 2019-02-22 20:18:03 UTC
*** Bug 649762 has been marked as a duplicate of this bug. ***
Comment 7 Thomas Raschbacher gentoo-dev 2019-08-21 20:03:31 UTC
*** Bug 684774 has been marked as a duplicate of this bug. ***
Comment 8 Thomas Raschbacher gentoo-dev 2020-02-10 07:06:18 UTC
Different question: since Systemd can manage logs and log rotation do we actually need logrotate to work with systemd? (I checked some other packages and did not find any systemd specific logrotate stuff -- e.g. apache,..)
Comment 9 Michael Orlitzky gentoo-dev 2020-09-21 04:19:56 UTC
The logfix thingy is gone in v0.103.0, and this logrotate script should work for both OpenRC and systemd:

  /var/log/clamav/clamav.log {
    missingok
    postrotate
      /bin/kill -HUP `cat /run/clamd.pid 2>/dev/null` 2>/dev/null || true
    endscript
  }

I'll test it a bit and then commit it for >= 0.103.0.
Comment 10 Larry the Git Cow gentoo-dev 2020-09-23 03:34:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76622421052176c051df0c19a518d6c064aa5e5e

commit 76622421052176c051df0c19a518d6c064aa5e5e
Author:     Michael Orlitzky <mjo@gentoo.org>
AuthorDate: 2020-09-22 13:24:36 +0000
Commit:     Michael Orlitzky <mjo@gentoo.org>
CommitDate: 2020-09-23 03:23:24 +0000

    app-antivirus/clamav: new logrotate files for v0.103.0.
    
    Now that each ClamAV daemon has its own OpenRC service, we
    separate the logrotate entries as well. This fixes an old
    bug where we relied on the service manager being OpenRC.
    
    Closes: https://bugs.gentoo.org/508520
    Closes: https://bugs.gentoo.org/709780
    Package-Manager: Portage-3.0.4, Repoman-3.0.1
    Signed-off-by: Michael Orlitzky <mjo@gentoo.org>

 app-antivirus/clamav/clamav-0.103.0.ebuild         |  5 ++++-
 app-antivirus/clamav/files/clamav-milter.logrotate | 25 ++++++++++++++++++++++
 app-antivirus/clamav/files/clamd.logrotate         | 17 +++++++++++++++
 app-antivirus/clamav/files/freshclam.logrotate     | 17 +++++++++++++++
 4 files changed, 63 insertions(+), 1 deletion(-)
Comment 11 Christophe PEREZ 2023-10-22 21:14:40 UTC
I just installed clamav, with openrc and NO logrotate file installed at all.
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-10-22 21:48:02 UTC
(In reply to Christophe PEREZ from comment #11)
> I just installed clamav, with openrc and NO logrotate file installed at all.

Please file a new bug, including emerge --info app-antivirus/clamav.