Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 725122 - games-action/minetest-5.2.0 should install a logrotate rules file
Summary: games-action/minetest-5.2.0 should install a logrotate rules file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal enhancement (vote)
Assignee: William Breathitt Gray
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-05-24 23:38 UTC by Christopher Head
Modified: 2020-06-24 14:29 UTC (History)
3 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 Christopher Head 2020-05-24 23:38:56 UTC
Gentoo’s default configuration for the Minetest server is to send log data to /var/log/minetest/minetest-server.log. Everything else I have installed on my server that logs to /var/log has a file in /etc/logrotate.d to keep the logs at a reasonable level. It would be nice if Minetest did too.

Reproducible: Always
Comment 1 William Breathitt Gray 2020-05-25 19:11:41 UTC
Sure, that seems reasonable. Are there any configuration options in particular you think would be good to have set? For example, should the logs be rotated on a weekly basis, how many rotations, etc?
Comment 2 Christopher Head 2020-05-25 19:42:30 UTC
I don’t run a big server, so I don’t know what people doing so would want. For me, either of daily keeping a month or weekly keeping a year would seem fairly sane. I’m not sure how you need to interact with the server process, whether it has a reopen-log-file signal or anything like that, or whether it handles truncation sanely, or whatever.
Comment 3 Christopher Head 2020-05-25 19:43:53 UTC
Oh, weekly keeping five (as in your PR) is fine for me too.
Comment 4 William Breathitt Gray 2020-05-25 20:16:23 UTC
(In reply to Christopher Head from comment #2)
> I’m not sure how you need to interact with the server process,
> whether it has a reopen-log-file signal or anything like that, or whether it
> handles truncation sanely, or whatever.

That's something I hadn't considered; I don't think a currently running minetest server will automatically create a new log file when the original disappears. I wonder what we can do then in order to support logrotate.
Comment 5 William Breathitt Gray 2020-05-25 20:29:27 UTC
(In reply to William Breathitt Gray from comment #4)
> (In reply to Christopher Head from comment #2)
> > I’m not sure how you need to interact with the server process,
> > whether it has a reopen-log-file signal or anything like that, or whether it
> > handles truncation sanely, or whatever.
> 
> That's something I hadn't considered; I don't think a currently running
> minetest server will automatically create a new log file when the original
> disappears. I wonder what we can do then in order to support logrotate.

Luckily there is a "copytruncate" logrotate option so I'll use that: https://jlk.fjfi.cvut.cz/arch/manpages/man/logrotate.8#Files_and_Folders
Comment 6 Larry the Git Cow gentoo-dev 2020-06-24 14:29:42 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ffce436ef2bfa2d7eba140f72b4d9e0c70a8e75

commit 1ffce436ef2bfa2d7eba140f72b4d9e0c70a8e75
Author:     William Breathitt Gray <vilhelm.gray@gmail.com>
AuthorDate: 2020-05-25 19:26:05 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2020-06-24 14:29:18 +0000

    games-action/minetest: Add logrotate configuration file
    
    Closes: https://bugs.gentoo.org/725122
    Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/15969
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 games-action/minetest/files/minetestserver.logrotate | 5 +++++
 games-action/minetest/minetest-5.2.0.ebuild          | 3 +++
 2 files changed, 8 insertions(+)