Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 777903

Summary: sys-process/atop-2.3.0-r1 service is launched by logrotate postscript
Product: Gentoo Linux Reporter: Zentoo <b4b1>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: b4b1, ionen, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Zentoo 2021-03-23 17:57:41 UTC
If you install sys-process/atop-2.3.0-r1 and do not launch /etc/init.d/atop or /etc/init.d/atopacct, the atop daemon will be launched anyway by next logrotate because of postrotate script from /etc/logrotate.d/psaccu_atop.
It's really annoying because you can use atop as you use *top tools without need to use the daemon that collect statistics in background using good enough storage in /var/log/atop/.

The logrotate postrotate script need to check if the service have to be started back only if the service have been launched by a runlevel or manually. So both atop logrotate config files need to be modifed to fix this problem because one stop the daemon and the one launch it back.
/etc/logrotate.d/psaccu_atop
/etc/logrotate.d/psaccs_atop
Comment 1 Zentoo 2021-03-23 18:06:37 UTC
On openrc that can be fixed by checking if /var/run/openrc/started/atop exists.
I don't know for systemd systems.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-20 02:33:39 UTC
It seems like this should be sorted by https://github.com/Atoptool/atop/commit/dd13f80e80e9063e9abaf062b26e4272c9671762 in 2.7.0.
Comment 3 Larry the Git Cow gentoo-dev 2021-12-20 04:08:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15e061e8643f68741540b6020777898f9df2d7cb

commit 15e061e8643f68741540b6020777898f9df2d7cb
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-12-20 02:30:30 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-12-20 04:08:35 +0000

    sys-process/atop: add 2.7.0
    
    Closes: https://bugs.gentoo.org/612248
    Closes: https://bugs.gentoo.org/736406
    Closes: https://bugs.gentoo.org/777903
    Closes: https://bugs.gentoo.org/829356
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-process/atop/Manifest                          |   2 +
 sys-process/atop/atop-2.7.0.ebuild                 | 111 +++++++++++++++++++++
 .../atop/files/atop-2.7.0-netatop-makefile.patch   |  42 ++++++++
 sys-process/atop/files/atop.service-r1             |  11 ++
 sys-process/atop/files/netatop.rc                  |  17 ++++
 sys-process/atop/metadata.xml                      |  11 +-
 6 files changed, 190 insertions(+), 4 deletions(-)