Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 485848 - app-admin/logrotate should depend on virtual/cron
Summary: app-admin/logrotate should depend on virtual/cron
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Chema Alonso Josa (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 486120
Blocks:
  Show dependency tree
 
Reported: 2013-09-24 12:27 UTC by Marek Mrva
Modified: 2015-04-21 09:26 UTC (History)
2 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 Marek Mrva 2013-09-24 12:27:44 UTC
The logrotate package periodically rotates system log files (among other things it can be configured for ofc.). To accomplish this, it installs the /etc/cron.daily/logrotate.cron file.

This file is in turn executed by a system cron daemon. Thus, if there is no cron daemon present, logrotate won't get executed.

Therefore, it seems wise for the logrotate ebuild to depend on cron. And as far as I can tell, the cronbase package is to be used exactly for this purpose.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-09-25 15:51:11 UTC
(In reply to Marek Mrva from comment #0)
> Therefore, it seems wise for the logrotate ebuild to depend on cron. And as
> far as I can tell, the cronbase package is to be used exactly for this
> purpose.

No, cronbase installs files and directories shared by many cron implementations. virtual/cron is the one you want.
Comment 2 Chema Alonso Josa (RETIRED) gentoo-dev 2015-04-04 21:22:34 UTC
Fixed.

+  04 Apr 2015; Chema Alonso <nimiux@gentoo.org> logrotate-3.8.9.ebuild:
+  Fix bug #485848 by Marek Mrva
+
Comment 3 tot-to 2015-04-14 11:46:04 UTC
Hi all,

I just found out that logrotate became hard-dependent on virtual/cron and then found this bug.

I should say, that I completely disagree with the point of the reporter.

There are different use-cases. For instance, I use gentoo on 24/7 running server as well as on mobile netbook.

While using the cron job is completely reasonable in the first case, in the later case I didn't find any reason to install cron at all. The way I use logrotate is a simple script /etc/local.d/logrotate.start:

#!/bin/sh
/usr/sbin/logrotate /etc/logrotate.conf

Since the machine is not used for more than a few hours, I find this way the most reasonable.

I can imaging people who has alternative view on when rotating should happen. For instance, one could decide to run it not from time to time, but when they locks their computer or after updating.

So, please make this deqpenedency optional or just drop it.
Comment 4 Chema Alonso Josa (RETIRED) gentoo-dev 2015-04-16 13:33:49 UTC
Well, actually the cron file which the ebuild installs is part of the logrotate package (examples dir), so there is no point in installing the cron file without isntalling cron.

However, your point of view seems reasonable. I have to fix other logrotate bug, so I'll bump the package to include this case too making the dependency on cron and the installation of the cron files optional.

Thanks for your contribution.
Comment 5 tot-to 2015-04-17 22:52:43 UTC
Thank you for your understanding.

As far as I know, it's considered fine to keep config files which povides the interaction of a package to a system tool even if the tool is completely disabled and not installed. For instance, I have a number of configs in /etc/systemd/system/, which has been installed as a part of different software that doesn't depend on systemd even optionally.

But I personally think, the USE flag, which would disable unused configs is better.
Comment 6 Chema Alonso Josa (RETIRED) gentoo-dev 2015-04-21 09:26:44 UTC
Fixed. Please test.

+*logrotate-3.8.9-r1 (21 Apr 2015)
+
+  21 Apr 2015; Chema Alonso <nimiux@gentoo.org> +logrotate-3.8.9-r1.ebuild,
+  metadata.xml:
+  Bump to fix bug #485848 and bug #546462
+